annotate 0.4.0/modules/seqsero2/main.nf @ 101:ce6d9548fe89

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