-
Notifications
You must be signed in to change notification settings - Fork 653
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 stub for gatk4/variantfiltration (#5676)
* Added nf-test stub for gatk4/variantfiltration * Update for lint * Update for lint
- Loading branch information
1 parent
63d6994
commit 0040936
Showing
7 changed files
with
119 additions
and
111 deletions.
There are no files selected for viewing
87 changes: 87 additions & 0 deletions
87
modules/nf-core/gatk4/variantfiltration/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,87 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GATK4_VARIANTFILTRATION" | ||
script "../main.nf" | ||
process "GATK4_VARIANTFILTRATION" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gatk4" | ||
tag "gatk4/variantfiltration" | ||
|
||
test("test_gatk4_variantfiltration_vcf_input") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.idx', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id:'genome' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[ id:'genome' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = [ | ||
[ id:'genome' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.versions, | ||
file(process.out.vcf.get(0).get(1)).name, | ||
file(process.out.tbi.get(0).get(1)).name).match() }, | ||
) | ||
} | ||
|
||
} | ||
|
||
test("test_gatk4_variantfiltration_gz_input") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz', checkIfExists: true), | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/illumina/gvcf/test.genome.vcf.gz.tbi', checkIfExists: true) | ||
] | ||
input[1] = [ | ||
[ id:'genome' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true) | ||
] | ||
input[2] = [ | ||
[ id:'genome' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true) | ||
] | ||
input[3] = [ | ||
[ id:'genome' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.dict', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out.versions, | ||
file(process.out.vcf.get(0).get(1)).name, | ||
file(process.out.tbi.get(0).get(1)).name).match() }, | ||
) | ||
} | ||
|
||
} | ||
|
||
} | ||
|
30 changes: 30 additions & 0 deletions
30
modules/nf-core/gatk4/variantfiltration/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,30 @@ | ||
{ | ||
"test_gatk4_variantfiltration_gz_input": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,96943659275ba62de1f0d283a2f6e97b" | ||
], | ||
"test.vcf.gz", | ||
"test.vcf.gz.tbi" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.04.2" | ||
}, | ||
"timestamp": "2024-05-22T22:43:27.609784" | ||
}, | ||
"test_gatk4_variantfiltration_vcf_input": { | ||
"content": [ | ||
[ | ||
"versions.yml:md5,96943659275ba62de1f0d283a2f6e97b" | ||
], | ||
"test.vcf.gz", | ||
"test.vcf.gz.tbi" | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "23.04.2" | ||
}, | ||
"timestamp": "2024-05-22T22:42:55.316294" | ||
} | ||
} |
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,2 @@ | ||
gatk4/variantfiltration: | ||
- "modules/nf-core/gatk4/variantfiltration/**" |
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.
10 changes: 0 additions & 10 deletions
10
tests/modules/nf-core/gatk4/variantfiltration/nextflow.config
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.