Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 16 additions & 0 deletions modules/local/aspera_cli/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
}

}
27 changes: 26 additions & 1 deletion modules/local/aspera_cli/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
)
}
}
}
5 changes: 5 additions & 0 deletions modules/local/multiqc_mappings_config/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,9 @@ process MULTIQC_MAPPINGS_CONFIG {
$csv \\
multiqc_config.yml
"""

stub:
"""
touch multiqc_config.yml
"""
}
18 changes: 18 additions & 0 deletions modules/local/multiqc_mappings_config/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
15 changes: 15 additions & 0 deletions modules/local/sra_fastq_ftp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
}
}
24 changes: 24 additions & 0 deletions modules/local/sra_fastq_ftp/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
)
}
}
}
2 changes: 1 addition & 1 deletion modules/local/sra_fastq_ftp/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions modules/local/sra_ids_to_runinfo/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,9 @@ process SRA_IDS_TO_RUNINFO {
${id}.runinfo.tsv \\
$metadata_fields
"""

stub:
"""
touch ${id}.runinfo.tsv
"""
}
19 changes: 19 additions & 0 deletions modules/local/sra_ids_to_runinfo/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
)
}
}
}
2 changes: 1 addition & 1 deletion modules/local/sra_ids_to_runinfo/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions modules/local/sra_runinfo_to_ftp/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have that info if its just a stub?

"""
}
18 changes: 18 additions & 0 deletions modules/local/sra_runinfo_to_ftp/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
)
}
}
}
2 changes: 1 addition & 1 deletion modules/local/sra_runinfo_to_ftp/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions modules/local/sra_to_samplesheet/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ nextflow_process {
)
}
}

}
4 changes: 2 additions & 2 deletions modules/local/sra_to_samplesheet/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
1 change: 1 addition & 0 deletions workflows/fetchngs.nf
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ workflow FETCHNGS {
SRA_RUNINFO_TO_FTP
.out
.tsv
.filter { it.size() > 0 }
.splitCsv(header:true, sep:'\t')
.map {
meta ->
Expand Down
Loading