nf-core_modules/modules/meryl/count/main.nf

38 lines
1 KiB
Text
Raw Permalink Normal View History

2022-05-06 15:04:04 +00:00
process MERYL_COUNT {
tag "$meta.id"
label 'process_medium'
conda (params.enable_conda ? "bioconda::meryl=1.3" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/meryl:1.3--h87f3376_1':
'quay.io/biocontainers/meryl:1.3--h87f3376_1' }"
input:
tuple val(meta), path(reads)
output:
2022-05-09 07:58:58 +00:00
tuple val(meta), path("*.meryldb"), emit: meryl_db
path "versions.yml" , emit: versions
2022-05-06 15:04:04 +00:00
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
for READ in $reads; do
meryl count \\
threads=$task.cpus \\
$args \\
$reads \\
2022-05-09 07:58:58 +00:00
output read.\${READ%.f*}.meryldb
2022-05-06 15:04:04 +00:00
done
cat <<-END_VERSIONS > versions.yml
"${task.process}":
meryl: \$( meryl --version |& sed 's/meryl //' )
END_VERSIONS
"""
}