diff --git a/modules/local/abricate.nf b/modules/local/abricate.nf index 698f789..da7d44a 100644 --- a/modules/local/abricate.nf +++ b/modules/local/abricate.nf @@ -2,13 +2,14 @@ process ABRICATE { - tag "$meta.id" + tag "${meta.id} ${database}" label 'process_medium' container "${workflow.containerEngine == 'singularity' || workflow.containerEngine == 'apptainer' ? task.ext.parameters.get('singularity') : task.ext.parameters.get('docker')}" input: tuple val(meta), path(assembly) + each database output: tuple val(meta), path("*.txt"), emit: report @@ -18,7 +19,7 @@ process ABRICATE { def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" """ - abricate $assembly $args --threads $task.cpus > ${prefix}.txt + abricate --db $database $assembly $args --threads $task.cpus > ${prefix}_${database}.txt cat <<-END_VERSIONS > versions.yml "${task.process}": abricate: \$(echo \$(abricate --version 2>&1) | sed 's/^.*abricate //' ) diff --git a/nextflow.config b/nextflow.config index e4b8e5e..7cd03b9 100644 --- a/nextflow.config +++ b/nextflow.config @@ -174,6 +174,9 @@ params { singularity = "https://depot.galaxyproject.org/singularity/abricate%3A1.0.1--ha8f3691_1" docker = "biocontainers/abricate:1.0.1--ha8f3691_1" args = { "" } + db_runs = ["argannot", "card", "ecoh", + "ecoli_vf", "megares", "ncbi", + "plasmidfinder", "resfinder", "vfdb"] report_tag = "Abricate" header_p = true } diff --git a/subworkflows/local/annotate_genomes.nf b/subworkflows/local/annotate_genomes.nf index 2b86ad1..b459e7c 100644 --- a/subworkflows/local/annotate_genomes.nf +++ b/subworkflows/local/annotate_genomes.nf @@ -44,7 +44,7 @@ workflow ANNOTATE_GENOMES { } if(!params.skip_abricate){ - abricated = ABRICATE(contig_data) + abricated = ABRICATE(contig_data, params.abricate.db_runs) abricate_report = abricated.report versions = versions.mix(abricated.versions) reports = reports.mix(abricated.report.map{