|
0
|
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)
|
|
|
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 --label $prefix \\
|
|
|
28 $args \\
|
|
|
29 $fasta > ${prefix}.tsv
|
|
|
30
|
|
|
31 cat <<-END_VERSIONS > versions.yml
|
|
|
32 "${task.process}":
|
|
|
33 mlst: \$( echo \$(mlst --version 2>&1) | sed 's/mlst //' )
|
|
|
34 END_VERSIONS
|
|
|
35 """
|
|
|
36
|
|
|
37 } |