2021-11-21 12:17:25 +00:00
|
|
|
process BAKTA {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_medium'
|
|
|
|
|
2022-02-17 15:59:31 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::bakta=1.3.1" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-02-17 15:59:31 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/bakta:1.3.1--pyhdfd78af_0' :
|
|
|
|
'quay.io/biocontainers/bakta:1.3.1--pyhdfd78af_0' }"
|
2021-11-21 12:17:25 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(fasta)
|
|
|
|
path db
|
|
|
|
path proteins
|
|
|
|
path prodigal_tf
|
|
|
|
|
|
|
|
output:
|
|
|
|
tuple val(meta), path("${prefix}.embl") , emit: embl
|
|
|
|
tuple val(meta), path("${prefix}.faa") , emit: faa
|
|
|
|
tuple val(meta), path("${prefix}.ffn") , emit: ffn
|
|
|
|
tuple val(meta), path("${prefix}.fna") , emit: fna
|
|
|
|
tuple val(meta), path("${prefix}.gbff") , emit: gbff
|
|
|
|
tuple val(meta), path("${prefix}.gff3") , emit: gff
|
|
|
|
tuple val(meta), path("${prefix}.hypotheticals.tsv"), emit: hypotheticals_tsv
|
|
|
|
tuple val(meta), path("${prefix}.hypotheticals.faa"), emit: hypotheticals_faa
|
|
|
|
tuple val(meta), path("${prefix}.tsv") , emit: tsv
|
2022-02-17 15:59:31 +00:00
|
|
|
tuple val(meta), path("${prefix}.txt") , emit: txt
|
2021-11-21 12:17:25 +00:00
|
|
|
path "versions.yml" , emit: versions
|
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-11-21 12:17:25 +00:00
|
|
|
script:
|
2021-12-07 14:00:43 +00:00
|
|
|
def args = task.ext.args ?: ''
|
|
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
2021-11-21 12:17:25 +00:00
|
|
|
def proteins_opt = proteins ? "--proteins ${proteins[0]}" : ""
|
|
|
|
def prodigal_opt = prodigal_tf ? "--prodigal-tf ${prodigal_tf[0]}" : ""
|
|
|
|
"""
|
|
|
|
bakta \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-11-21 12:17:25 +00:00
|
|
|
--threads $task.cpus \\
|
2021-11-26 07:58:40 +00:00
|
|
|
--prefix $prefix \\
|
2021-11-21 12:17:25 +00:00
|
|
|
--db $db \\
|
|
|
|
$proteins_opt \\
|
|
|
|
$prodigal_tf \\
|
|
|
|
$fasta
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
bakta: \$( echo \$(bakta --version 2>&1) | sed 's/^.*bakta //' )
|
2021-11-21 12:17:25 +00:00
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
|
|
|
|
stub:
|
2021-12-07 14:00:43 +00:00
|
|
|
prefix = task.ext.prefix ?: "${meta.id}"
|
2021-11-21 12:17:25 +00:00
|
|
|
"""
|
|
|
|
touch ${prefix}.embl
|
|
|
|
touch ${prefix}.faa
|
|
|
|
touch ${prefix}.ffn
|
|
|
|
touch ${prefix}.fna
|
|
|
|
touch ${prefix}.gbff
|
|
|
|
touch ${prefix}.gff3
|
|
|
|
touch ${prefix}.hypotheticals.tsv
|
|
|
|
touch ${prefix}.hypotheticals.faa
|
|
|
|
touch ${prefix}.tsv
|
2022-02-17 15:59:31 +00:00
|
|
|
touch ${prefix}.txt
|
2021-11-21 12:17:25 +00:00
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
bakta: \$( echo \$(bakta --version 2>&1) | sed 's/^.*bakta //' )
|
2021-11-21 12:17:25 +00:00
|
|
|
END_VERSIONS
|
|
|
|
"""
|
|
|
|
}
|