2021-03-24 05:07:29 +00:00
|
|
|
process STRELKA_GERMLINE {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_high'
|
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::strelka=2.9.10" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/strelka:2.9.10--0' :
|
|
|
|
'quay.io/biocontainers/strelka:2.9.10--0' }"
|
2021-03-24 05:07:29 +00:00
|
|
|
|
|
|
|
input:
|
2021-10-29 11:01:05 +00:00
|
|
|
tuple val(meta), path(input), path(input_index)
|
2021-03-24 09:53:41 +00:00
|
|
|
path fasta
|
|
|
|
path fai
|
|
|
|
path target_bed
|
2021-10-27 14:14:52 +00:00
|
|
|
path target_bed_tbi
|
|
|
|
|
2021-03-24 05:07:29 +00:00
|
|
|
output:
|
2021-07-01 15:13:01 +00:00
|
|
|
tuple val(meta), path("*variants.vcf.gz") , emit: vcf
|
|
|
|
tuple val(meta), path("*variants.vcf.gz.tbi"), emit: vcf_tbi
|
|
|
|
tuple val(meta), path("*genome.vcf.gz") , emit: genome_vcf
|
|
|
|
tuple val(meta), path("*genome.vcf.gz.tbi") , emit: genome_vcf_tbi
|
2021-10-27 14:14:52 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-03-24 05:07:29 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-03-24 05:07:29 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-12-02 12:39:55 +00:00
|
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
2021-10-27 14:14:52 +00:00
|
|
|
def regions = target_bed ? "--exome --callRegions ${target_bed}" : ""
|
2021-03-24 05:07:29 +00:00
|
|
|
"""
|
2021-03-24 09:53:41 +00:00
|
|
|
configureStrelkaGermlineWorkflow.py \\
|
2021-10-29 11:01:05 +00:00
|
|
|
--bam $input \\
|
2021-03-24 09:53:41 +00:00
|
|
|
--referenceFasta $fasta \\
|
2021-07-01 15:13:01 +00:00
|
|
|
$regions \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-03-24 05:07:29 +00:00
|
|
|
--runDir strelka
|
2021-03-24 09:53:41 +00:00
|
|
|
|
|
|
|
python strelka/runWorkflow.py -m local -j $task.cpus
|
2021-07-01 15:13:01 +00:00
|
|
|
mv strelka/results/variants/genome.*.vcf.gz ${prefix}.genome.vcf.gz
|
|
|
|
mv strelka/results/variants/genome.*.vcf.gz.tbi ${prefix}.genome.vcf.gz.tbi
|
|
|
|
mv strelka/results/variants/variants.vcf.gz ${prefix}.variants.vcf.gz
|
|
|
|
mv strelka/results/variants/variants.vcf.gz.tbi ${prefix}.variants.vcf.gz.tbi
|
2021-03-24 09:53:41 +00:00
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
strelka: \$( configureStrelkaGermlineWorkflow.py --version )
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-03-24 05:07:29 +00:00
|
|
|
"""
|
|
|
|
}
|