-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap verifybamid2 to nf-test (#6824)
* Swap verifybamid2 to nf-test * Update snapshots * Remove empty md5sum --------- Co-authored-by: Adam Talbot <[email protected]>
- Loading branch information
1 parent
64eef62
commit af27a50
Showing
7 changed files
with
245 additions
and
127 deletions.
There are no files selected for viewing
98 changes: 98 additions & 0 deletions
98
modules/nf-core/verifybamid/verifybamid2/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,98 @@ | ||
nextflow_process { | ||
|
||
name "Test Process VERIFYBAMID_VERIFYBAMID2" | ||
script "../main.nf" | ||
process "VERIFYBAMID_VERIFYBAMID2" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "verifybamid" | ||
tag "verifybamid/verifybamid2" | ||
|
||
test("Should run with SVD input") { | ||
config "./nextflow.config" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam'), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai') ] | ||
input[1] = [ file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.UD'), | ||
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.mu'), | ||
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.bed') ] | ||
input[2] = [] | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta') | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
} | ||
|
||
test("Should run with RefVCF input") { | ||
config "./nextflow.config" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam'), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai') ] | ||
input[1] = [ [], [], [] ] | ||
input[2] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf') | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta') | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.log[0][1]).name, | ||
process.out.bed, | ||
process.out.mu, | ||
process.out.self_sm, | ||
process.out.ancestry, | ||
process.out.versions, | ||
file(process.out.ud[0][1]).name | ||
).match() } | ||
) | ||
} | ||
} | ||
|
||
test("Should run with panel input") { | ||
config "./nextflow.config" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ [ id:'test', single_end:false ], | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam'), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/bam/test.paired_end.sorted.bam.bai') ] | ||
input[1] = [ file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.UD'), | ||
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.mu'), | ||
file(params.modules_testdata_base_path + 'delete_me/verifybamid/test.genome.vcf.bed') ] | ||
input[2] = [] | ||
input[3] = file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta') | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
file(process.out.log[0][1]).name, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
} | ||
} |
142 changes: 142 additions & 0 deletions
142
modules/nf-core/verifybamid/verifybamid2/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,142 @@ | ||
{ | ||
"Should run with panel input": { | ||
"content": [ | ||
"test.log", | ||
[ | ||
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-10-22T13:02:25.962766167" | ||
}, | ||
"Should run with SVD input": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.log:md5,32a9811d143450f9f5b99c21b6ecff61" | ||
] | ||
], | ||
"1": [ | ||
|
||
], | ||
"2": [ | ||
|
||
], | ||
"3": [ | ||
|
||
], | ||
"4": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"result.selfSM:md5,9a10860a7e79e393c773aa801ec9f84a" | ||
] | ||
], | ||
"5": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"result.Ancestry:md5,fe39ad1aced7cbb1eb21a74332389ad2" | ||
] | ||
], | ||
"6": [ | ||
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1" | ||
], | ||
"ancestry": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"result.Ancestry:md5,fe39ad1aced7cbb1eb21a74332389ad2" | ||
] | ||
], | ||
"bed": [ | ||
|
||
], | ||
"log": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.log:md5,32a9811d143450f9f5b99c21b6ecff61" | ||
] | ||
], | ||
"mu": [ | ||
|
||
], | ||
"self_sm": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"result.selfSM:md5,9a10860a7e79e393c773aa801ec9f84a" | ||
] | ||
], | ||
"ud": [ | ||
|
||
], | ||
"versions": [ | ||
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.1", | ||
"nextflow": "24.10.0" | ||
}, | ||
"timestamp": "2024-11-05T20:51:39.853534509" | ||
}, | ||
"Should run with RefVCF input": { | ||
"content": [ | ||
"test.log", | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.genome.vcf.bed:md5,47106c764019ee359b1936410e2efa1e" | ||
] | ||
], | ||
[ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false | ||
}, | ||
"test.genome.vcf.mu:md5,0810db02af2a176fa5ddc0f404911b66" | ||
] | ||
], | ||
[ | ||
|
||
], | ||
[ | ||
|
||
], | ||
[ | ||
"versions.yml:md5,199f2e02b570926d6a249055c917c6b1" | ||
], | ||
"test.genome.vcf.UD" | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.1" | ||
}, | ||
"timestamp": "2024-11-20T13:43:20.984216864" | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
modules/nf-core/verifybamid/verifybamid2/tests/nextflow.config
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: 'VERIFYBAMID_VERIFYBAMID2' { | ||
ext.args = '--DisableSanityCheck' | ||
} | ||
} |
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.
34 changes: 0 additions & 34 deletions
34
tests/modules/nf-core/verifybamid/verifybamid2/nextflow.config
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.