Mercurial > repos > kkonganti > cfsan_cronology
comparison 0.1.0/modules/mash/paste/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 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 } |