nf-core_modules/modules/tabix/bgziptabix/main.nf
Ramprasad Neethiraj 49b18b1639
add stub to modules used in raredisease pipeline (#1206)
* add stub section

* add stub for bcftools norm

* add stub to more modules

* fix expansionhunter tests

* revert changes -picard

* Update stub to write version no.s to a file

* add picard

* revert picard again

* add stubs to more modules

* fix bwamem2

* add bcftools view

* add stubs

* fix svdb query

* review suggestions
2022-03-28 17:48:39 +02:00

45 lines
1.3 KiB
Text

process TABIX_BGZIPTABIX {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? 'bioconda::tabix=1.11' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/tabix:1.11--hdfd78af_0' :
'quay.io/biocontainers/tabix:1.11--hdfd78af_0' }"
input:
tuple val(meta), path(input)
output:
tuple val(meta), path("*.gz"), path("*.tbi"), emit: gz_tbi
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def args2 = task.ext.args2 ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
bgzip --threads ${task.cpus} -c $args $input > ${prefix}.gz
tabix $args2 ${prefix}.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.gz
touch ${prefix}.gz.tbi
cat <<-END_VERSIONS > versions.yml
"${task.process}":
tabix: \$(echo \$(tabix -h 2>&1) | sed 's/^.*Version: //; s/ .*\$//')
END_VERSIONS
"""
}