annotate 0.2.0/modules/rmlst/main.nf @ 11:a5f31c44f8c9

planemo upload
author kkonganti
date Mon, 15 Jul 2024 16:11:44 -0400
parents
children
rev   line source
kkonganti@11 1 process RMLST_POST {
kkonganti@11 2 tag "${meta.id}"
kkonganti@11 3 label "process_pico"
kkonganti@11 4 maxForks 3
kkonganti@11 5
kkonganti@11 6 module (params.enable_module ? "${params.swmodulepath}${params.fs}python${params.fs}3.8.1" : null)
kkonganti@11 7 conda (params.enable_conda ? "conda-forge::python=3.10 conda-forge::requests" : null)
kkonganti@11 8 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
kkonganti@11 9 'https://depot.galaxyproject.org/singularity/requests:2.26.0' :
kkonganti@11 10 'quay.io/biocontainers/requests:2.26.0' }"
kkonganti@11 11
kkonganti@11 12 input:
kkonganti@11 13 tuple val(meta), path(genome)
kkonganti@11 14
kkonganti@11 15 output:
kkonganti@11 16 tuple val(meta), path('*.tsv') , emit: tsv, optional: true
kkonganti@11 17 tuple val(meta), path('*.log.json'), emit: log, 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 prefix = (task.ext.prefix ?: meta.id)
kkonganti@11 25
kkonganti@11 26 """
kkonganti@11 27 rmlst_post.py \\
kkonganti@11 28 -fasta $genome \\
kkonganti@11 29 -prefix $prefix \\
kkonganti@11 30
kkonganti@11 31 cat <<-END_VERSIONS > versions.yml
kkonganti@11 32 "${task.process}":
kkonganti@11 33 python: \$( python --version | sed 's/Python //g' )
kkonganti@11 34 requests: \$( python -c "import requests; print (requests.__version__)" )
kkonganti@11 35 END_VERSIONS
kkonganti@11 36 """
kkonganti@11 37 }