nf-core_modules/modules/deepbgc/pipeline/main.nf
James A. Fellows Yates 90aef30f43
Set process label to process_single for modules with no task.cpus usage (#2076)
* Set process label to `process_single` for modules with no `task.cpus` usage

* Fix tests of 'borked' modules

* prettier

* More modules are single-threaded and can use process_single

* Adding process_single to hmmer/esl* modules

* Fix failing tests

* Prettier

Co-authored-by: Matthieu Muffato <mm49@sanger.ac.uk>
Co-authored-by: Daniel Lundin <erik.rikard.daniel@gmail.com>
2022-09-19 11:54:47 +02:00

48 lines
2.4 KiB
Text

process DEEPBGC_PIPELINE {
tag "$meta.id"
label 'process_single'
conda (params.enable_conda ? "bioconda::deepbgc=0.1.30" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/deepbgc:0.1.30--pyhb7b1952_1':
'quay.io/biocontainers/deepbgc:0.1.30--pyhb7b1952_1' }"
input:
tuple val(meta), path(genome)
path(db)
output:
tuple val(meta), path("${genome.baseName}/README.txt") , optional: true, emit: readme
tuple val(meta), path("${genome.baseName}/LOG.txt") , emit: log
tuple val(meta), path("${genome.baseName}/${genome.baseName}.antismash.json") , optional: true, emit: json
tuple val(meta), path("${genome.baseName}/${genome.baseName}.bgc.gbk") , optional: true, emit: bgc_gbk
tuple val(meta), path("${genome.baseName}/${genome.baseName}.bgc.tsv") , optional: true, emit: bgc_tsv
tuple val(meta), path("${genome.baseName}/${genome.baseName}.full.gbk") , optional: true, emit: full_gbk
tuple val(meta), path("${genome.baseName}/${genome.baseName}.pfam.tsv") , optional: true, emit: pfam_tsv
tuple val(meta), path("${genome.baseName}/evaluation/${genome.baseName}.bgc.png") , optional: true, emit: bgc_png
tuple val(meta), path("${genome.baseName}/evaluation/${genome.baseName}.pr.png") , optional: true, emit: pr_png
tuple val(meta), path("${genome.baseName}/evaluation/${genome.baseName}.roc.png") , optional: true, emit: roc_png
tuple val(meta), path("${genome.baseName}/evaluation/${genome.baseName}.score.png") , optional: true, emit: score_png
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}"
"""
export DEEPBGC_DOWNLOADS_DIR=${db}
deepbgc \\
pipeline \\
$args \\
$genome
cat <<-END_VERSIONS > versions.yml
"${task.process}":
deepbgc: \$(echo \$(deepbgc info 2>&1 /dev/null/ | grep 'version' | cut -d " " -f3) )
prodigal: \$(prodigal -v 2>&1 | sed -n 's/Prodigal V\\(.*\\):.*/\\1/p')
END_VERSIONS
"""
}