annotate 0.1.0/modules/top_unique_serovars/main.nf @ 5:6e5ceea33843

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