2021-03-23 18:03:58 +00:00
|
|
|
process PRODIGAL {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_low'
|
|
|
|
|
|
|
|
conda (params.enable_conda ? "bioconda::prodigal=2.6.3" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/prodigal:2.6.3--h516909a_2' :
|
|
|
|
'quay.io/biocontainers/prodigal:2.6.3--h516909a_2' }"
|
2021-03-23 18:03:58 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(genome)
|
|
|
|
val(output_format)
|
|
|
|
|
|
|
|
output:
|
|
|
|
tuple val(meta), path("${prefix}.${output_format}"), emit: gene_annotations
|
|
|
|
tuple val(meta), path("${prefix}.fna"), emit: nucleotide_fasta
|
|
|
|
tuple val(meta), path("${prefix}.faa"), emit: amino_acid_fasta
|
|
|
|
tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-03-23 18:03:58 +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 18:03:58 +00:00
|
|
|
"""
|
|
|
|
prodigal -i "${genome}" \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-03-23 18:03:58 +00:00
|
|
|
-f $output_format \\
|
|
|
|
-d "${prefix}.fna" \\
|
|
|
|
-o "${prefix}.${output_format}" \\
|
|
|
|
-a "${prefix}.faa" \\
|
|
|
|
-s "${prefix}_all.txt"
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
prodigal: \$(prodigal -v 2>&1 | sed -n 's/Prodigal V\\(.*\\):.*/\\1/p')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-03-23 18:03:58 +00:00
|
|
|
"""
|
|
|
|
}
|