mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 19:18:17 +00:00
6702d2e145
* Add daa2info * Add right flag in the config * Fix config * Apply suggestions from code review Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com> Co-authored-by: Jose Espinosa-Carrasco <kadomu@gmail.com>
38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
process MEGAN_DAA2INFO {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::megan=6.21.7" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/megan:6.21.7--h9ee0642_0':
|
|
'quay.io/biocontainers/megan:6.21.7--h9ee0642_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(daa)
|
|
val(megan_summary)
|
|
|
|
output:
|
|
tuple val(meta), path("*.txt.gz") , emit: txt_gz
|
|
tuple val(meta), path("*.megan"), optional: true, emit: megan
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
def summary = megan_summary ? "-es ${prefix}.megan" : ""
|
|
"""
|
|
daa2info \\
|
|
-i ${daa} \\
|
|
-o ${prefix}.txt.gz \\
|
|
${summary} \\
|
|
$args
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
megan: \$(echo \$(rma2info 2>&1) | grep version | sed 's/.*version //g;s/, built.*//g')
|
|
END_VERSIONS
|
|
"""
|
|
}
|