Mercurial > repos > galaxytrakr > hfp_centriflaken_awsbatch
comparison 0.4.2/modules/flye/assemble/main.nf @ 0:082e0091e813 draft default tip
planemo upload
| author | galaxytrakr |
|---|---|
| date | Fri, 29 May 2026 13:27:47 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:082e0091e813 |
|---|---|
| 1 process FLYE_ASSEMBLE { | |
| 2 tag "$meta.id" | |
| 3 label 'process_medium' | |
| 4 // errorStrategy 'ignore' | |
| 5 | |
| 6 module (params.enable_module ? "${params.swmodulepath}${params.fs}flye${params.fs}2.9" : null) | |
| 7 conda (params.enable_conda ? "bioconda::flye=2.9.0" : null) | |
| 8 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
| 9 'https://depot.galaxyproject.org/singularity/flye:2.9--py38hf4f3596_1' : | |
| 10 'quay.io/biocontainers/flye:2.9--py38hf4f3596_1' }" | |
| 11 | |
| 12 input: | |
| 13 tuple val(meta), path(reads) | |
| 14 | |
| 15 output: | |
| 16 path "${meta.id}${params.fs}*" | |
| 17 tuple val(meta), path("${meta.id}${params.fs}assembly.fasta"), emit: assembly, optional: true | |
| 18 path "versions.yml" , emit: versions | |
| 19 | |
| 20 when: | |
| 21 task.ext.when == null || task.ext.when | |
| 22 | |
| 23 script: | |
| 24 def args = task.ext.args ?: '' | |
| 25 """ | |
| 26 reads_platform=\$( echo "$args" | grep -E -o '(--nano|--pacbio)-(raw|corr|hq|hifi)' ) | |
| 27 flye \\ | |
| 28 \$(echo "$args" | sed -e "s/\$reads_platform//") \\ | |
| 29 -t $task.cpus \\ | |
| 30 --out-dir "${meta.id}" \\ | |
| 31 \$reads_platform \\ | |
| 32 $reads | |
| 33 | |
| 34 cat <<-END_VERSIONS > versions.yml | |
| 35 "${task.process}": | |
| 36 flye: \$( flye --version ) | |
| 37 END_VERSIONS | |
| 38 | |
| 39 grepver="" | |
| 40 | |
| 41 if [ "${workflow.containerEngine}" != "null" ]; then | |
| 42 grepver=\$( grep --help 2>&1 | sed -e '1!d; s/ (.*\$//' ) | |
| 43 else | |
| 44 grepver=\$( echo \$( grep --version 2>&1 ) | sed 's/^.*(GNU grep) //; s/ Copyright.*\$//' ) | |
| 45 fi | |
| 46 | |
| 47 cat <<-END_VERSIONS >> versions.yml | |
| 48 grep: \$grepver | |
| 49 END_VERSIONS | |
| 50 """ | |
| 51 } |
