Mercurial > repos > kkonganti > cfsan_centriflaken
diff 0.4.2/modules/flye/assemble/main.nf @ 130:04f6ac8ca13c
planemo upload
author | kkonganti |
---|---|
date | Wed, 03 Jul 2024 15:16:39 -0400 |
parents | 52045ea4679d |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/0.4.2/modules/flye/assemble/main.nf Wed Jul 03 15:16:39 2024 -0400 @@ -0,0 +1,51 @@ +process FLYE_ASSEMBLE { + tag "$meta.id" + label 'process_medium' + // errorStrategy 'ignore' + + module (params.enable_module ? "${params.swmodulepath}${params.fs}flye${params.fs}2.8" : null) + conda (params.enable_conda ? "bioconda::flye=2.8.1" : null) + container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? + 'https://depot.galaxyproject.org/singularity/flye:2.8.1--py37h8270d21_1' : + 'quay.io/biocontainers/flye:2.8.1--py37h8270d21_1' }" + + input: + tuple val(meta), path(reads) + + output: + path "${meta.id}${params.fs}*" + tuple val(meta), path("${meta.id}${params.fs}assembly.fasta"), emit: assembly, optional: true + path "versions.yml" , emit: versions + + when: + task.ext.when == null || task.ext.when + + script: + def args = task.ext.args ?: '' + """ + reads_platform=\$( echo "$args" | grep -E -o '(--nano|--pacbio)-(raw|corr|hq|hifi)' ) + flye \\ + \$(echo "$args" | sed -e "s/\$reads_platform//") \\ + -t $task.cpus \\ + --out-dir "${meta.id}" \\ + \$reads_platform \\ + $reads + + cat <<-END_VERSIONS > versions.yml + "${task.process}": + flye: \$( flye --version ) + END_VERSIONS + + grepver="" + + if [ "${workflow.containerEngine}" != "null" ]; then + grepver=\$( grep --help 2>&1 | sed -e '1!d; s/ (.*\$//' ) + else + grepver=\$( echo \$( grep --version 2>&1 ) | sed 's/^.*(GNU grep) //; s/ Copyright.*\$//' ) + fi + + cat <<-END_VERSIONS >> versions.yml + grep: \$grepver + END_VERSIONS + """ +} \ No newline at end of file