2021-03-23 09:51:23 +00:00
|
|
|
process PROKKA {
|
|
|
|
tag "$meta.id"
|
2021-03-24 04:54:52 +00:00
|
|
|
label 'process_low'
|
2021-03-23 09:51:23 +00:00
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::prokka=1.14.6" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-09-28 00:34:23 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/prokka%3A1.14.6--pl5321hdfd78af_4' :
|
|
|
|
'quay.io/biocontainers/prokka:1.14.6--pl5321hdfd78af_4' }"
|
2021-03-23 09:51:23 +00:00
|
|
|
|
|
|
|
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
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-03-23 09:51:23 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-03-23 09:51:23 +00:00
|
|
|
script:
|
2021-12-07 14:00:43 +00:00
|
|
|
def args = task.ext.args ?: ''
|
|
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
2021-03-23 09:51:23 +00:00
|
|
|
def proteins_opt = proteins ? "--proteins ${proteins[0]}" : ""
|
2022-07-04 13:04:59 +00:00
|
|
|
def prodigal_tf = prodigal_tf ? "--prodigaltf ${prodigal_tf[0]}" : ""
|
2021-03-23 09:51:23 +00:00
|
|
|
"""
|
|
|
|
prokka \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-03-23 09:51:23 +00:00
|
|
|
--cpus $task.cpus \\
|
|
|
|
--prefix $prefix \\
|
|
|
|
$proteins_opt \\
|
|
|
|
$prodigal_tf \\
|
|
|
|
$fasta
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
prokka: \$(echo \$(prokka --version 2>&1) | sed 's/^.*prokka //')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-03-23 09:51:23 +00:00
|
|
|
"""
|
|
|
|
}
|