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.
Glimpse2 splitreference: Change python test to nf-test (nf-core#5076)
* Glimpse2 splitreference: Change python test to nf-test * Update modules/nf-core/glimpse2/splitreference/tests/main.nf.test Co-authored-by: Maxime U Garcia <[email protected]> * Update modules/nf-core/glimpse2/splitreference/tests/main.nf.test Co-authored-by: Maxime U Garcia <[email protected]> * Update modules/nf-core/glimpse2/splitreference/tests/main.nf.test Co-authored-by: Maxime U Garcia <[email protected]> * Update main.nf.test * Update modules/nf-core/glimpse2/splitreference/tests/nextflow.config Co-authored-by: Maxime U Garcia <[email protected]> * Update modules/nf-core/glimpse2/splitreference/tests/main.nf.test Co-authored-by: Maxime U Garcia <[email protected]> * Update modules/nf-core/glimpse2/splitreference/tests/main.nf.test Co-authored-by: Maxime U Garcia <[email protected]> * Update modules/nf-core/glimpse2/splitreference/meta.yml Co-authored-by: Matthias Hörtenhuber <[email protected]> * Update snapshot with version file --------- Co-authored-by: LouisLeNezet <[email protected]> Co-authored-by: Maxime U Garcia <[email protected]> Co-authored-by: Matthias Hörtenhuber <[email protected]>
- Loading branch information
1 parent
5154596
commit fa12139
Showing
8 changed files
with
97 additions
and
49 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
70 changes: 70 additions & 0 deletions
70
modules/nf-core/glimpse2/splitreference/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,70 @@ | ||
nextflow_process { | ||
|
||
name "Test Process GLIMPSE2_SPLITREFERENCE" | ||
script "../main.nf" | ||
config "./nextflow.config" | ||
|
||
process "GLIMPSE2_SPLITREFERENCE" | ||
|
||
tag "modules_nfcore" | ||
tag "modules" | ||
tag "glimpse2" | ||
tag "glimpse2/splitreference" | ||
|
||
test("Should run without map") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'ref1000GP', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), | ||
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), | ||
"chr21:16600000-16800000", | ||
"chr21:16600000-16800000" | ||
] | ||
input[1]= [[ id:'map'],[]] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
// File has a timestamp in it and is in binary format, so we can only check the name | ||
{ assert file(process.out.bin_ref[0][1]).name == "ref1000GP_chr21_16600000_16800000.bin" }, | ||
{ assert snapshot(process.out.version).match()} | ||
) | ||
} | ||
|
||
} | ||
|
||
test("Should run with map") { | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'ref1000GP', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf", checkIfExists: true), | ||
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.bcf.csi", checkIfExists: true), | ||
"chr21:16600000-16800000", | ||
"chr21:16600000-16800000" | ||
] | ||
input[1]= [[ id:'map'], file(params.modules_testdata_base_path + "delete_me/glimpse/chr21.b38.gmap.gz", checkIfExists: true)] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
// File has a timestamp in it and is in binary format, so we can only check the name | ||
{ assert file(process.out.bin_ref[0][1]).name == "ref1000GP_chr21_16600000_16800000.bin" }, | ||
{ assert snapshot(process.out.version).match()} | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
modules/nf-core/glimpse2/splitreference/tests/main.nf.test.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 @@ | ||
glimpse2/splitreference: | ||
- modules/nf-core/glimpse2/splitreference/** |
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.