comparison 1.0.0/modules/flye/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 FLYE_ASSEMBLE {
2 tag "$meta.id"
3 label 'process_medium'
4
5 module (params.enable_module ? "${params.swmodulepath}${params.fs}flye${params.fs}2.9.4" : null)
6 conda (params.enable_conda ? "conda-forge::libgcc-ng bioconda::flye=2.9.4" : null)
7 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
8 'https://depot.galaxyproject.org/singularity/flye:2.9.4--py310h2b6aa90_0' :
9 'quay.io/biocontainers/flye:2.9.4--py310h2b6aa90_0' }"
10
11 input:
12 tuple val(meta), path(reads)
13
14 output:
15 path "${meta.id}${params.fs}*"
16 tuple val(meta), path("${meta.id}${params.fs}assembly.fasta"), emit: assembly, optional: true
17 path "versions.yml" , emit: versions
18
19 when:
20 task.ext.when == null || task.ext.when
21
22 script:
23 def args = task.ext.args ?: ''
24 """
25 reads_platform=\$( echo "$args" | grep -E -o '(--nano|--pacbio)-(raw|corr|hq|hifi)' )
26 flye \\
27 \$(echo "$args" | sed -e "s/\$reads_platform//") \\
28 -t $task.cpus \\
29 --out-dir "${meta.id}" \\
30 \$reads_platform \\
31 $reads
32
33 cat <<-END_VERSIONS > versions.yml
34 "${task.process}":
35 flye: \$( flye --version )
36 END_VERSIONS
37
38 grepver=""
39
40 if [ "${workflow.containerEngine}" != "null" ]; then
41 grepver=\$( grep --help 2>&1 | sed -e '1!d; s/ (.*\$//' )
42 else
43 grepver=\$( echo \$( grep --version 2>&1 ) | sed 's/^.*(GNU grep) //; s/ Copyright.*\$//' )
44 fi
45
46 cat <<-END_VERSIONS >> versions.yml
47 grep: \$grepver
48 END_VERSIONS
49 """
50 }