mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 05:43:08 +00:00
3eff67f54d
* added new module snpsift/split * added options.args * added .vcf.gz to input * removed test and updated to new NF DSL2 syntax * Updated to new NF DSL2 syntax * added option to join vcf files Co-authored-by: Robert A. Petit III <robbie.petit@gmail.com> Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
48 lines
1.3 KiB
Text
48 lines
1.3 KiB
Text
process SNPSIFT_SPLIT {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::snpsift=4.3.1t" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/snpsift:4.3.1t--hdfd78af_3' :
|
|
'quay.io/biocontainers/snpsift:4.3.1t--hdfd78af_3' }"
|
|
|
|
input:
|
|
tuple val(meta), path(vcf)
|
|
|
|
output:
|
|
tuple val(meta), path("*.vcf"), emit: out_vcfs
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
if (meta.split) {
|
|
"""
|
|
SnpSift \\
|
|
split \\
|
|
$args \\
|
|
$vcf
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
snpsift: \$( echo \$(SnpSift split -h 2>&1) | sed 's/^.*version //' | sed 's/(.*//' | sed 's/t//g' )
|
|
END_VERSIONS
|
|
"""
|
|
} else {
|
|
"""
|
|
SnpSift \\
|
|
split \\
|
|
-j \\
|
|
$args \\
|
|
$vcf \\
|
|
> ${prefix}.joined.vcf
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
snpsift: \$( echo \$(SnpSift split -h 2>&1) | sed 's/^.*version //' | sed 's/(.*//' | sed 's/t//g' )
|
|
END_VERSIONS
|
|
"""
|
|
}
|
|
|
|
}
|