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