-
Notifications
You must be signed in to change notification settings - Fork 713
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 gatk4/splitintervals (#6302)
* Added nf-test for gatk4/splitintervals * Added stub test
- Loading branch information
Showing
7 changed files
with
233 additions
and
90 deletions.
There are no files selected for viewing
109 changes: 109 additions & 0 deletions
109
modules/nf-core/gatk4/splitintervals/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,109 @@ | ||
|
||
nextflow_process { | ||
|
||
name "Test Process GATK4_SPLITINTERVALS" | ||
script "../main.nf" | ||
process "GATK4_SPLITINTERVALS" | ||
config "./nextflow.config" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "gatk4" | ||
tag "gatk4/splitintervals" | ||
|
||
test("test-gatk4-splitintervals-bed") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.multi_intervals.bed', 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).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test-gatk4-splitintervals-intervals") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.interval_list', 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).match() } | ||
) | ||
} | ||
} | ||
|
||
test("test-gatk4-splitintervals-intervals-stub") { | ||
|
||
options '-stub' | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], // meta map | ||
file(params.modules_testdata_base_path + 'genomics/homo_sapiens/genome/genome.interval_list', 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).match() } | ||
) | ||
} | ||
} | ||
|
||
} |
119 changes: 119 additions & 0 deletions
119
modules/nf-core/gatk4/splitintervals/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,119 @@ | ||
{ | ||
"test-gatk4-splitintervals-intervals": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"0000-scattered.interval_list:md5,ebd6b34a335efc6732ff541936c6d2d5", | ||
"0001-scattered.interval_list:md5,9459b0e124fa84ec1e64ac4615bc9af7" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,384addd364fb36fdac7593eba22fcdb7" | ||
], | ||
"split_intervals": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"0000-scattered.interval_list:md5,ebd6b34a335efc6732ff541936c6d2d5", | ||
"0001-scattered.interval_list:md5,9459b0e124fa84ec1e64ac4615bc9af7" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,384addd364fb36fdac7593eba22fcdb7" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T11:06:41.633105" | ||
}, | ||
"test-gatk4-splitintervals-bed": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"0000-scattered.interval_list:md5,c8d6b19e7a92535b6ce9608eae558faa", | ||
"0001-scattered.interval_list:md5,b1877ad96aec308906594c50ebbe3ded" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,384addd364fb36fdac7593eba22fcdb7" | ||
], | ||
"split_intervals": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"0000-scattered.interval_list:md5,c8d6b19e7a92535b6ce9608eae558faa", | ||
"0001-scattered.interval_list:md5,b1877ad96aec308906594c50ebbe3ded" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,384addd364fb36fdac7593eba22fcdb7" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-26T11:06:28.504041" | ||
}, | ||
"test-gatk4-splitintervals-intervals-stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"0000-scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"0001-scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,384addd364fb36fdac7593eba22fcdb7" | ||
], | ||
"split_intervals": [ | ||
[ | ||
{ | ||
"id": "test" | ||
}, | ||
[ | ||
"0000-scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e", | ||
"0001-scattered.interval_list:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,384addd364fb36fdac7593eba22fcdb7" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.8.4", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-08-27T10:56:46.243594" | ||
} | ||
} |
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: GATK4_SPLITINTERVALS { | ||
ext.args = "--scatter-count 2" | ||
} | ||
} |
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.
This file was deleted.
Oops, something went wrong.