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

"planemo upload"
author kkonganti
date Mon, 27 Jun 2022 15:55:37 -0400
parents
children
line wrap: on
line source
process SEQSERO2 {
    tag "$meta.id"
    label 'process_low'

    module (params.enable_module ? "${params.swmodulepath}${params.fs}seqsero2${params.fs}1.2.1" : null)
    conda (params.enable_conda ? "bioconda::seqsero2=1.2.1" : null)
    container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
        'https://depot.galaxyproject.org/singularity/seqsero2:1.2.1--py_0' :
        'quay.io/biocontainers/seqsero2:1.2.1--py_0' }"

    input:
    tuple val(meta), path(reads_or_asm)

    output:
    path("${meta.id}${params.fs}*")
    tuple val(meta), path("${meta.id}${params.fs}*_result.tsv"), emit: serotyped
    path "versions.yml"                                        , emit: versions

    when:
    (task.ext.when == null || task.ext.when) && reads_or_asm.size() > 0

    script:
    def args = task.ext.args ?: ''
    def prefix = task.ext.prefix ?: "${meta.id}"
    """
    SeqSero2_package.py \\
        $args \\
        -d $prefix \\
        -n $prefix \\
        -p $task.cpus \\
        -i $reads_or_asm

    cat <<-END_VERSIONS > versions.yml
    "${task.process}":
        seqsero2: \$( echo \$( SeqSero2_package.py --version 2>&1) | sed 's/^.*SeqSero2_package.py //' )
    END_VERSIONS
    """
}