Skip to content
13 changes: 3 additions & 10 deletions modules/nf-core/abricate/run/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ process ABRICATE_RUN {
path databasedir

output:
tuple val(meta), path("*.txt"), emit: report
path "versions.yml" , emit: versions
tuple val(meta), path("*.txt"), emit: report
tuple val("${task.process}"), val('abricate'), eval("abricate --version | sed 's/^.* //' "), emit: versions_abricate, topic: versions


when:
task.ext.when == null || task.ext.when

Expand All @@ -36,20 +37,12 @@ process ABRICATE_RUN {
--threads ${task.cpus} \\
> ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
abricate: \$(echo \$(abricate --version 2>&1) | sed 's/^.*abricate //' )
END_VERSIONS
"""

stub:
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.txt

cat <<-END_VERSIONS > versions.yml
"${task.process}":
abricate: \$(echo \$(abricate --version 2>&1) | sed 's/^.*abricate //' )
END_VERSIONS
"""
}
36 changes: 26 additions & 10 deletions modules/nf-core/abricate/run/meta.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: abricate_run
description: Screen assemblies for antimicrobial resistance against multiple databases
description: Screen assemblies for antimicrobial resistance against multiple
databases
keywords:
- bacteria
- assembly
Expand Down Expand Up @@ -28,8 +29,8 @@ input:
- edam: "http://edamontology.org/format_2204" # EMBL format
- databasedir:
type: directory
description: Optional location of local copy of database files, possibly with
custom databases set up with `abricate --setupdb`
description: Optional location of local copy of database files, possibly
with custom databases set up with `abricate --setupdb`
pattern: "*/"
output:
report:
Expand All @@ -43,15 +44,30 @@ output:
description: Tab-delimited report of results
pattern: "*.{txt}"
ontologies:
- edam: "http://edamontology.org/format_2330" # Textual format
- edam: "http://edamontology.org/format_2330"
versions_abricate:
- - ${task.process}:
type: string
description: The process the versions were collected from
- abricate:
type: string
description: The tool name
- "abricate --version | sed 's/^.* //' ":
type: eval
description: The expression to obtain the version of the tool
topics:
versions:
- versions.yml:
type: file
description: File containing software versions
pattern: "versions.yml"
ontologies:
- edam: "http://edamontology.org/format_3750" # YAML
- - ${task.process}:
type: string
description: The process the versions were collected from
- abricate:
type: string
description: The tool name
- "abricate --version | sed 's/^.* //' ":
type: eval
description: The expression to obtain the version of the tool
authors:
- "@rpetit3"
- "@maxcumminsandfred"
maintainers:
- "@rpetit3"
52 changes: 34 additions & 18 deletions modules/nf-core/abricate/run/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
"content": [
{
"0": [
[
"ABRICATE_RUN",
"abricate",
"1.0.1"
]
],
"1": [
[
{
"id": "test",
Expand All @@ -11,9 +18,6 @@
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,2204fb00277c287f5f3d82e28964aa03"
],
"report": [
[
{
Expand All @@ -23,21 +27,32 @@
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,2204fb00277c287f5f3d82e28964aa03"
"versions_abricate": [
[
"ABRICATE_RUN",
"abricate",
"1.0.1"
]
]
}
],
"timestamp": "2026-02-25T20:44:03.314874",
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.2"
},
"timestamp": "2024-06-19T21:06:27.483697023"
"nf-test": "0.9.4",
"nextflow": "25.10.2"
}
},
"bacteroides_fragilis - genome.fa.gz": {
"content": [
{
"0": [
[
"ABRICATE_RUN",
"abricate",
"1.0.1"
]
],
"1": [
[
{
"id": "test",
Expand All @@ -46,9 +61,6 @@
"test.txt:md5,b48f4f5f78982a221038fd9f0a3aa504"
]
],
"1": [
"versions.yml:md5,2204fb00277c287f5f3d82e28964aa03"
],
"report": [
[
{
Expand All @@ -58,15 +70,19 @@
"test.txt:md5,b48f4f5f78982a221038fd9f0a3aa504"
]
],
"versions": [
"versions.yml:md5,2204fb00277c287f5f3d82e28964aa03"
"versions_abricate": [
[
"ABRICATE_RUN",
"abricate",
"1.0.1"
]
]
}
],
"timestamp": "2026-02-25T20:43:54.223267",
"meta": {
"nf-test": "0.9.2",
"nextflow": "24.10.5"
},
"timestamp": "2025-05-23T12:30:00.97526706"
"nf-test": "0.9.4",
"nextflow": "25.10.2"
}
}
}
Loading