annotate 0.2.1/modules/seqsero2/main.nf @ 0:77494b0fa3c7

"planemo upload"
author kkonganti
date Mon, 27 Jun 2022 15:55:37 -0400
parents
children
rev   line source
kkonganti@0 1 process SEQSERO2 {
kkonganti@0 2 tag "$meta.id"
kkonganti@0 3 label 'process_low'
kkonganti@0 4
kkonganti@0 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}seqsero2${params.fs}1.2.1" : null)
kkonganti@0 6 conda (params.enable_conda ? "bioconda::seqsero2=1.2.1" : null)
kkonganti@0 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@0 8 'https://depot.galaxyproject.org/singularity/seqsero2:1.2.1--py_0' :
kkonganti@0 9 'quay.io/biocontainers/seqsero2:1.2.1--py_0' }"
kkonganti@0 10
kkonganti@0 11 input:
kkonganti@0 12 tuple val(meta), path(reads_or_asm)
kkonganti@0 13
kkonganti@0 14 output:
kkonganti@0 15 path("${meta.id}${params.fs}*")
kkonganti@0 16 tuple val(meta), path("${meta.id}${params.fs}*_result.tsv"), emit: serotyped
kkonganti@0 17 path "versions.yml" , emit: versions
kkonganti@0 18
kkonganti@0 19 when:
kkonganti@0 20 (task.ext.when == null || task.ext.when) && reads_or_asm.size() > 0
kkonganti@0 21
kkonganti@0 22 script:
kkonganti@0 23 def args = task.ext.args ?: ''
kkonganti@0 24 def prefix = task.ext.prefix ?: "${meta.id}"
kkonganti@0 25 """
kkonganti@0 26 SeqSero2_package.py \\
kkonganti@0 27 $args \\
kkonganti@0 28 -d $prefix \\
kkonganti@0 29 -n $prefix \\
kkonganti@0 30 -p $task.cpus \\
kkonganti@0 31 -i $reads_or_asm
kkonganti@0 32
kkonganti@0 33 cat <<-END_VERSIONS > versions.yml
kkonganti@0 34 "${task.process}":
kkonganti@0 35 seqsero2: \$( echo \$( SeqSero2_package.py --version 2>&1) | sed 's/^.*SeqSero2_package.py //' )
kkonganti@0 36 END_VERSIONS
kkonganti@0 37 """
kkonganti@0 38 }