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