diff --git a/CHANGELOG.md b/CHANGELOG.md index 525ebc6a..c86f1372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [PR #325](https://github.com/nf-core/fetchngs/pull/325) - Add wget wait time for retries - [PR #333](https://github.com/nf-core/fetchngs/pull/333) - Add logo - [PR #365](https://github.com/nf-core/fetchngs/pull/365) - Template update for nf-core/tools v3.5.2, including topic channels for version reporting +- [PR #368](https://github.com/nf-core/fetchngs/pull/XXX) - Add stub blocks to all local modules ### Software dependencies diff --git a/modules/local/aspera_cli/main.nf b/modules/local/aspera_cli/main.nf index 41ae0565..9460e7db 100644 --- a/modules/local/aspera_cli/main.nf +++ b/modules/local/aspera_cli/main.nf @@ -55,4 +55,20 @@ process ASPERA_CLI { md5sum -c ${meta.id}_2.fastq.gz.md5 """ } + + stub: + if (meta.single_end) { + """ + echo | gzip > ${meta.id}.fastq.gz + touch ${meta.id}.fastq.gz.md5 + """ + } else { + """ + echo | gzip > ${meta.id}_1.fastq.gz + echo | gzip > ${meta.id}_2.fastq.gz + touch ${meta.id}_1.fastq.gz.md5 + touch ${meta.id}_2.fastq.gz.md5 + """ + } + } diff --git a/modules/local/aspera_cli/tests/main.nf.test b/modules/local/aspera_cli/tests/main.nf.test index 63347000..19822f7a 100644 --- a/modules/local/aspera_cli/tests/main.nf.test +++ b/modules/local/aspera_cli/tests/main.nf.test @@ -28,4 +28,29 @@ nextflow_process { ) } } -} + + test("Should run without failures - stub") { + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'SRX9626017_SRR13191702', single_end:false, md5_1: '89c5be920021a035084d8aeb74f32df7', md5_2: '56271be38a80db78ef3bdfc5d9909b98' ], // meta map + [ + 'fasp.sra.ebi.ac.uk:/vol1/fastq/SRR131/002/SRR13191702/SRR13191702_1.fastq.gz', + 'fasp.sra.ebi.ac.uk:/vol1/fastq/SRR131/002/SRR13191702/SRR13191702_2.fastq.gz' + ] + ] + input[1] = 'era-fasp' + """ + } + } + + then { + assertAll( + { assert process.success } + ) + } + } +} \ No newline at end of file diff --git a/modules/local/multiqc_mappings_config/main.nf b/modules/local/multiqc_mappings_config/main.nf index deb3bb20..1691d410 100644 --- a/modules/local/multiqc_mappings_config/main.nf +++ b/modules/local/multiqc_mappings_config/main.nf @@ -19,4 +19,9 @@ process MULTIQC_MAPPINGS_CONFIG { $csv \\ multiqc_config.yml """ + + stub: + """ + touch multiqc_config.yml + """ } diff --git a/modules/local/multiqc_mappings_config/tests/main.nf.test b/modules/local/multiqc_mappings_config/tests/main.nf.test index dbb4d74f..e681ad88 100644 --- a/modules/local/multiqc_mappings_config/tests/main.nf.test +++ b/modules/local/multiqc_mappings_config/tests/main.nf.test @@ -21,4 +21,22 @@ nextflow_process { ) } } + + test("Should run without failures - stub") { + options '-stub' + + when { + process { + """ + input[0] = file(params.pipelines_testdata_base_path + 'csv/SRX9626017_SRR13191702.mappings.csv', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success } + ) + } + } } diff --git a/modules/local/multiqc_mappings_config/tests/main.nf.test.snap b/modules/local/multiqc_mappings_config/tests/main.nf.test.snap index 776cc5b4..57e5a12f 100644 --- a/modules/local/multiqc_mappings_config/tests/main.nf.test.snap +++ b/modules/local/multiqc_mappings_config/tests/main.nf.test.snap @@ -24,7 +24,7 @@ ] } ], - "timestamp": "2026-04-13T15:41:59.602846", + "timestamp": "2026-05-06T16:00:30.170721088", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" diff --git a/modules/local/sra_fastq_ftp/main.nf b/modules/local/sra_fastq_ftp/main.nf index 0770a161..0b077ab4 100644 --- a/modules/local/sra_fastq_ftp/main.nf +++ b/modules/local/sra_fastq_ftp/main.nf @@ -48,4 +48,19 @@ process SRA_FASTQ_FTP { md5sum -c ${meta.id}_2.fastq.gz.md5 """ } + + stub: + if (meta.single_end) { + """ + echo | gzip > ${meta.id}.fastq.gz + touch ${meta.id}.fastq.gz.md5 + """ + } else { + """ + echo | gzip > ${meta.id}_1.fastq.gz + echo | gzip > ${meta.id}_2.fastq.gz + touch ${meta.id}_1.fastq.gz.md5 + touch ${meta.id}_2.fastq.gz.md5 + """ + } } diff --git a/modules/local/sra_fastq_ftp/tests/main.nf.test b/modules/local/sra_fastq_ftp/tests/main.nf.test index bf005290..88317d46 100644 --- a/modules/local/sra_fastq_ftp/tests/main.nf.test +++ b/modules/local/sra_fastq_ftp/tests/main.nf.test @@ -27,4 +27,28 @@ nextflow_process { ) } } + + test("Should run without failures - stub") { + options '-stub' + + when { + process { + """ + input[0] = [ + [ id:'SRX9626017_SRR13191702', single_end:false, md5_1: '89c5be920021a035084d8aeb74f32df7', md5_2: '56271be38a80db78ef3bdfc5d9909b98' ], // meta map + [ + 'ftp.sra.ebi.ac.uk/vol1/fastq/SRR131/002/SRR13191702/SRR13191702_1.fastq.gz', + 'ftp.sra.ebi.ac.uk/vol1/fastq/SRR131/002/SRR13191702/SRR13191702_2.fastq.gz' + ] + ] + """ + } + } + + then { + assertAll( + { assert process.success } + ) + } + } } diff --git a/modules/local/sra_fastq_ftp/tests/main.nf.test.snap b/modules/local/sra_fastq_ftp/tests/main.nf.test.snap index c1c750f7..e8f7dea5 100644 --- a/modules/local/sra_fastq_ftp/tests/main.nf.test.snap +++ b/modules/local/sra_fastq_ftp/tests/main.nf.test.snap @@ -74,7 +74,7 @@ ] } ], - "timestamp": "2026-04-13T15:42:09.490402", + "timestamp": "2026-05-06T16:01:04.565094912", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" diff --git a/modules/local/sra_ids_to_runinfo/main.nf b/modules/local/sra_ids_to_runinfo/main.nf index ff2e2da5..de5c3acc 100644 --- a/modules/local/sra_ids_to_runinfo/main.nf +++ b/modules/local/sra_ids_to_runinfo/main.nf @@ -25,4 +25,9 @@ process SRA_IDS_TO_RUNINFO { ${id}.runinfo.tsv \\ $metadata_fields """ + + stub: + """ + touch ${id}.runinfo.tsv + """ } diff --git a/modules/local/sra_ids_to_runinfo/tests/main.nf.test b/modules/local/sra_ids_to_runinfo/tests/main.nf.test index 48797a1a..8ea4a642 100644 --- a/modules/local/sra_ids_to_runinfo/tests/main.nf.test +++ b/modules/local/sra_ids_to_runinfo/tests/main.nf.test @@ -22,4 +22,23 @@ nextflow_process { ) } } + + test("Should run without failures - stub") { + options '-stub' + + when { + process { + """ + input[0] = 'SRR13191702' + input[1] = '' + """ + } + } + + then { + assertAll( + { assert process.success } + ) + } + } } diff --git a/modules/local/sra_ids_to_runinfo/tests/main.nf.test.snap b/modules/local/sra_ids_to_runinfo/tests/main.nf.test.snap index c4a64afc..38a5dc6d 100644 --- a/modules/local/sra_ids_to_runinfo/tests/main.nf.test.snap +++ b/modules/local/sra_ids_to_runinfo/tests/main.nf.test.snap @@ -24,7 +24,7 @@ ] } ], - "timestamp": "2026-04-13T15:42:19.072989", + "timestamp": "2026-05-06T16:01:36.028872084", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" diff --git a/modules/local/sra_runinfo_to_ftp/main.nf b/modules/local/sra_runinfo_to_ftp/main.nf index 49828c22..324ffa7b 100644 --- a/modules/local/sra_runinfo_to_ftp/main.nf +++ b/modules/local/sra_runinfo_to_ftp/main.nf @@ -19,4 +19,9 @@ process SRA_RUNINFO_TO_FTP { ${runinfo.join(',')} \\ ${runinfo.toString().tokenize(".")[0]}.runinfo_ftp.tsv """ + + stub: + """ + touch ${runinfo.toString().tokenize(".")[0]}.runinfo_ftp.tsv + """ } diff --git a/modules/local/sra_runinfo_to_ftp/tests/main.nf.test b/modules/local/sra_runinfo_to_ftp/tests/main.nf.test index 39db814a..4a81b136 100644 --- a/modules/local/sra_runinfo_to_ftp/tests/main.nf.test +++ b/modules/local/sra_runinfo_to_ftp/tests/main.nf.test @@ -21,4 +21,22 @@ nextflow_process { ) } } + + test("Should run without failures - stub") { + options '-stub' + + when { + process { + """ + input[0] = file(params.pipelines_testdata_base_path + 'tsv/SRR13191702.runinfo.tsv', checkIfExists: true) + """ + } + } + + then { + assertAll( + { assert process.success } + ) + } + } } diff --git a/modules/local/sra_runinfo_to_ftp/tests/main.nf.test.snap b/modules/local/sra_runinfo_to_ftp/tests/main.nf.test.snap index f9cfee1f..d019854e 100644 --- a/modules/local/sra_runinfo_to_ftp/tests/main.nf.test.snap +++ b/modules/local/sra_runinfo_to_ftp/tests/main.nf.test.snap @@ -24,7 +24,7 @@ ] } ], - "timestamp": "2026-04-13T15:42:31.518986", + "timestamp": "2026-05-06T16:02:10.236064039", "meta": { "nf-test": "0.9.5", "nextflow": "25.10.4" diff --git a/modules/local/sra_to_samplesheet/tests/main.nf.test b/modules/local/sra_to_samplesheet/tests/main.nf.test index ed765158..4fc5f135 100644 --- a/modules/local/sra_to_samplesheet/tests/main.nf.test +++ b/modules/local/sra_to_samplesheet/tests/main.nf.test @@ -24,4 +24,5 @@ nextflow_process { ) } } + } diff --git a/modules/local/sra_to_samplesheet/tests/main.nf.test.snap b/modules/local/sra_to_samplesheet/tests/main.nf.test.snap index 568f3ea7..33e8847d 100644 --- a/modules/local/sra_to_samplesheet/tests/main.nf.test.snap +++ b/modules/local/sra_to_samplesheet/tests/main.nf.test.snap @@ -108,10 +108,10 @@ ] } ], + "timestamp": "2024-02-28T11:51:38.244046", "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" - }, - "timestamp": "2024-02-28T11:51:38.244046" + } } } \ No newline at end of file diff --git a/workflows/fetchngs.nf b/workflows/fetchngs.nf index e7f1f117..8577510d 100644 --- a/workflows/fetchngs.nf +++ b/workflows/fetchngs.nf @@ -60,6 +60,7 @@ workflow FETCHNGS { SRA_RUNINFO_TO_FTP .out .tsv + .filter { it.size() > 0 } .splitCsv(header:true, sep:'\t') .map { meta ->