-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SHAPEIT5_SWITCH
Migrate to nf-test (#7066)
* Migrate to nf-test * Remove md5sum * Update nf-test datasets --------- Co-authored-by: LouisLeNezet <louislenezet@gmaio.com>
- Loading branch information
1 parent
30e4a82
commit 175e642
Showing
9 changed files
with
209 additions
and
84 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
nextflow_process { | ||
|
||
name "Test Process SHAPEIT5_SWITCH" | ||
script "../main.nf" | ||
process "SHAPEIT5_SWITCH" | ||
|
||
tag "modules" | ||
tag "modules_nfcore" | ||
tag "shapeit5" | ||
tag "shapeit5/switch" | ||
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] = SHAPEIT5_PHASECOMMON.out.phased_variant | ||
.join(BCFTOOLS_INDEX.out.csi) | ||
.combine(Channel.of("chr22")) | ||
.combine(Channel.of([[]])) | ||
input[1] = Channel.of([[ id:'truth_panel'], | ||
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) | ||
]) | ||
input[2] = Channel.of([[ id:'freq_file'], | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.sites.vcf.gz",checkIfExists:true), | ||
file(params.modules_testdata_base_path + "genomics/homo_sapiens/popgen/1000GP.chr22.sites.vcf.gz.csi",checkIfExists:true) | ||
]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
process.out.errors.collect { meta, txt -> [ meta, txt.collect{ file(it).name } ] }, | ||
process.out.versions | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("homo sapiens - vcf, scaffold, [] - stub") { | ||
options "-stub" | ||
when { | ||
process { | ||
""" | ||
input[0] = Channel.of([ | ||
[id:'truth_panel'], | ||
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), | ||
"chr21", | ||
[] | ||
]) | ||
input[1] = [[], [], []] | ||
input[2] = [[], [], []] | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot(process.out).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
} |
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,86 @@ | ||
{ | ||
"homo sapiens - vcf, scaffold, [] - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "truth_panel" | ||
}, | ||
[ | ||
"truth_panel.block.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.calibration.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.flipsAndSwitches.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.frequency.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.sample.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.sample.typing.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.type.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.variant.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.variant.typing.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
] | ||
], | ||
"1": [ | ||
"versions.yml:md5,95238962a141557f464b8e22c8057211" | ||
], | ||
"errors": [ | ||
[ | ||
{ | ||
"id": "truth_panel" | ||
}, | ||
[ | ||
"truth_panel.block.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.calibration.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.flipsAndSwitches.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.frequency.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.sample.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.sample.typing.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.type.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.variant.switch.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940", | ||
"truth_panel.variant.typing.txt.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,95238962a141557f464b8e22c8057211" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.1" | ||
}, | ||
"timestamp": "2024-11-22T19:04:42.303883153" | ||
}, | ||
"homo sapiens - vcf, scaffold, []": { | ||
"content": [ | ||
[ | ||
[ | ||
{ | ||
"id": "scaffold", | ||
"single_end": false | ||
}, | ||
[ | ||
"scaffold.block.switch.txt.gz", | ||
"scaffold.calibration.switch.txt.gz", | ||
"scaffold.flipsAndSwitches.txt.gz", | ||
"scaffold.frequency.switch.txt.gz", | ||
"scaffold.sample.switch.txt.gz", | ||
"scaffold.sample.typing.txt.gz", | ||
"scaffold.type.switch.txt.gz", | ||
"scaffold.variant.switch.txt.gz", | ||
"scaffold.variant.typing.txt.gz" | ||
] | ||
] | ||
], | ||
[ | ||
"versions.yml:md5,95238962a141557f464b8e22c8057211" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.2", | ||
"nextflow": "24.10.1" | ||
}, | ||
"timestamp": "2024-11-22T19:13:32.038870261" | ||
} | ||
} |
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.