mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
f434d0c671
* feat added stubs to picard_liftovervcf * feat adding stubs to gatk4_mergevcfs * feat adding stubs to gatk4_filtermutectcalls * fix tests * fix output name filtermutectcalls * fix test * fix added missing [ * Update tests/modules/gatk4/mergevcfs/test.yml Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Update tests/modules/gatk4/filtermutectcalls/test.yml Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Update tests/modules/picard/liftovervcf/test.yml Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Update modules/gatk4/filtermutectcalls/main.nf Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Update modules/gatk4/filtermutectcalls/main.nf Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Update modules/gatk4/mergevcfs/main.nf Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Update modules/gatk4/mergevcfs/main.nf Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Update modules/picard/liftovervcf/main.nf Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * Trying something on picard_liftovervcf * fix adding test data for stubs * fix added bracket and unindented workflow * fix picard 2.27.1 -> 2.27.0 to solve PaddingError * Update main.nf fix added tbi to stub Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Co-authored-by: Matthieu Muffato <mm49@sanger.ac.uk>
59 lines
1.8 KiB
Text
59 lines
1.8 KiB
Text
process GATK4_MERGEVCFS {
|
|
tag "$meta.id"
|
|
label 'process_medium'
|
|
|
|
conda (params.enable_conda ? "bioconda::gatk4=4.2.6.1" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/gatk4:4.2.6.1--hdfd78af_0':
|
|
'quay.io/biocontainers/gatk4:4.2.6.1--hdfd78af_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(vcf)
|
|
path dict
|
|
|
|
output:
|
|
tuple val(meta), path('*.vcf.gz'), emit: vcf
|
|
tuple val(meta), path("*.tbi") , emit: tbi
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
def input_list = vcf.collect{ "--INPUT $it"}.join(' ')
|
|
def reference_command = dict ? "--SEQUENCE_DICTIONARY $dict" : ""
|
|
|
|
def avail_mem = 3
|
|
if (!task.memory) {
|
|
log.info '[GATK MergeVcfs] Available memory not known - defaulting to 3GB. Specify process memory requirements to change this.'
|
|
} else {
|
|
avail_mem = task.memory.giga
|
|
}
|
|
"""
|
|
gatk --java-options "-Xmx${avail_mem}g" MergeVcfs \\
|
|
$input_list \\
|
|
--OUTPUT ${prefix}.vcf.gz \\
|
|
$reference_command \\
|
|
--TMP_DIR . \\
|
|
$args
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
|
END_VERSIONS
|
|
"""
|
|
|
|
stub:
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
"""
|
|
touch ${prefix}.vcf.gz
|
|
touch ${prefix}.vcf.gz.tbi
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
gatk4: \$(echo \$(gatk --version 2>&1) | sed 's/^.*(GATK) v//; s/ .*\$//')
|
|
END_VERSIONS
|
|
"""
|
|
}
|