-
Notifications
You must be signed in to change notification settings - Fork 734
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SHAPEIT5_SWITCH
Migrate to nf-test
#7066
Merged
+209
−84
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
40ab615
Migrate to nf-test
7ede135
Remove md5sum
04471e3
Merge branch 'master' into shapeit5_switch
LouisLeNezet 8030855
Merge branch 'master' into shapeit5_switch
LouisLeNezet 886fc0e
Merge branch 'master' into shapeit5_switch
LouisLeNezet d5f2c20
Merge branch 'master' into shapeit5_switch
LouisLeNezet 4932c5b
Merge branch 'master' into shapeit5_switch
LouisLeNezet 218b8e8
Update nf-test datasets
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,104 @@ | ||
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 + "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", | ||
]) | ||
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("chr21")) | ||
.combine(Channel.of([[]])) | ||
input[1] = Channel.of([[ id:'truth_panel'], | ||
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) | ||
]) | ||
input[2] = Channel.of([[ id:'freq_file'], | ||
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.sites.vcf.gz",checkIfExists:true), | ||
file(params.modules_testdata_base_path + "delete_me/glimpse/1000GP.chr21.noNA12878.s.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 + "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", | ||
[] | ||
]) | ||
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please do something with this dataset on the test-data repository, rather than leave it in the delete_me folder? You've got multiple modules here using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're totally right.
I'll discuss it in the dedicated slack channel and update this pull request when done !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those files are also present on the
phaseimpute
branch of the test-datasets repository.Should I use these files ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure that also works