annotate 0.6.1/modules/index_metadata/main.nf @ 11:749faef1caa9

"planemo upload"
author kkonganti
date Tue, 05 Sep 2023 11:51:40 -0400
parents
children
rev   line source
kkonganti@11 1 process INDEX_METADATA {
kkonganti@11 2 tag "get_top_unique_mash_hit_genomes.py"
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(type), path(sero_tbl)
kkonganti@11 13
kkonganti@11 14 output:
kkonganti@11 15 path '*.ACC2SERO.pickle', emit: acc2sero
kkonganti@11 16 path 'versions.yml' , emit: versions
kkonganti@11 17
kkonganti@11 18 when:
kkonganti@11 19 task.ext.when == null || task.ext.when
kkonganti@11 20
kkonganti@11 21 script:
kkonganti@11 22 def args = task.ext.args ?: ''
kkonganti@11 23 def prefix = (
kkonganti@11 24 type.find(/_comp/) \
kkonganti@11 25 ? type.replaceAll(/\_comp/, 'per_comp_serotype') \
kkonganti@11 26 : type.replaceAll(/\_snp/, 'per_snp_cluster')
kkonganti@11 27 )
kkonganti@11 28 """
kkonganti@11 29 get_top_unique_mash_hit_genomes.py \\
kkonganti@11 30 -s $sero_tbl -op $prefix
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 }