kkonganti@101: process SEQSERO2 { kkonganti@101: tag "$meta.id" kkonganti@101: label 'process_low' kkonganti@101: kkonganti@101: module (params.enable_module ? "${params.swmodulepath}${params.fs}seqsero2${params.fs}1.2.1" : null) kkonganti@101: conda (params.enable_conda ? "bioconda::seqsero2=1.2.1" : null) kkonganti@101: container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? kkonganti@101: 'https://depot.galaxyproject.org/singularity/seqsero2:1.2.1--py_0' : kkonganti@101: 'quay.io/biocontainers/seqsero2:1.2.1--py_0' }" kkonganti@101: kkonganti@101: input: kkonganti@101: tuple val(meta), path(reads_or_asm) kkonganti@101: kkonganti@101: output: kkonganti@101: path("${meta.id}${params.fs}*") kkonganti@101: tuple val(meta), path("${meta.id}${params.fs}*_result.tsv"), emit: serotyped kkonganti@101: path "versions.yml" , emit: versions kkonganti@101: kkonganti@101: when: kkonganti@101: (task.ext.when == null || task.ext.when) && reads_or_asm.size() > 0 kkonganti@101: kkonganti@101: script: kkonganti@101: def args = task.ext.args ?: '' kkonganti@101: def prefix = task.ext.prefix ?: "${meta.id}" kkonganti@101: """ kkonganti@101: SeqSero2_package.py \\ kkonganti@101: $args \\ kkonganti@101: -d $prefix \\ kkonganti@101: -n $prefix \\ kkonganti@101: -p $task.cpus \\ kkonganti@101: -i $reads_or_asm kkonganti@101: kkonganti@101: mv ${prefix}${params.fs}SeqSero_log.txt ${prefix}${params.fs}${prefix}.SeqSero_log.txt kkonganti@101: mv ${prefix}${params.fs}SeqSero_result.txt ${prefix}${params.fs}${prefix}.SeqSero_result.txt kkonganti@101: mv ${prefix}${params.fs}SeqSero_result.tsv ${prefix}${params.fs}${prefix}.SeqSero_result.tsv kkonganti@101: kkonganti@101: cat <<-END_VERSIONS > versions.yml kkonganti@101: "${task.process}": kkonganti@101: seqsero2: \$( echo \$( SeqSero2_package.py --version 2>&1) | sed 's/^.*SeqSero2_package.py //' ) kkonganti@101: END_VERSIONS kkonganti@101: """ kkonganti@101: }