comparison 0.2.0/modules/mash/paste/main.nf @ 11:a5f31c44f8c9

planemo upload
author kkonganti
date Mon, 15 Jul 2024 16:11:44 -0400
parents
children
comparison
equal deleted inserted replaced
10:ddf7a172bf30 11:a5f31c44f8c9
1 process MASH_PASTE {
2 tag "${meta.id}"
3 label 'process_low'
4
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}mash${params.fs}2.3" : null)
6 conda (params.enable_conda ? "conda-forge::capnproto conda-forge::gsl bioconda::mash=2.3" : null)
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8 'https://depot.galaxyproject.org/singularity/mash:2.3--he348c14_1':
9 'quay.io/biocontainers/mash:2.3--he348c14_1' }"
10
11 input:
12 tuple val(meta), path(sketch)
13
14 output:
15 tuple val(meta), path("*.msh") , emit: sketch
16 tuple val(meta), path("*_mash_sketch.status"), emit: stats
17 path "versions.yml" , emit: versions
18
19 when:
20 task.ext.when == null || task.ext.when
21
22 script:
23 def args = task.ext.args ?: ''
24 def prefix = task.ext.prefix ?: "${meta.id}"
25 def sketches = (sketch ? sketch.collect().join('\\n') : null)
26 """
27 echo -e "$sketches" > paste_these.txt
28
29 mash \\
30 paste \\
31 "msh.k${params.mashsketch_k}.${params.mashsketch_s}h.${prefix}" \\
32 -l paste_these.txt \\
33 2> ${prefix}_mash_sketch.status
34
35 cat <<-END_VERSIONS > versions.yml
36 "${task.process}":
37 mash: \$( mash --version )
38 bash: \$( bash --version 2>&1 | sed '1!d; s/^.*version //; s/ (.*\$//' )
39 END_VERSIONS
40 """
41 }