From 63640bf1b9032f2973753534208dbb5e08da0859 Mon Sep 17 00:00:00 2001 From: Vkale1 Date: Thu, 15 Oct 2026 16:21:35 +0200 Subject: [PATCH 1/2] first draft for bam file as raw read input, uses draft containers and bam tests will currently fail until toolkit containers are updated --- assets/schema_input_reads.json | 81 +++++++++++++++++-- conf/test_reads_long_bam.config | 35 ++++++++ modules/local/create_reads_manifest/main.nf | 11 +-- modules/local/create_reads_manifest/meta.yml | 14 ++-- .../create_reads_manifest/tests/main.nf.test | 44 ++++++++++ nextflow.config | 1 + tests/reads_long_bam.nf.test | 45 +++++++++++ workflows/readsubmit.nf | 18 +++-- 8 files changed, 223 insertions(+), 26 deletions(-) create mode 100644 conf/test_reads_long_bam.config create mode 100644 tests/reads_long_bam.nf.test diff --git a/assets/schema_input_reads.json b/assets/schema_input_reads.json index c511c3cc..963fe107 100644 --- a/assets/schema_input_reads.json +++ b/assets/schema_input_reads.json @@ -22,12 +22,21 @@ "meta": ["sample_accession"] }, "fastq_1": { - "type": "string", - "format": "file-path", - "exists": true, - "pattern": "^\\S+\\.(fq|fastq)(\\.gz)?$", + "anyOf": [ + { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.(fq|fastq)(\\.gz)?$" + }, + { + "type": "string", + "maxLength": 0 + } + ], + "default": null, "errorMessage": "FASTQ file must have extension '.fq' or '.fastq' (optionally gzipped)", - "description": "Path to single-end/paired-end forward reads in FASTQ format (optionally gzipped)" + "description": "Path to single-end/paired-end forward reads in FASTQ format (optionally gzipped). Leave empty if reads are provided as BAM" }, "fastq_2": { "anyOf": [ @@ -46,6 +55,23 @@ "errorMessage": "FASTQ file for reverse reads must have extension '.fq' or '.fastq' (optionally gzipped)", "description": "Path to reverse reads in FASTQ format for paired-end data (optionally gzipped). Leave empty for single-end reads" }, + "bam": { + "anyOf": [ + { + "type": "string", + "format": "file-path", + "exists": true, + "pattern": "^\\S+\\.bam$" + }, + { + "type": "string", + "maxLength": 0 + } + ], + "default": null, + "errorMessage": "BAM file must have extension '.bam'", + "description": "Path to reads in unaligned or aligned BAM format. Use instead of fastq_1/fastq_2" + }, "platform": { "type": "string", "enum": [ @@ -223,12 +249,53 @@ "required": [ "id", "sample_accession", - "fastq_1", "platform", "instrument", "library_source", "library_selection", "library_strategy" - ] + ], + "oneOf": [ + { + "properties": { + "fastq_1": { + "type": "string", + "minLength": 1 + } + }, + "required": ["fastq_1"] + }, + { + "properties": { + "bam": { + "type": "string", + "minLength": 1 + } + }, + "required": ["bam"] + } + ], + "if": { + "properties": { + "bam": { + "type": "string", + "minLength": 1 + } + }, + "required": ["bam"] + }, + "then": { + "properties": { + "fastq_1": { + "maxLength": 0, + "errorMessage": "fastq_1 must be empty when reads are provided as BAM" + }, + "fastq_2": { + "maxLength": 0, + "errorMessage": "fastq_2 must be empty when reads are provided as BAM" + } + } + }, + "errorMessage": "Reads must be provided either as FASTQ (fastq_1, optionally fastq_2) or as a single BAM (bam, with fastq_1 and fastq_2 empty)" } } diff --git a/conf/test_reads_long_bam.config b/conf/test_reads_long_bam.config new file mode 100644 index 00000000..8b47e3da --- /dev/null +++ b/conf/test_reads_long_bam.config @@ -0,0 +1,35 @@ +/* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Nextflow config file for running minimal tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Defines input files and everything required to run a fast and simple pipeline test. + + Use as follows: + nextflow run nf-core/seqsubmit -profile test_reads_long_bam, --outdir + +---------------------------------------------------------------------------------------- +*/ + +process { + resourceLimits = [ + cpus: 2, + memory: '8.GB', + time: '1.h' + ] +} + +params { + config_profile_name = 'Test --mode reads long-read BAM profile' + config_profile_description = 'Minimal test profile for long-read BAM reads submission' + + // Input data + // TODO: move to params.pipelines_testdata_base_path once the BAM + samplesheet are uploaded to nf-core/test-datasets + input = "${projectDir}/tests/test_data/samplesheets/samplesheet_reads_bam.csv" + outdir = 'test_output' + + mode = "reads" + submission_study = "PRJEB98843" + centre_name = "TEST_CENTER" + + test_upload = true +} diff --git a/modules/local/create_reads_manifest/main.nf b/modules/local/create_reads_manifest/main.nf index ded09e79..cfea512a 100644 --- a/modules/local/create_reads_manifest/main.nf +++ b/modules/local/create_reads_manifest/main.nf @@ -5,10 +5,10 @@ process CREATE_READS_MANIFEST { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? 'https://depot.galaxyproject.org/singularity/mgnify-pipelines-toolkit:1.5.1--pyhdfd78af_1': - 'biocontainers/mgnify-pipelines-toolkit:1.5.1--pyhdfd78af_1' }" + 'quay.io/microbiome-informatics/mgnify-pipelines-toolkit:feat-raw-reads' }" input: - tuple val(meta), path(fastq_files) + tuple val(meta), path(read_files) val(study_accession) output: @@ -21,8 +21,9 @@ process CREATE_READS_MANIFEST { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" - def fastq_list = fastq_files instanceof List ? fastq_files : [fastq_files] - def fastq_args = fastq_list.collect { "--fastq ${it.name}" }.join(' \\\n ') + def read_list = read_files instanceof List ? read_files : [read_files] + def read_flag = meta.file_type == 'bam' ? '--bam' : '--fastq' + def read_args = read_list.collect { file -> "${read_flag} ${file.name}" }.join(' \\\n ') def opt_insert = meta.insert_size ? "--insert-size ${meta.insert_size}" : '' def opt_lib_name = meta.library_name ? "--library-name '${meta.library_name}'" : '' def opt_desc = meta.description ? "--description '${meta.description}'" : '' @@ -38,7 +39,7 @@ process CREATE_READS_MANIFEST { --library-selection '${meta.library_selection}' \\ --library-strategy '${meta.library_strategy}' \\ --output ${prefix}.manifest \\ - ${fastq_args} \\ + ${read_args} \\ ${opt_insert} \\ ${opt_lib_name} \\ ${opt_desc} \\ diff --git a/modules/local/create_reads_manifest/meta.yml b/modules/local/create_reads_manifest/meta.yml index b8bead49..b95ff690 100644 --- a/modules/local/create_reads_manifest/meta.yml +++ b/modules/local/create_reads_manifest/meta.yml @@ -29,13 +29,15 @@ input: description: | Groovy Map containing sample information, including platform, instrument, library_source, library_selection, library_strategy, - sample_accession, and optionally insert_size, library_name, - description. - e.g. `[ id:'sample1', platform:'ILLUMINA', instrument:'Illumina HiSeq 2500' ]` - - fastq_files: + sample_accession, file_type ('fastq' or 'bam'), and optionally + insert_size, library_name, description. + e.g. `[ id:'sample1', platform:'ILLUMINA', instrument:'Illumina HiSeq 2500', file_type:'fastq' ]` + - read_files: type: file - description: One or two FASTQ files (single-end or paired-end reads). - pattern: "*.{fastq,fastq.gz,fq,fq.gz}" + description: | + One or two FASTQ files (single-end or paired-end reads), or a single + BAM file. Written to the manifest as FASTQ or BAM according to meta.file_type. + pattern: "*.{fastq,fastq.gz,fq,fq.gz,bam}" - - study_accession: type: value description: ENA study accession to submit reads to. diff --git a/modules/local/create_reads_manifest/tests/main.nf.test b/modules/local/create_reads_manifest/tests/main.nf.test index 3c33494c..68151f70 100644 --- a/modules/local/create_reads_manifest/tests/main.nf.test +++ b/modules/local/create_reads_manifest/tests/main.nf.test @@ -96,4 +96,48 @@ nextflow_process { } } + test("CREATE_READS_MANIFEST - long-read BAM") { + when { + process { + """ + input[0] = [ + [ + id: 'test_bam', + sample_accession: 'SAMEA12345', + platform: 'OXFORD_NANOPORE', + instrument: 'MinION', + library_source: 'METAGENOMIC', + library_selection: 'RANDOM', + library_strategy: 'WGS', + insert_size: null, + library_name: null, + description: null, + file_type: 'bam' + ], + // TODO: switch to params.pipelines_testdata_base_path once uploaded to nf-core/test-datasets + file("${projectDir}/tests/test_data/reads/tiny_ont.bam", checkIfExists: true) + ] + input[1] = "PRJEB12345" + """ + } + } + + then { + assert process.success + assertAll( + { assert process.out.manifest.size() == 1 }, + { + def manifestContent = path(process.out.manifest[0][1]).text + def lines = manifestContent.readLines() + // 8 required fields + 1 BAM entry = 9 lines + assert lines.size() == 9 + assert manifestContent.contains("PLATFORM\tOXFORD_NANOPORE") + assert lines.count { it.startsWith("BAM\t") } == 1 + assert lines.contains("BAM\ttiny_ont.bam") + assert lines.count { it.startsWith("FASTQ\t") } == 0 + } + ) + } + } + } diff --git a/nextflow.config b/nextflow.config index d3911f83..f9769b11 100644 --- a/nextflow.config +++ b/nextflow.config @@ -255,6 +255,7 @@ profiles { test_assembly_no_coverage_paired_reads { includeConfig 'conf/test_assembly_no_coverage_paired_reads.config' } test_assembly_one_contig { includeConfig 'conf/test_assembly_one_contig.config' } test_reads_paired { includeConfig 'conf/test_reads_paired.config' } + test_reads_long_bam { includeConfig 'conf/test_reads_long_bam.config' } } // Load nf-core custom profiles from different institutions diff --git a/tests/reads_long_bam.nf.test b/tests/reads_long_bam.nf.test new file mode 100644 index 00000000..7df84dc9 --- /dev/null +++ b/tests/reads_long_bam.nf.test @@ -0,0 +1,45 @@ +nextflow_pipeline { + + name "Test reads submission workflow stub - long-read BAM" + script "../main.nf" + tag "pipeline" + tag "mode_reads" + tag "test_reads_long_bam" + profile "test_reads_long_bam" + + test("-profile test_reads_long_bam") { + + when { + params { + outdir = "$outputDir" + // TODO: copying BAM, drop once the BAM + samplesheet are hosted in nf-core/test-datasets + def samplesheet = new File("${launchDir}/samplesheet_reads_bam.csv") + samplesheet.parentFile.mkdirs() + samplesheet.text = new File("${projectDir}/tests/test_data/samplesheets/samplesheet_reads_bam.csv").text + .replace("tests/test_data/reads/tiny_ont.bam", "${projectDir}/tests/test_data/reads/tiny_ont.bam") + input = samplesheet.toString() + } + } + + then { + // stable_name: All files + folders in ${params.outdir}/ with a stable name + def stable_name = getAllFilesFromDir(params.outdir, relative: true, includeDir: true, ignore: ['pipeline_info/*.{html,json,txt}']) + // stable_path: All files in ${params.outdir}/ with stable content + def stable_path = getAllFilesFromDir(params.outdir, ignoreFile: 'tests/.nftignore') + // Early failure no need to test the rest of snapshots + assert workflow.success + assertAll( + { assert snapshot( + // Number of successful tasks + workflow.trace.succeeded().size(), + // pipeline versions.yml file for multiqc from which Nextflow version is removed because we test pipelines on multiple Nextflow versions + removeNextflowVersion("$outputDir/pipeline_info/nf_core_seqsubmit_software_mqc_versions.yml"), + // All stable path name, with a relative path + stable_name, + // All files with stable contents + stable_path + ).match() } + ) + } + } +} diff --git a/workflows/readsubmit.nf b/workflows/readsubmit.nf index 8bdff882..e2a3fa30 100644 --- a/workflows/readsubmit.nf +++ b/workflows/readsubmit.nf @@ -45,14 +45,16 @@ workflow READSUBMIT { // --------- Create reads channel with proper metadata structure reads_ch = ch_samplesheet - .map { meta, reads_1, reads_2 -> - def new_meta = meta + [single_end: !reads_2] - if ( !new_meta.single_end ) { + .map { meta, reads_1, reads_2, bam -> + if ( bam ) { + // Reads provided as BAM + [meta + [single_end: true, file_type: 'bam'], bam] + } else if ( reads_2 ) { // If paired end reads - [new_meta, [reads_1, reads_2]] + [meta + [single_end: false, file_type: 'fastq'], [reads_1, reads_2]] } else { // If single end - [new_meta, reads_1] + [meta + [single_end: true, file_type: 'fastq'], reads_1] } } @@ -82,10 +84,10 @@ workflow READSUBMIT { study_accession_ch.first() ) - // Prepare input for submission with manifest and fastq files + // Prepare input for submission with manifest and read files submission_input = reads_ch.join(CREATE_READS_MANIFEST.out.manifest) - .map { meta, fastq, manifest -> - [meta, fastq, manifest] + .map { meta, reads, manifest -> + [meta, reads, manifest] } // --------- Upload data to ENA From 16962f73034ea367d16574c31ad91fa84d8c3ee7 Mon Sep 17 00:00:00 2001 From: Vkale1 Date: Fri, 16 Oct 2026 16:00:03 +0200 Subject: [PATCH 2/2] change test datasets path, symlink read files instead of copy, update docs --- conf/modules.config | 6 +++ conf/test_reads_long_bam.config | 3 +- docs/usage.md | 39 ++++++++++--------- .../create_reads_manifest/tests/main.nf.test | 4 +- tests/reads_long_bam.nf.test | 8 +--- 5 files changed, 30 insertions(+), 30 deletions(-) diff --git a/conf/modules.config b/conf/modules.config index ce7df3f9..86454291 100644 --- a/conf/modules.config +++ b/conf/modules.config @@ -176,6 +176,12 @@ process { ] } + // Reads can be multi or 100s of GB (e.g. long-read BAMs): symlink instead of copying them before upload. + // assemblies, bins and mags modes keep the default stageInMode 'copy'. + withName: '.*:READSUBMIT:SUBMIT' { + stageInMode = 'symlink' + } + withName: 'REGISTERSTUDY|GENERATE_ASSEMBLY_MANIFEST|CREATE_READS_MANIFEST' { publishDir = [ enabled: false diff --git a/conf/test_reads_long_bam.config b/conf/test_reads_long_bam.config index 8b47e3da..14d70f97 100644 --- a/conf/test_reads_long_bam.config +++ b/conf/test_reads_long_bam.config @@ -23,8 +23,7 @@ params { config_profile_description = 'Minimal test profile for long-read BAM reads submission' // Input data - // TODO: move to params.pipelines_testdata_base_path once the BAM + samplesheet are uploaded to nf-core/test-datasets - input = "${projectDir}/tests/test_data/samplesheets/samplesheet_reads_bam.csv" + input = params.pipelines_testdata_base_path + 'seqsubmit/samplesheets/samplesheet_reads_bam.csv' outdir = 'test_output' mode = "reads" diff --git a/docs/usage.md b/docs/usage.md index 14c38e20..a780078b 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -156,25 +156,27 @@ You will need to create a samplesheet with information about the raw reads you w Example: ```csv title="samplesheet_reads.csv" -id,sample_accession,fastq_1,fastq_2,platform,instrument,library_source,library_selection,library_strategy,insert_size,library_name,description -illumina_run_001,SAMEA1234567,data/reads_R1.fastq.gz,data/reads_R2.fastq.gz,ILLUMINA,Illumina HiSeq 2000,GENOMIC,RANDOM,WGS,500,HiSeq_library_001,Illumina sequencing of sample XYZ -pacbio_run_001,SAMEA7654321,data/pacbio_reads.fastq.gz,,PACBIO_SMRT,PacBio Sequel,GENOMIC,RANDOM,WGS,,PacBio_library_002,Long-read sequencing +id,sample_accession,fastq_1,fastq_2,bam,platform,instrument,library_source,library_selection,library_strategy,insert_size,library_name,description +illumina_run_001,SAMEA1234567,data/reads_R1.fastq.gz,data/reads_R2.fastq.gz,,ILLUMINA,Illumina HiSeq 2000,GENOMIC,RANDOM,WGS,500,HiSeq_library_001,Illumina sequencing of sample XYZ +pacbio_run_001,SAMEA7654321,data/pacbio_reads.fastq.gz,,,PACBIO_SMRT,PacBio Sequel,GENOMIC,RANDOM,WGS,,PacBio_library_002,Long-read sequencing +nanopore_run_001,SAMEA7654322,,,data/nanopore_reads.bam,OXFORD_NANOPORE,MinION,METAGENOMIC,RANDOM,WGS,,ONT_library_003,Long-read sequencing provided as BAM ``` -| Column | Required | Description | -| ------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | Yes | Unique identifier of this particular data entry. Used as an experiment name. | -| `sample_accession` | Yes | ENA sample accession (starting with SAMEA) of the sample used to generate raw reads. Samples must already be submitted to ENA. | -| `fastq_1` | Yes | Path to single-end/paired-end forward reads in FASTQ format (optionally gzipped). | -| `fastq_2` | No | Path to reverse reads in FASTQ format for paired-end data (optionally gzipped). Leave empty for single-end reads. | -| `platform` | Yes | Sequencing platform. Must be one of the ENA controlled vocabulary values listed in [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#metadata-validation). Supported values: `ILLUMINA`, `PACBIO_SMRT`, `OXFORD_NANOPORE`, `ION_TORRENT`, `CAPILLARY`, `DNBSEQ`, `ELEMENT`, `GENAPSYS`, `GENEMIND`, `HELICOS`, `LS454`, `BGISEQ`, `ULTIMA`, `VELA_DIAGNOSTICS`. | -| `instrument` | Yes | Sequencer model, e.g. "Illumina HiSeq 2000", "PacBio Sequel", "MinION". See [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-instrument). | -| `library_source` | Yes | Library source type. Options: `GENOMIC`, `METAGENOMIC`, `TRANSCRIPTOMIC`, `METAGENOMIC SINGLE CELL`, `TRANSCRIPTOMIC SINGLE CELL`, `SYNTHETIC`, `VIRAL RNA`, `OTHER`. ENA [documantation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-library-source). | -| `library_selection` | Yes | Library selection method. Options: `RANDOM`, `PCR`, `RANDOM PCR`, `RT-PCR`, `MF`, `cDNA`, `cDNA_randomPriming`, `cDNA_oligo_dT`, `PolyA`, `Inverse rRNA`, `ChIP`, `MNase`, `DNase`, `Hybrid Selection`, etc. See [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-library-selection) for complete list. | -| `library_strategy` | Yes | Library strategy. Options: `WGS`, `WGA`, `WXS`, `RNA-Seq`, `miRNA-Seq`, `ncRNA-Seq`, `EST`, `Hi-C`, `ATAC-seq`, `WCS`, `RAD-Seq`, `CLONE`, `AMPLICON`, `POOLCLONE`, `etc`. See [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-library-strategy) for complete list. | -| `insert_size` | No | Fragment/insert size for paired-end reads (e.g., 500 for 500 bp inserts). Leave empty if not applicable. | -| `library_name` | No | Descriptive library name (optional). | -| `description` | No | Free-text description of the experiment (optional). | +| Column | Required | Description | +| ------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | Yes | Unique identifier of this particular data entry. Used as an experiment name. | +| `sample_accession` | Yes | ENA sample accession (starting with SAMEA) of the sample used to generate raw reads. Samples must already be submitted to ENA. | +| `fastq_1` | Conditional | Path to single-end/paired-end forward reads in FASTQ format (optionally gzipped). Required unless `bam` is provided. | +| `fastq_2` | No | Path to reverse reads in FASTQ format for paired-end data (optionally gzipped). Leave empty for single-end reads and if `bam` is provided. | +| `bam` | Conditional | Path to reads in BAM format (`.bam`). Required unless `fastq_1` is provided. | +| `platform` | Yes | Sequencing platform. Must be one of the ENA controlled vocabulary values listed in [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#metadata-validation). Supported values: `ILLUMINA`, `PACBIO_SMRT`, `OXFORD_NANOPORE`, `ION_TORRENT`, `CAPILLARY`, `DNBSEQ`, `ELEMENT`, `GENAPSYS`, `GENEMIND`, `HELICOS`, `LS454`, `BGISEQ`, `ULTIMA`, `VELA_DIAGNOSTICS`. | +| `instrument` | Yes | Sequencer model, e.g. "Illumina HiSeq 2000", "PacBio Sequel", "MinION". See [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-instrument). | +| `library_source` | Yes | Library source type. Options: `GENOMIC`, `METAGENOMIC`, `TRANSCRIPTOMIC`, `METAGENOMIC SINGLE CELL`, `TRANSCRIPTOMIC SINGLE CELL`, `SYNTHETIC`, `VIRAL RNA`, `OTHER`. ENA [documantation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-library-source). | +| `library_selection` | Yes | Library selection method. Options: `RANDOM`, `PCR`, `RANDOM PCR`, `RT-PCR`, `MF`, `cDNA`, `cDNA_randomPriming`, `cDNA_oligo_dT`, `PolyA`, `Inverse rRNA`, `ChIP`, `MNase`, `DNase`, `Hybrid Selection`, etc. See [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-library-selection) for complete list. | +| `library_strategy` | Yes | Library strategy. Options: `WGS`, `WGA`, `WXS`, `RNA-Seq`, `miRNA-Seq`, `ncRNA-Seq`, `EST`, `Hi-C`, `ATAC-seq`, `WCS`, `RAD-Seq`, `CLONE`, `AMPLICON`, `POOLCLONE`, `etc`. See [ENA documentation](https://ena-docs.readthedocs.io/en/latest/submit/reads/webin-cli.html#permitted-values-for-library-strategy) for complete list. | +| `insert_size` | No | Fragment/insert size for paired-end reads (e.g., 500 for 500 bp inserts). Leave empty if not applicable. | +| `library_name` | No | Descriptive library name (optional). | +| `description` | No | Free-text description of the experiment (optional). | ### `reads` parameters and example @@ -197,7 +199,8 @@ nextflow run nf-core/seqsubmit \ `reads` mode does not support the following: -- **Reads in non-FASTQ formats**: Only reads provided as FASTQ (`.fastq.gz`) can be submitted. Other formats (e.g. BAM) are not supported as input. +- **Other read formats**: Reads must be provided as FASTQ (`.fastq`/`.fq`, optionally gzipped) or BAM (`.bam`). Other formats (e.g. CRAM or `.tar.gz` archives) are not supported as input. +- **Mixed formats in one row**: A row cannot combine FASTQ and BAM files. Put them in separate rows, which are submitted as separate ENA runs. ## `metagenomic_assemblies` mode diff --git a/modules/local/create_reads_manifest/tests/main.nf.test b/modules/local/create_reads_manifest/tests/main.nf.test index 68151f70..9768ee6c 100644 --- a/modules/local/create_reads_manifest/tests/main.nf.test +++ b/modules/local/create_reads_manifest/tests/main.nf.test @@ -112,10 +112,8 @@ nextflow_process { insert_size: null, library_name: null, description: null, - file_type: 'bam' ], - // TODO: switch to params.pipelines_testdata_base_path once uploaded to nf-core/test-datasets - file("${projectDir}/tests/test_data/reads/tiny_ont.bam", checkIfExists: true) + file(params.pipelines_testdata_base_path + 'test_data/reads/tiny_ont.bam', checkIfExists: true) ] input[1] = "PRJEB12345" """ diff --git a/tests/reads_long_bam.nf.test b/tests/reads_long_bam.nf.test index 7df84dc9..661bf508 100644 --- a/tests/reads_long_bam.nf.test +++ b/tests/reads_long_bam.nf.test @@ -1,6 +1,6 @@ nextflow_pipeline { - name "Test reads submission workflow stub - long-read BAM" + name "Test reads submission workflow - long-read BAM" script "../main.nf" tag "pipeline" tag "mode_reads" @@ -12,12 +12,6 @@ nextflow_pipeline { when { params { outdir = "$outputDir" - // TODO: copying BAM, drop once the BAM + samplesheet are hosted in nf-core/test-datasets - def samplesheet = new File("${launchDir}/samplesheet_reads_bam.csv") - samplesheet.parentFile.mkdirs() - samplesheet.text = new File("${projectDir}/tests/test_data/samplesheets/samplesheet_reads_bam.csv").text - .replace("tests/test_data/reads/tiny_ont.bam", "${projectDir}/tests/test_data/reads/tiny_ont.bam") - input = samplesheet.toString() } }