Mercurial > repos > kkonganti > cfsan_bettercallsal
comparison 0.7.0/modules/megahit/assemble/main.nf @ 17:0e7a0053e4a6
planemo upload
author | kkonganti |
---|---|
date | Mon, 15 Jul 2024 10:42:02 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
16:b90e5a7a3d4f | 17:0e7a0053e4a6 |
---|---|
1 process MEGAHIT_ASSEMBLE { | |
2 tag "$meta.id" | |
3 label 'process_micro' | |
4 | |
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}megahit${params.fs}1.2.9" : null) | |
6 conda (params.enable_conda ? "conda-forge::python bioconda::megahit=1.2.9" : null) | |
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
8 'https://depot.galaxyproject.org/singularity/megahit:1.2.9--h2e03b76_1' : | |
9 'quay.io/biocontainers/megahit:1.2.9--h2e03b76_1' }" | |
10 | |
11 input: | |
12 tuple val(meta), path(reads) | |
13 | |
14 output: | |
15 tuple val(meta), path("${meta.id}${params.fs}${meta.id}.contigs.fa"), emit: assembly, optional: true | |
16 path "versions.yml" , emit: versions | |
17 | |
18 when: | |
19 task.ext.when == null || task.ext.when | |
20 | |
21 script: | |
22 def args = task.ext.args ?: '' | |
23 def prefix = task.ext.prefix ?: "${meta.id}" | |
24 def maxmem = task.memory ? "--memory ${task.memory.toBytes()}" : "" | |
25 if (meta.single_end) { | |
26 """ | |
27 megahit \\ | |
28 -r ${reads} \\ | |
29 -t $task.cpus \\ | |
30 $maxmem \\ | |
31 $args \\ | |
32 --out-dir $prefix \\ | |
33 --out-prefix $prefix | |
34 | |
35 cat <<-END_VERSIONS > versions.yml | |
36 "${task.process}": | |
37 megahit: \$(echo \$(megahit -v 2>&1) | sed 's/MEGAHIT v//') | |
38 END_VERSIONS | |
39 """ | |
40 } else { | |
41 """ | |
42 megahit \\ | |
43 -1 ${reads[0]} \\ | |
44 -2 ${reads[1]} \\ | |
45 -t $task.cpus \\ | |
46 $maxmem \\ | |
47 $args \\ | |
48 --out-dir $prefix \\ | |
49 --out-prefix $prefix | |
50 | |
51 cat <<-END_VERSIONS > versions.yml | |
52 "${task.process}": | |
53 megahit: \$(echo \$(megahit -v 2>&1) | sed 's/MEGAHIT v//') | |
54 END_VERSIONS | |
55 """ | |
56 } | |
57 } |