Mercurial > repos > kkonganti > cfsan_bettercallsal
annotate 0.7.0/modules/mlst/main.nf @ 17:0e7a0053e4a6
planemo upload
author | kkonganti |
---|---|
date | Mon, 15 Jul 2024 10:42:02 -0400 |
parents | |
children |
rev | line source |
---|---|
kkonganti@17 | 1 process MLST { |
kkonganti@17 | 2 tag "$meta.id" |
kkonganti@17 | 3 label 'process_micro' |
kkonganti@17 | 4 |
kkonganti@17 | 5 module (params.enable_module ? "${params.swmodulepath}${params.fs}mlst${params.fs}2.23.0" : null) |
kkonganti@17 | 6 conda (params.enable_conda ? "conda-forge::perl bioconda::mlst=2.23.0" : null) |
kkonganti@17 | 7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? |
kkonganti@17 | 8 'https://depot.galaxyproject.org/singularity/mlst:2.23.0--hdfd78af_1' : |
kkonganti@17 | 9 'quay.io/biocontainers/mlst:2.23.0--hdfd78af_1' }" |
kkonganti@17 | 10 |
kkonganti@17 | 11 input: |
kkonganti@17 | 12 tuple val(meta), path(fasta) |
kkonganti@17 | 13 |
kkonganti@17 | 14 output: |
kkonganti@17 | 15 tuple val(meta), path("*.tsv"), emit: tsv |
kkonganti@17 | 16 path "versions.yml" , emit: versions |
kkonganti@17 | 17 |
kkonganti@17 | 18 when: |
kkonganti@17 | 19 (task.ext.when == null || task.ext.when) && fasta.size() > 0 |
kkonganti@17 | 20 |
kkonganti@17 | 21 script: |
kkonganti@17 | 22 def args = task.ext.args ?: '' |
kkonganti@17 | 23 def prefix = task.ext.prefix ?: "${meta.id}" |
kkonganti@17 | 24 """ |
kkonganti@17 | 25 mlst \\ |
kkonganti@17 | 26 --threads $task.cpus \\ |
kkonganti@17 | 27 --label $prefix \\ |
kkonganti@17 | 28 $args \\ |
kkonganti@17 | 29 $fasta > ${prefix}.tsv |
kkonganti@17 | 30 |
kkonganti@17 | 31 cat <<-END_VERSIONS > versions.yml |
kkonganti@17 | 32 "${task.process}": |
kkonganti@17 | 33 mlst: \$( echo \$(mlst --version 2>&1) | sed 's/mlst //' ) |
kkonganti@17 | 34 END_VERSIONS |
kkonganti@17 | 35 """ |
kkonganti@17 | 36 |
kkonganti@17 | 37 } |