Mercurial > repos > galaxytrakr > hfp_bettercallsal_konda
comparison 1.0.0/modules/megahit/assemble/main.nf @ 0:0a8dda29956e draft default tip
planemo upload
| author | galaxytrakr |
|---|---|
| date | Thu, 28 May 2026 20:41:10 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:0a8dda29956e |
|---|---|
| 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 } |
