annotate 0.7.0/modules/top_unique_serovars/main.nf @ 20:133571bf891f

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