Mercurial > repos > kkonganti > cfsan_cronology
comparison 0.1.0/modules/mlst/main.nf @ 0:c8597e9e1a97
"planemo upload"
author | kkonganti |
---|---|
date | Mon, 27 Nov 2023 12:37:44 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c8597e9e1a97 |
---|---|
1 process MLST { | |
2 tag "$meta.id" | |
3 label 'process_micro' | |
4 | |
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}mlst${params.fs}2.23.0" : null) | |
6 conda (params.enable_conda ? "conda-forge::perl bioconda::mlst=2.23.0" : null) | |
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
8 'https://depot.galaxyproject.org/singularity/mlst:2.23.0--hdfd78af_1' : | |
9 'quay.io/biocontainers/mlst:2.23.0--hdfd78af_1' }" | |
10 | |
11 input: | |
12 tuple val(meta), path(fasta), path(datadir) | |
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}") + (task.index ?: '') | |
24 def label = (params.mlst_label ? "--label '${prefix}'" : '') | |
25 args += (datadir ? " --datadir '.' " : '') | |
26 """ | |
27 mlst \\ | |
28 --threads $task.cpus \\ | |
29 $label \\ | |
30 $args \\ | |
31 $fasta > ${prefix}.tsv | |
32 | |
33 cat <<-END_VERSIONS > versions.yml | |
34 "${task.process}": | |
35 mlst: \$( echo \$(mlst --version 2>&1) | sed 's/mlst //' ) | |
36 END_VERSIONS | |
37 """ | |
38 | |
39 } |