mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Apply suggestions from code review + add support for GFF annotations
This commit is contained in:
parent
6a7aec8b41
commit
24b9c397dd
3 changed files with 25 additions and 14 deletions
|
@ -17,6 +17,7 @@ process ANTISMASH_ANTISMASHLITE {
|
|||
|
||||
input:
|
||||
tuple val(meta), path(sequence_input)
|
||||
path(gff)
|
||||
path(databases)
|
||||
path(antismash_dir) // Optional input: AntiSMASH installation folder. It is not needed for using this module with conda, but required for docker/singularity (see meta.yml).
|
||||
|
||||
|
@ -46,6 +47,12 @@ process ANTISMASH_ANTISMASHLITE {
|
|||
script:
|
||||
def args = task.ext.args ?: ''
|
||||
prefix = task.ext.suffix ? "${meta.id}${task.ext.suffix}" : "${meta.id}"
|
||||
if ( sequence_input.getExtension != 'fasta' && sequence_input.getExtension != 'fna' && gff )
|
||||
log.warn "GFF input to antiSMASH can only be used if FASTA sequence input is supplied. GFF will be ignored for sample ${meta.id}"
|
||||
if ( (sequence_input.getExtension == 'fasta' || sequence_input.getExtension == 'fna') && gff )
|
||||
gff_flag = "--genefinding-gff3 ${gff}"
|
||||
else
|
||||
gff_flag = ""
|
||||
|
||||
"""
|
||||
## We specifically do not include annotations (--genefinding-tool none) as
|
||||
|
@ -57,6 +64,7 @@ process ANTISMASH_ANTISMASHLITE {
|
|||
--genefinding-tool none \\
|
||||
--logfile $prefix/${prefix}.log \\
|
||||
--databases $databases \\
|
||||
$gff_flag \\
|
||||
$sequence_input
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
|
|
|
@ -34,21 +34,24 @@ input:
|
|||
- sequence_input:
|
||||
type: file
|
||||
description: nucleotide sequence file (annotated)
|
||||
pattern: "*.{gbk, gb, gbff, genbank, embl}"
|
||||
pattern: "*.{gbk, gb, gbff, genbank, embl, fasta, fna}"
|
||||
- gff:
|
||||
type: file
|
||||
description: GFF3 file to extract annotated features from (only needed if sequence_input is in FASTA format)
|
||||
pattern: "*.{gff, GFF}"
|
||||
- databases:
|
||||
type: directory
|
||||
description: downloaded antismash databases e.g. data/databases
|
||||
pattern: "*"
|
||||
description: downloaded AntiSMASH databases e.g. data/databases
|
||||
pattern: "*/"
|
||||
- antismash_dir:
|
||||
type: directory
|
||||
description: |
|
||||
antismash installation folder which is being modified during the
|
||||
antiSMASH database downloading step. The modified files are
|
||||
normally downloaded by download-antismash-databases itself, and must be
|
||||
retrieved by the user by manually running the command within antismash-lite.
|
||||
As this folder cannot be modified within the docker and singularity containers,
|
||||
it needs to be mounted (including all modified files from the downloading step)
|
||||
as a workaround.
|
||||
A local copy of an AntiSMASH installation folder. This is required when running with
|
||||
docker and singularity (not required for conda), due to attempted 'modifications' of
|
||||
files during database checks in the installation directory, something that cannot
|
||||
be done in immutable docker/singularity containers. Therefore, a local installation
|
||||
directory needs to be mounted (including all modified files from the downloading step)
|
||||
to the container as a workaround.
|
||||
pattern: "*"
|
||||
|
||||
output:
|
||||
|
@ -87,11 +90,11 @@ output:
|
|||
pattern: "knownclusterblast/*_c*.txt"
|
||||
- svg_files_clusterblast:
|
||||
type: file
|
||||
description: SVG image showing the % identity of the aligned hits against their queries
|
||||
description: SVG images showing the % identity of the aligned hits against their queries
|
||||
pattern: "svg/clusterblast*.svg"
|
||||
- svg_files_knownclusterblast:
|
||||
type: file
|
||||
description: SVG image showing the % identity of the aligned hits against their queries
|
||||
description: SVG images showing the % identity of the aligned hits against their queries
|
||||
pattern: "svg/knownclusterblast*.svg"
|
||||
- gbk_input:
|
||||
type: file
|
||||
|
@ -127,7 +130,7 @@ output:
|
|||
pattern: "knownclusterblastoutput.txt"
|
||||
- json_sideloading:
|
||||
type: file
|
||||
description: Sideloaded annotations of protoclusters and/or subregions (see documentation "Annotation sideloading")
|
||||
description: Sideloaded annotations of protoclusters and/or subregions (see antiSMASH documentation "Annotation sideloading")
|
||||
pattern: "regions.js"
|
||||
|
||||
authors:
|
||||
|
|
|
@ -32,5 +32,5 @@ workflow test_antismashlite {
|
|||
UNTAR2 ( input_antismash_db2 )
|
||||
UNTAR3 ( input_antismash_db3 )
|
||||
ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES ( UNTAR1.out.untar.map{ it[1] }, UNTAR2.out.untar.map{ it[1] }, UNTAR3.out.untar.map{ it[1] } )
|
||||
ANTISMASH_ANTISMASHLITE ( input_genome, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir )
|
||||
ANTISMASH_ANTISMASHLITE ( input_genome, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.database, ANTISMASH_ANTISMASHLITEDOWNLOADDATABASES.out.antismash_dir, [] )
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue