Mercurial > repos > kkonganti > cfsan_centriflaken
comparison 0.4.2/modules/mlst/main.nf @ 105:52045ea4679d
"planemo upload"
author | kkonganti |
---|---|
date | Thu, 27 Jun 2024 14:17:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
104:17890124001d | 105:52045ea4679d |
---|---|
1 process MLST { | |
2 tag "$meta.id" | |
3 label 'process_low' | |
4 | |
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}mlst${params.fs}2.19.0" : null) | |
6 conda (params.enable_conda ? "bioconda::mlst=2.19.0" : null) | |
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
8 'https://depot.galaxyproject.org/singularity/mlst:2.19.0--hdfd78af_1' : | |
9 'quay.io/biocontainers/mlst:2.19.0--hdfd78af_1' }" | |
10 | |
11 input: | |
12 tuple val(meta), path(fasta) | |
13 | |
14 output: | |
15 tuple val(meta), path("*.tsv"), emit: tsv | |
16 path "versions.yml" , emit: versions | |
17 | |
18 when: | |
19 (task.ext.when == null || task.ext.when) && fasta.size() > 0 | |
20 | |
21 script: | |
22 def args = task.ext.args ?: '' | |
23 def prefix = task.ext.prefix ?: "${meta.id}" | |
24 """ | |
25 mlst \\ | |
26 --threads $task.cpus \\ | |
27 $args \\ | |
28 $fasta > ${prefix}.tsv | |
29 | |
30 cat <<-END_VERSIONS > versions.yml | |
31 "${task.process}": | |
32 mlst: \$( echo \$(mlst --version 2>&1) | sed 's/mlst //' ) | |
33 END_VERSIONS | |
34 """ | |
35 | |
36 } |