annotate 0.3.0/modules/seqsero2/main.nf @ 94:ca861be31596

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