-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added nf-test for picard/collectwgsmetrics
- Loading branch information
Showing
6 changed files
with
111 additions
and
64 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test
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,83 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process PICARD_COLLECTWGSMETRICS" | ||
script "../main.nf" | ||
process "PICARD_COLLECTWGSMETRICS" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "picard" | ||
tag "picard/collectwgsmetrics" | ||
|
||
test("test-picard-collectwgsmetrics") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam.bai', checkIfExists: true), | ||
] | ||
input[1] = [ | ||
[id:'genome'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[id:'genome'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = [] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.metrics[0][1]).text.contains('coverage high_quality_coverage_count'), | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
test("test-picard-collectwgsmetrics-with-interval") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.paired_end.sorted.bam', checkIfExists: true), | ||
[] | ||
] | ||
input[1] = [ | ||
[id:'genome'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[id:'genome'], | ||
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/picard/baits.interval_list', checkIfExists: true) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.metrics[0][1]).text.contains('coverage high_quality_coverage_count'), | ||
process.out.versions | ||
).match() | ||
} | ||
) | ||
} | ||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
modules/nf-core/picard/collectwgsmetrics/tests/main.nf.test.snap
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,28 @@ | ||
{ | ||
"test-picard-collectwgsmetrics-with-interval": { | ||
"content": [ | ||
true, | ||
[ | ||
"versions.yml:md5,06b5898fb06823b736c90e1dcebe75fe" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-23T11:02:46.301176" | ||
}, | ||
"test-picard-collectwgsmetrics": { | ||
"content": [ | ||
true, | ||
[ | ||
"versions.yml:md5,06b5898fb06823b736c90e1dcebe75fe" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-23T11:02:25.132069" | ||
} | ||
} |
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.
5 changes: 0 additions & 5 deletions
5
tests/modules/nf-core/picard/collectwgsmetrics/nextflow.config
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.