Allow compressed input for prodigal (#1200)

* Allow compressed input for prodigal

* use pigz instead of gzip

* fix typo
This commit is contained in:
Antonia Schuster 2022-01-28 09:05:30 +01:00 committed by GitHub
parent 08db860938
commit a45e030166
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 18 deletions

View file

@ -2,10 +2,10 @@ process PRODIGAL {
tag "$meta.id" tag "$meta.id"
label 'process_low' label 'process_low'
conda (params.enable_conda ? "bioconda::prodigal=2.6.3" : null) conda (params.enable_conda ? "prodigal=2.6.3 pigz=2.6" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/prodigal:2.6.3--h516909a_2' : 'https://depot.galaxyproject.org/singularity/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' :
'quay.io/biocontainers/prodigal:2.6.3--h516909a_2' }" 'quay.io/biocontainers/mulled-v2-2e442ba7b07bfa102b9cf8fac6221263cd746ab8:57f05cfa73f769d6ed6d54144cb3aa2a6a6b17e0-0' }"
input: input:
tuple val(meta), path(genome) tuple val(meta), path(genome)
@ -16,13 +16,13 @@ process PRODIGAL {
tuple val(meta), path("${prefix}.fna"), emit: nucleotide_fasta tuple val(meta), path("${prefix}.fna"), emit: nucleotide_fasta
tuple val(meta), path("${prefix}.faa"), emit: amino_acid_fasta tuple val(meta), path("${prefix}.faa"), emit: amino_acid_fasta
tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations tuple val(meta), path("${prefix}_all.txt"), emit: all_gene_annotations
path "versions.yml" , emit: versions path "versions.yml", emit: versions
script: script:
def args = task.ext.args ?: '' def args = task.ext.args ?: ''
prefix = task.ext.prefix ?: "${meta.id}" prefix = task.ext.prefix ?: "${meta.id}"
""" """
prodigal -i "${genome}" \\ pigz -cdf ${genome} | prodigal \\
$args \\ $args \\
-f $output_format \\ -f $output_format \\
-d "${prefix}.fna" \\ -d "${prefix}.fna" \\
@ -33,6 +33,7 @@ process PRODIGAL {
cat <<-END_VERSIONS > versions.yml cat <<-END_VERSIONS > versions.yml
"${task.process}": "${task.process}":
prodigal: \$(prodigal -v 2>&1 | sed -n 's/Prodigal V\\(.*\\):.*/\\1/p') prodigal: \$(prodigal -v 2>&1 | sed -n 's/Prodigal V\\(.*\\):.*/\\1/p')
pigz: \$(pigz -V 2>&1 | sed 's/pigz //g')
END_VERSIONS END_VERSIONS
""" """
} }

View file

@ -5,10 +5,10 @@ keywords:
tools: tools:
- prodigal: - prodigal:
description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program description: Prodigal (Prokaryotic Dynamic Programming Genefinding Algorithm) is a microbial (bacterial and archaeal) gene finding program
homepage: {} homepage: {https://github.com/hyattpd/Prodigal}
documentation: {} documentation: {https://github.com/hyattpd/prodigal/wiki}
tool_dev_url: {} tool_dev_url: {}
doi: "" doi: "10.1186/1471-2105-11-119"
licence: ["GPL v3"] licence: ["GPL v3"]
input: input:
@ -17,10 +17,12 @@ input:
description: | description: |
Groovy Map containing sample information Groovy Map containing sample information
e.g. [ id:'test', single_end:false ] e.g. [ id:'test', single_end:false ]
- bam: - genome:
type: file type: file
description: BAM/CRAM/SAM file description: fasta/fasta.gz file
pattern: "*.{bam,cram,sam}" - output_format:
type: string
description: Output format ("gbk"/"gff"/"sqn"/"sco")
output: output:
- meta: - meta:
@ -32,10 +34,22 @@ output:
type: file type: file
description: File containing software versions description: File containing software versions
pattern: "versions.yml" pattern: "versions.yml"
- bam: - nucleotide_fasta:
type: file type: file
description: Sorted BAM/CRAM/SAM file description: nucleotide sequences file
pattern: "*.{bam,cram,sam}" pattern: "*.{fna}"
- amino_acid_fasta:
type: file
description: protein translations file
pattern: "*.{faa}"
- all_gene_annotations:
type: file
description: complete starts file
pattern: "*.{_all.txt}"
- gene_annotations:
type: file
description: gene annotations in output_format given as input
pattern: "*.{output_format}"
authors: authors:
- "@grst" - "@grst"