Skip to content
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

Add par_regions_bed input to DeepVariant #6022

Merged
merged 3 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/nf-core/deepvariant/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ process DEEPVARIANT {
tuple val(meta2), path(fasta)
tuple val(meta3), path(fai)
tuple val(meta4), path(gzi)
tuple val(meta5), path(par_bed)
SPPearce marked this conversation as resolved.
Show resolved Hide resolved

output:
tuple val(meta), path("${prefix}.vcf.gz") , emit: vcf
Expand All @@ -31,6 +32,7 @@ process DEEPVARIANT {
def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
def regions = intervals ? "--regions=${intervals}" : ""
def par_regions = par_bed ? "--par_regions_bed=${par_bed}" : ""
// WARN https://github.com/nf-core/modules/pull/5801#issuecomment-2194293755
// FIXME Revert this on next version bump
def VERSION = '1.6.1'
Expand All @@ -43,6 +45,7 @@ process DEEPVARIANT {
--output_gvcf=${prefix}.g.vcf.gz \\
${args} \\
${regions} \\
${par_regions} \\
--intermediate_results_dir=tmp \\
--num_shards=${task.cpus}

Expand Down
48 changes: 48 additions & 0 deletions modules/nf-core/deepvariant/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ nextflow_process {
input[3] = [
[],[]
]
input[4] = [
[],[]
]
"""
}
}
Expand Down Expand Up @@ -66,6 +69,48 @@ nextflow_process {
input[3] = [
[],[]
]
input[4] = [
[],[]
]
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

test("homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed") {
config "./nextflow-non-autosomal-calling.config"
tag "test"
when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/illumina/cram/test.paired_end.sorted.cram.crai', checkIfExists: true),
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.bed', checkIfExists: true)
]
input[1] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta', checkIfExists: true)
]
input[2] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.fai', checkIfExists: true)
]
input[3] = [
[],[]
]
input[4] = [
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.blacklist_intervals.bed', checkIfExists: true)
]
"""
}
}
Expand Down Expand Up @@ -102,6 +147,9 @@ nextflow_process {
[ id:'genome'],
file(params.modules_testdata_base_path + '/genomics/homo_sapiens/genome/genome.fasta.gz.gzi', checkIfExists: true)
]
input[4] = [
[],[]
]
"""
}
}
Expand Down
91 changes: 90 additions & 1 deletion modules/nf-core/deepvariant/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,94 @@
"nextflow": "24.04.2"
},
"timestamp": "2024-07-01T12:09:13.952808655"
},
"homo_sapiens - [cram, crai, genome_bed] - fasta - fai - par_bed": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c"
]
],
"1": [
[
{
"id": "test",
"single_end": false
},
"test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3"
]
],
"2": [
[
{
"id": "test",
"single_end": false
},
"test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a"
]
],
"3": [
[
{
"id": "test",
"single_end": false
},
"test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2"
]
],
"4": [
"versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8"
],
"gvcf": [
[
{
"id": "test",
"single_end": false
},
"test_out.g.vcf.gz:md5,4fcaa9a8b55730d191382160c2b5bb0a"
]
],
"gvcf_tbi": [
[
{
"id": "test",
"single_end": false
},
"test_out.g.vcf.gz.tbi:md5,f468e846904733b3231ecf00ef7cd4a2"
]
],
"vcf": [
[
{
"id": "test",
"single_end": false
},
"test_out.vcf.gz:md5,d2e26d65dbbcea9b087ed191b5c9841c"
]
],
"vcf_tbi": [
[
{
"id": "test",
"single_end": false
},
"test_out.vcf.gz.tbi:md5,0801296d0356415bbf1ef8deb4ec84c3"
]
],
"versions": [
"versions.yml:md5,efbdcb1ad96e0209b31bcafedd0017a8"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.3"
},
"timestamp": "2024-07-23T14:29:24.939680679"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
process {

withName: DEEPVARIANT {
ext.args = '--model_type=WGS --haploid_contigs chr22'
ext.prefix = { "${meta.id}_out" }
}

}
Loading