|
0
|
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 } |