-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add found_in tag to call repeat expansions (#445)
- Loading branch information
Showing
10 changed files
with
302 additions
and
27 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
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
99 changes: 99 additions & 0 deletions
99
subworkflows/local/call_repeat_expansions/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,99 @@ | ||
nextflow_workflow { | ||
|
||
name "Test Workflow CALL_REPEAT_EXPANSIONS" | ||
script "../main.nf" | ||
config "./nextflow.config" | ||
workflow "CALL_REPEAT_EXPANSIONS" | ||
|
||
setup { | ||
run("GUNZIP") { | ||
script "../../../../modules/nf-core/gunzip/main.nf" | ||
process { | ||
""" | ||
input[0] = [ | ||
[ id:'test' ], | ||
file(params.pipelines_testdata_base_path + 'reference/hg38.test.fa.gz', checkIfExists: true) | ||
] | ||
""" | ||
} | ||
|
||
} | ||
|
||
run("SAMTOOLS_FAIDX") { | ||
script "../../../../modules/nf-core/samtools/faidx/main.nf" | ||
process { | ||
""" | ||
input[0] = GUNZIP.out.gunzip | ||
input[1] = [[],[]] | ||
""" | ||
} | ||
|
||
} | ||
} | ||
|
||
test("[bam, bai], fasta, fai, bed") { | ||
|
||
when { | ||
workflow { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test', single_end:false, project: 'project', sex: 1 ], // meta map | ||
file(params.pipelines_testdata_base_path + 'testdata/HG002_PacBio_Revio.bam', checkIfExists: true), | ||
file(params.pipelines_testdata_base_path + 'testdata/HG002_PacBio_Revio.bam.bai', checkIfExists: true) | ||
]) | ||
input[1] = GUNZIP.out.gunzip | ||
input[2] = SAMTOOLS_FAIDX.out.fai | ||
input[3] = Channel.of([ | ||
[ id: 'pathogenic_repeats' ], | ||
file(params.pipelines_testdata_base_path + 'reference/pathogenic_repeats.hg38.bed') | ||
]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert workflow.out.sample_bai.get(0).get(1).endsWith(".bai") }, | ||
{ assert snapshot( | ||
path(workflow.out.sample_vcf.get(0).get(1)).vcf.variantsMD5, | ||
path(workflow.out.project_vcf.get(0).get(1)).vcf.variantsMD5, | ||
bam(workflow.out.sample_bam.get(0).get(1), stringency: 'silent').getReadsMD5(), | ||
workflow.out.versions, | ||
).match() } | ||
) | ||
} | ||
|
||
} | ||
|
||
test("[bam, bai], fasta, fai, bed - stub") { | ||
|
||
options "-stub" | ||
|
||
when { | ||
workflow { | ||
""" | ||
input[0] = Channel.of([ | ||
[ id:'test', single_end:false, project: 'project', sex: 1 ], // meta map | ||
file(params.pipelines_testdata_base_path + 'testdata/HG002_PacBio_Revio.bam', checkIfExists: true), | ||
file(params.pipelines_testdata_base_path + 'testdata/HG002_PacBio_Revio.bam.bai', checkIfExists: true) | ||
]) | ||
input[1] = GUNZIP.out.gunzip | ||
input[2] = SAMTOOLS_FAIDX.out.fai | ||
input[3] = Channel.of([ | ||
[ id: 'pathogenic_repeats' ], | ||
file(params.pipelines_testdata_base_path + 'reference/pathogenic_repeats.hg38.bed') | ||
]) | ||
""" | ||
} | ||
} | ||
|
||
then { | ||
assertAll( | ||
{ assert workflow.success }, | ||
{ assert snapshot(workflow.out).match() } | ||
) | ||
} | ||
|
||
} | ||
} |
128 changes: 128 additions & 0 deletions
128
subworkflows/local/call_repeat_expansions/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,128 @@ | ||
{ | ||
"[bam, bai], fasta, fai, bed": { | ||
"content": [ | ||
"502b7befd528ce70b8269a8e4b9281df", | ||
"1de84bd070a82b37e6fac25d19ae604e", | ||
"65999ab8f2bc7841de8172468bf23ab6", | ||
[ | ||
"versions.yml:md5,52272b464e62cb9e5d41622ea76cd070", | ||
"versions.yml:md5,6576546ea5cf2a0cb6438b4c6758fd1e", | ||
"versions.yml:md5,799b136592e7434ff7eb9ddcc70e7e41", | ||
"versions.yml:md5,8a4b29c3089d4b00cfe6c5c39b88d1ab", | ||
"versions.yml:md5,b9424dde80b33e84164cc956a14aa459" | ||
] | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-10-29T10:47:08.425030144" | ||
}, | ||
"[bam, bai], fasta, fai, bed - stub": { | ||
"content": [ | ||
{ | ||
"0": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"project": "project", | ||
"sex": 1 | ||
}, | ||
"test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"1": [ | ||
[ | ||
{ | ||
"id": "project" | ||
}, | ||
"project.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"2": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"project": "project", | ||
"sex": 1 | ||
}, | ||
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"3": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"project": "project", | ||
"sex": 1 | ||
}, | ||
"test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"4": [ | ||
"versions.yml:md5,52272b464e62cb9e5d41622ea76cd070", | ||
"versions.yml:md5,6576546ea5cf2a0cb6438b4c6758fd1e", | ||
"versions.yml:md5,799b136592e7434ff7eb9ddcc70e7e41", | ||
"versions.yml:md5,8a4b29c3089d4b00cfe6c5c39b88d1ab", | ||
"versions.yml:md5,b9424dde80b33e84164cc956a14aa459" | ||
], | ||
"project_vcf": [ | ||
[ | ||
{ | ||
"id": "project" | ||
}, | ||
"project.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"sample_bai": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"project": "project", | ||
"sex": 1 | ||
}, | ||
"test.bam.bai:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"sample_bam": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"project": "project", | ||
"sex": 1 | ||
}, | ||
"test.bam:md5,d41d8cd98f00b204e9800998ecf8427e" | ||
] | ||
], | ||
"sample_vcf": [ | ||
[ | ||
{ | ||
"id": "test", | ||
"single_end": false, | ||
"project": "project", | ||
"sex": 1 | ||
}, | ||
"test.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940" | ||
] | ||
], | ||
"versions": [ | ||
"versions.yml:md5,52272b464e62cb9e5d41622ea76cd070", | ||
"versions.yml:md5,6576546ea5cf2a0cb6438b4c6758fd1e", | ||
"versions.yml:md5,799b136592e7434ff7eb9ddcc70e7e41", | ||
"versions.yml:md5,8a4b29c3089d4b00cfe6c5c39b88d1ab", | ||
"versions.yml:md5,b9424dde80b33e84164cc956a14aa459" | ||
] | ||
} | ||
], | ||
"meta": { | ||
"nf-test": "0.9.0", | ||
"nextflow": "24.04.4" | ||
}, | ||
"timestamp": "2024-10-30T11:00:04.845039812" | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
subworkflows/local/call_repeat_expansions/tests/nextflow.config
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,11 @@ | ||
process { | ||
withName: 'CALL_REPEAT_EXPANSIONS:BCFTOOLS_MERGE' { | ||
ext.args = '--output-type z --force-single --no-version' | ||
} | ||
withName: 'CALL_REPEAT_EXPANSIONS:BCFTOOLS_SORT_TRGT' { | ||
ext.args = '--output-type z --write-index=tbi' | ||
} | ||
withName: 'CALL_REPEAT_EXPANSIONS:TRGT' { | ||
ext.args = { "--sample-name ${meta.id}" } | ||
} | ||
} |
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
Oops, something went wrong.