forked from nf-core/modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap bbmap/align to nf-test and add stub (nf-core#7278)
* Swap bbmap/align to nf-test * Add missing tag
- Loading branch information
Showing
9 changed files
with
282 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
nextflow_process { | ||
|
||
name "Test Process BBMAP_ALIGN" | ||
script "../main.nf" | ||
process "BBMAP_ALIGN" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "bbmap" | ||
tag "bbmap/align" | ||
tag "bbmap/index" | ||
|
||
setup { | ||
run("BBMAP_INDEX") { | ||
script "../../index/main.nf" | ||
process { | ||
""" | ||
input[0] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
""" | ||
} | ||
} | ||
} | ||
|
||
test("paired_end - fasta") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) | ||
] | ||
] | ||
input[1] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assertAll( | ||
{ assert snapshot( | ||
file(process.out.log[0][1]).name, | ||
process.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5()}, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("paired_end - index") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) | ||
] | ||
] | ||
input[1] = BBMAP_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assertAll( | ||
{ assert snapshot( | ||
file(process.out.log[0][1]).name, | ||
process.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5()}, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("single_end - index") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:true ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true) | ||
] | ||
] | ||
input[1] = BBMAP_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assertAll( | ||
{ assert snapshot( | ||
file(process.out.log[0][1]).name, | ||
process.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5()}, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("paired_end - index - pigz") { | ||
config "./nextflow.config" | ||
when { | ||
params { | ||
module_args = 'unpigz=t' | ||
} | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) | ||
] | ||
] | ||
input[1] = BBMAP_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assertAll( | ||
{ assert snapshot( | ||
file(process.out.log[0][1]).name, | ||
process.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5()}, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("paired_end - index - stub") { | ||
options "-stub" | ||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
[ | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_1.fastq.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/fastq/test_2.fastq.gz', checkIfExists: true) | ||
] | ||
] | ||
input[1] = BBMAP_INDEX.out.index | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assert process.success | ||
assertAll( | ||
{ assert snapshot( | ||
file(process.out.log[0][1]).name, | ||
process.out.bam.collect { meta, bamfile -> bam(bamfile).getReadsMD5()}, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"single_end - index": { | ||
"content": [ | ||
"test.bbmap.log", | ||
[ | ||
"c17efa4ccc4e9018090792c71af92660" | ||
], | ||
[ | ||
"versions.yml:md5,7c9a1c72ae9ea9c54b7518e96f8f89bb" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-08T21:06:20.348251263" | ||
}, | ||
"paired_end - index": { | ||
"content": [ | ||
"test.bbmap.log", | ||
[ | ||
"88d78879c34214288644aec7ec3cb270" | ||
], | ||
[ | ||
"versions.yml:md5,7c9a1c72ae9ea9c54b7518e96f8f89bb" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-08T21:06:05.162378558" | ||
}, | ||
"paired_end - fasta": { | ||
"content": [ | ||
"test.bbmap.log", | ||
[ | ||
"88d78879c34214288644aec7ec3cb270" | ||
], | ||
[ | ||
"versions.yml:md5,7c9a1c72ae9ea9c54b7518e96f8f89bb" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-08T21:05:49.658797332" | ||
}, | ||
"paired_end - index - pigz": { | ||
"content": [ | ||
"test.bbmap.log", | ||
[ | ||
"88d78879c34214288644aec7ec3cb270" | ||
], | ||
[ | ||
"versions.yml:md5,7c9a1c72ae9ea9c54b7518e96f8f89bb" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-08T21:06:36.326962674" | ||
}, | ||
"paired_end - index - stub": { | ||
"content": [ | ||
"test.bbmap.log", | ||
[ | ||
"d41d8cd98f00b204e9800998ecf8427e" | ||
], | ||
[ | ||
"versions.yml:md5,7c9a1c72ae9ea9c54b7518e96f8f89bb" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.3" | ||
}, | ||
"timestamp": "2025-01-08T21:06:47.377762689" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
process { | ||
withName: BBMAP_ALIGN { | ||
ext.args = params.module_args | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.