nf-core_modules/modules/cnvpytor/callcnvs/main.nf
Ramprasad Neethiraj 67c1bc9568
Add stubs to cnvpytor module (#1473)
* callcnvs stub and tests

* partition stub and test

* histogram stub and test

* importreaddepth stub and tests

* update module scripts

Co-authored-by: Sima Rahimi <sima.rahimi@gu.se>
2022-04-01 17:35:15 +02:00

44 lines
1.2 KiB
Text

process CNVPYTOR_CALLCNVS {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::cnvpytor=1.0" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/cnvpytor:1.0--py39h6a678da_2':
'quay.io/biocontainers/cnvpytor:1.0--py39h6a678da_2' }"
input:
tuple val(meta), path(pytor)
output:
tuple val(meta), path("*.tsv"), emit: cnvs
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: '1000'
def prefix = task.ext.prefix ?: "${meta.id}"
"""
cnvpytor \\
-root $pytor \\
-call $args > ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
cnvpytor: \$(echo \$(cnvpytor --version 2>&1) | sed 's/^.*pyCNVnator //; s/Using.*\$//' ))
END_VERSIONS
"""
}