2021-03-23 18:03:58 +00:00
|
|
|
process PRODIGAL {
|
|
|
|
tag "$meta.id"
|
|
|
|
label 'process_low'
|
|
|
|
|
2022-01-28 08:05:30 +00:00
|
|
|
conda (params.enable_conda ? "prodigal=2.6.3 pigz=2.6" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-01-28 08:05:30 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' :
|
|
|
|
'quay.io/biocontainers/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' }"
|
2021-03-23 18:03:58 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
tuple val(meta), path(genome)
|
|
|
|
val(output_format)
|
|
|
|
|
|
|
|
output:
|
2022-01-28 08:05:30 +00:00
|
|
|
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
|
|
|
|
path "versions.yml", emit: versions
|
2021-03-23 18:03:58 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
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
|
|
|
"""
|
2022-01-28 08:05:30 +00:00
|
|
|
pigz -cdf ${genome} | prodigal \\
|
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')
|
2022-01-28 08:05:30 +00:00
|
|
|
pigz: \$(pigz -V 2>&1 | sed 's/pigz //g')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-03-23 18:03:58 +00:00
|
|
|
"""
|
|
|
|
}
|