nf-core_modules/modules/prokka/main.nf
Robert A. Petit III ec22f9a907
[bug] pin bioperl version in Prokka module (#1307)
* [bug]  pin bioperl version in Prokka module

* Update main.nf

* Update main.nf

Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
Co-authored-by: Matthieu Muffato <mm49@sanger.ac.uk>
2022-09-28 01:34:23 +01:00

52 lines
1.8 KiB
Text

process PROKKA {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::prokka=1.14.6" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/prokka%3A1.14.6--pl5321hdfd78af_4' :
'quay.io/biocontainers/prokka:1.14.6--pl5321hdfd78af_4' }"
input:
tuple val(meta), path(fasta)
path proteins
path prodigal_tf
output:
tuple val(meta), path("${prefix}/*.gff"), emit: gff
tuple val(meta), path("${prefix}/*.gbk"), emit: gbk
tuple val(meta), path("${prefix}/*.fna"), emit: fna
tuple val(meta), path("${prefix}/*.faa"), emit: faa
tuple val(meta), path("${prefix}/*.ffn"), emit: ffn
tuple val(meta), path("${prefix}/*.sqn"), emit: sqn
tuple val(meta), path("${prefix}/*.fsa"), emit: fsa
tuple val(meta), path("${prefix}/*.tbl"), emit: tbl
tuple val(meta), path("${prefix}/*.err"), emit: err
tuple val(meta), path("${prefix}/*.log"), emit: log
tuple val(meta), path("${prefix}/*.txt"), emit: txt
tuple val(meta), path("${prefix}/*.tsv"), emit: tsv
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}"
def proteins_opt = proteins ? "--proteins ${proteins[0]}" : ""
def prodigal_tf = prodigal_tf ? "--prodigaltf ${prodigal_tf[0]}" : ""
"""
prokka \\
$args \\
--cpus $task.cpus \\
--prefix $prefix \\
$proteins_opt \\
$prodigal_tf \\
$fasta
cat <<-END_VERSIONS > versions.yml
"${task.process}":
prokka: \$(echo \$(prokka --version 2>&1) | sed 's/^.*prokka //')
END_VERSIONS
"""
}