Mercurial > repos > kkonganti > cfsan_centriflaken
comparison 0.4.0/modules/flye/assemble/main.nf @ 101:ce6d9548fe89
"planemo upload"
author | kkonganti |
---|---|
date | Thu, 04 Aug 2022 10:45:55 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
100:9d9537c907bd | 101:ce6d9548fe89 |
---|---|
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.8" : null) | |
7 conda (params.enable_conda ? "bioconda::flye=2.8.1" : null) | |
8 container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? | |
9 'https://depot.galaxyproject.org/singularity/flye:2.8.1--py37h8270d21_1' : | |
10 'quay.io/biocontainers/flye:2.8.1--py37h8270d21_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 } |