mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
e3e61068c1
* add module for seroba * fix lint * Update modules/seroba/run/meta.yml Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk> * Update modules/seroba/run/main.nf Co-authored-by: Sébastien Guizard <sguizard@ed.ac.uk>
39 lines
1.2 KiB
Text
39 lines
1.2 KiB
Text
process SEROBA_RUN {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::seroba=1.0.2" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/seroba:1.0.2--pyhdfd78af_1':
|
|
'quay.io/biocontainers/seroba:1.0.2--pyhdfd78af_1' }"
|
|
|
|
input:
|
|
tuple val(meta), path(reads)
|
|
|
|
output:
|
|
tuple val(meta), path("${prefix}/${prefix}.tsv") , emit: tsv
|
|
tuple val(meta), path("${prefix}/detailed_serogroup_info.txt"), optional: true, emit: txt
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
|
"""
|
|
seroba \\
|
|
runSerotyping \\
|
|
$reads \\
|
|
$prefix \\
|
|
$args
|
|
|
|
# Avoid name collisions
|
|
mv ${prefix}/pred.tsv ${prefix}/${prefix}.tsv
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
seroba: \$(seroba version)
|
|
END_VERSIONS
|
|
"""
|
|
}
|