annotate 0.5.0/modules/top_unique_serovars/main.nf @ 1:365849f031fd

"planemo upload"
author kkonganti
date Mon, 05 Jun 2023 18:48:51 -0400
parents
children
rev   line source
kkonganti@1 1 process TOP_UNIQUE_SEROVARS {
kkonganti@1 2 tag "$meta.id"
kkonganti@1 3 label "process_pico"
kkonganti@1 4
kkonganti@1 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
kkonganti@1 6 conda (params.enable_conda ? "conda-forge::python=3.10.4" : null)
kkonganti@1 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@1 8 'https://depot.galaxyproject.org/singularity/python:3.10.4' :
kkonganti@1 9 'quay.io/biocontainers/python:3.10.4' }"
kkonganti@1 10
kkonganti@1 11 input:
kkonganti@1 12 tuple val(meta), path(mash_screen_res)
kkonganti@1 13
kkonganti@1 14 output:
kkonganti@1 15 tuple val(meta), path('*_UNIQUE_HITS.txt') , emit: tsv, optional: true
kkonganti@1 16 tuple val(meta), path('*_UNIQUE_HITS.fna.gz'), emit: genomes_fasta, optional: true
kkonganti@1 17 path'*FAILED.txt' , emit: failed, optional: true
kkonganti@1 18 path 'versions.yml' , emit: versions
kkonganti@1 19
kkonganti@1 20 when:
kkonganti@1 21 task.ext.when == null || task.ext.when
kkonganti@1 22
kkonganti@1 23 script:
kkonganti@1 24 def args = task.ext.args ?: ''
kkonganti@1 25 def prefix = task.ext.prefix ?: "${meta.id}"
kkonganti@1 26 args += (mash_screen_res ? " -m ${mash_screen_res}" : '')
kkonganti@1 27 args += (prefix ? " -op ${prefix}" : '')
kkonganti@1 28 """
kkonganti@1 29 get_top_unique_mash_hit_genomes.py \\
kkonganti@1 30 $args
kkonganti@1 31
kkonganti@1 32 cat <<-END_VERSIONS > versions.yml
kkonganti@1 33 "${task.process}":
kkonganti@1 34 python: \$( python --version | sed 's/Python //g' )
kkonganti@1 35 END_VERSIONS
kkonganti@1 36 """
kkonganti@1 37
kkonganti@1 38 }