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