nf-core_modules/modules/rhocall/annotate/main.nf

52 lines
1.4 KiB
Text
Raw Normal View History

2022-06-07 10:14:40 +00:00
process RHOCALL_ANNOTATE {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::rhocall=0.5.1" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
2022-06-07 12:37:03 +00:00
'https://depot.galaxyproject.org/singularity/rhocall:0.5.1--py39hbf8eff0_0':
'quay.io/biocontainers/rhocall:0.5.1--py39hbf8eff0_0' }"
2022-06-07 10:14:40 +00:00
input:
2022-06-07 12:37:03 +00:00
tuple val(meta), path(vcf), path(tbi)
tuple val(meta), path(roh)
path bed
2022-06-07 10:14:40 +00:00
output:
2022-06-07 12:37:03 +00:00
tuple val(meta), path("*_rhocall.vcf"), emit: vcf
path "versions.yml" , emit: versions
2022-06-07 10:14:40 +00:00
when:
task.ext.when == null || task.ext.when
script:
2022-06-07 12:37:03 +00:00
def args = task.ext.args ?: ''
2022-06-07 10:14:40 +00:00
def prefix = task.ext.prefix ?: "${meta.id}"
2022-06-07 12:37:03 +00:00
def az_bed = bed ? "-b ${bed}" : ''
2022-06-07 10:14:40 +00:00
"""
2022-06-07 12:37:03 +00:00
rhocall \\
annotate \\
2022-06-07 10:14:40 +00:00
$args \\
2022-06-07 12:37:03 +00:00
$az_bed \\
-r $roh \\
-o ${prefix}_rhocall.vcf \\
$vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
2022-06-07 12:43:35 +00:00
rhocall: \$(echo \$(rhocall --version 2>&1) | sed 's/rhocall, version //' )
2022-06-07 12:37:03 +00:00
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}_rhocall.vcf
2022-06-07 10:14:40 +00:00
cat <<-END_VERSIONS > versions.yml
"${task.process}":
2022-06-07 12:43:35 +00:00
rhocall: \$(echo \$(rhocall --version 2>&1) | sed 's/rhocall, version //' )
2022-06-07 10:14:40 +00:00
END_VERSIONS
"""
}