-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
LouisLeNezet
committed
Dec 4, 2024
1 parent
6aed502
commit 08a702c
Showing
10 changed files
with
180 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ channels: | |
- conda-forge | ||
- bioconda | ||
dependencies: | ||
- bioconda::shapeit5=1.0.0 | ||
- bioconda::shapeit5=5.1.1 |
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
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,105 @@ | ||
nextflow_process { | ||
|
||
name "Test Process SHAPEIT5_PHASERARE" | ||
script "../main.nf" | ||
process "SHAPEIT5_PHASERARE" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "shapeit5" | ||
tag "shapeit5/phaserare" | ||
tag "shapeit5/phasecommon" | ||
tag "bcftools/index" | ||
|
||
test("homo sapiens - vcf, scaffold, []") { | ||
config "./nextflow.config" | ||
setup { | ||
run("SHAPEIT5_PHASECOMMON") { | ||
script "../../../shapeit5/phasecommon" | ||
params { | ||
shapeit5_phasecommon_args = "--filter-maf 0.001" | ||
} | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'scaffold', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.vcf.gz", checkIfExists: true), | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.vcf.gz.csi", checkIfExists: true), | ||
[], | ||
"chr22", | ||
]) | ||
input[1] = Channel.of([[],[],[]]) | ||
input[2] = Channel.of([[],[],[]]) | ||
input[3] = Channel.of([[],[]]) | ||
""" | ||
} | ||
} | ||
run("BCFTOOLS_INDEX") { | ||
script "../../../bcftools/index" | ||
process { | ||
""" | ||
input[0] = SHAPEIT5_PHASECOMMON.out.phased_variant | ||
""" | ||
} | ||
} | ||
} | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'input', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.vcf.gz", checkIfExists: true), | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.vcf.gz.csi", checkIfExists: true), | ||
[], | ||
"chr22:16580000-16600000", | ||
]) | ||
input[1] = SHAPEIT5_PHASECOMMON.out.phased_variant | ||
.join(BCFTOOLS_INDEX.out.csi) | ||
.combine(Channel.of("chr22:16570000-16610000")) | ||
input[2] = Channel.of([[],[]]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.phased_variant.collect { meta, vcf -> [ meta, file(vcf).name ] }, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("homo sapiens - vcf, scaffold, [] - stub") { | ||
options "-stub" | ||
|
||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'input', single_end:false ], // meta map | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.vcf.gz", checkIfExists: true), | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.vcf.gz.csi", checkIfExists: true), | ||
[], | ||
"chr22:16580000-16600000", | ||
]) | ||
input[1] = Channel.of([[],[],[],[]]) | ||
input[2] = Channel.of([[],[]]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
58 changes: 58 additions & 0 deletions
58
modules/nf-core/shapeit5/phaserare/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,58 @@ | ||
{ | ||
"homo sapiens - vcf, scaffold, [] - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "input", | ||
"single_end": false | ||
}, | ||
"input.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,c8092f58dd64199400ee9b9bfd96032e" | ||
], | ||
"phased_variant": [ | ||
[ | ||
{ | ||
"id": "input", | ||
"single_end": false | ||
}, | ||
"input.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,c8092f58dd64199400ee9b9bfd96032e" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.1" | ||
}, | ||
"timestamp": "2024-11-22T18:11:56.868657182" | ||
}, | ||
"homo sapiens - vcf, scaffold, []": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "input", | ||
"single_end": false | ||
}, | ||
"input.vcf.gz" | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,c8092f58dd64199400ee9b9bfd96032e" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.1" | ||
}, | ||
"timestamp": "2024-11-22T18:35:35.056441054" | ||
} | ||
} |
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: SHAPEIT5_PHASECOMMON { | ||
ext.args = params.shapeit5_phasecommon_args | ||
} | ||
} |
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.