annotate 0.6.1/modules/top_unique_serovars/main.nf @ 14:b0a37e88ecb5

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