Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions modules/nf-core/hamronization/abricate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ process HAMRONIZATION_ABRICATE {
output:
tuple val(meta), path("*.json"), optional: true, emit: json
tuple val(meta), path("*.tsv"), optional: true, emit: tsv
path "versions.yml", emit: versions
tuple val("${task.process}"), val('hamronization'), eval("hamronize --version 2>&1 | sed 's/hamronize //'"), topic: versions, emit: versions_hamronization

when:
task.ext.when == null || task.ext.when
Expand All @@ -33,21 +33,11 @@ process HAMRONIZATION_ABRICATE {
--analysis_software_version ${software_version} \\
--reference_database_version ${reference_db_version} \\
> ${prefix}.${format}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' )
END_VERSIONS
"""

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' )
END_VERSIONS
"""
}
39 changes: 27 additions & 12 deletions modules/nf-core/hamronization/abricate/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "hamronization_abricate"
description: Tool to convert and summarize ABRicate outputs using the hAMRonization
specification
description: Tool to convert and summarize ABRicate outputs using the
hAMRonization specification
keywords:
- amr
- antimicrobial resistance
Expand All @@ -13,14 +13,15 @@ tools:
homepage: "https://github.com/pha4ge/hAMRonization/"
documentation: "https://github.com/pha4ge/hAMRonization/"
tool_dev_url: "https://github.com/pha4ge/hAMRonization"
licence: ["GNU Lesser General Public v3 (LGPL v3)"]
licence:
- "GNU Lesser General Public v3 (LGPL v3)"
identifier: biotools:hamronization
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- report:
type: file
description: Output TSV or CSV file from ABRicate
Expand All @@ -46,7 +47,7 @@ output:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- "*.json":
type: file
description: hAMRonised report in JSON format
Expand All @@ -58,20 +59,34 @@ output:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- "*.tsv":
type: file
description: hAMRonised report in TSV format
pattern: "*.json"
ontologies:
- edam: http://edamontology.org/format_3464 # JSON
versions_hamronization:
- - ${task.process}:
type: string
description: The name of the process
- hamronization:
type: string
description: The name of the tool
- hamronize --version 2>&1 | sed 's/hamronize //':
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 name of the process
- hamronization:
type: string
description: The name of the tool
- hamronize --version 2>&1 | sed 's/hamronize //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@jasmezz"
maintainers:
Expand Down
14 changes: 10 additions & 4 deletions modules/nf-core/hamronization/abricate/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ nextflow_process {
when {
process {
"""
input[0] = [ [ id:"test" ], file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/hamronization/genome.abricate.tsv', checkIfExists: true) ]
input[0] = [
[ id:"test" ],
file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/hamronization/genome.abricate.tsv', checkIfExists: true)
]
input[1] = 'tsv'
input[2] = '1.0.1'
input[3] = '2021-Mar-27'
Expand All @@ -25,7 +28,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand All @@ -37,7 +40,10 @@ nextflow_process {
when {
process {
"""
input[0] = [ [ id:"test" ], file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/hamronization/genome.abricate.tsv', checkIfExists: true) ]
input[0] = [
[ id:"test" ],
file(params.modules_testdata_base_path + 'genomics/prokaryotes/bacteroides_fragilis/hamronization/genome.abricate.tsv', checkIfExists: true)
]
input[1] = 'tsv'
input[2] = '1.0.1'
input[3] = '2021-Mar-27'
Expand All @@ -48,7 +54,7 @@ nextflow_process {
then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
60 changes: 20 additions & 40 deletions modules/nf-core/hamronization/abricate/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,6 @@
"hamronization/abricate - bacteroides_fragilis - genome_abricate_tsv": {
"content": [
{
"0": [

],
"1": [
[
{
"id": "test"
},
"test.tsv:md5,4b1024ba25c116a5312944f65dd40e9b"
]
],
"2": [
"versions.yml:md5,113fee72fb15d06692b7fc29ee477aff"
],
"json": [

],
Expand All @@ -27,34 +13,24 @@
"test.tsv:md5,4b1024ba25c116a5312944f65dd40e9b"
]
],
"versions": [
"versions.yml:md5,113fee72fb15d06692b7fc29ee477aff"
"versions_hamronization": [
[
"HAMRONIZATION_ABRICATE",
"hamronization",
"1.1.9"
]
]
}
],
"timestamp": "2026-05-12T19:02:34.937482681",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.7"
},
"timestamp": "2025-10-04T06:44:38.664437882"
"nf-test": "0.9.4",
"nextflow": "26.03.0"
}
},
"hamronization/abricate - bacteroides_fragilis - genome_abricate_tsv - stub": {
"content": [
{
"0": [

],
"1": [
[
{
"id": "test"
},
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
"versions.yml:md5,113fee72fb15d06692b7fc29ee477aff"
],
"json": [

],
Expand All @@ -66,15 +42,19 @@
"test.tsv:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,113fee72fb15d06692b7fc29ee477aff"
"versions_hamronization": [
[
"HAMRONIZATION_ABRICATE",
"hamronization",
"1.1.9"
]
]
}
],
"timestamp": "2026-05-12T19:02:41.628540543",
"meta": {
"nf-test": "0.9.2",
"nextflow": "25.04.7"
},
"timestamp": "2025-10-04T06:44:45.131612041"
"nf-test": "0.9.4",
"nextflow": "26.03.0"
}
}
}
12 changes: 1 addition & 11 deletions modules/nf-core/hamronization/amrfinderplus/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ process HAMRONIZATION_AMRFINDERPLUS {
output:
tuple val(meta), path("*.json"), optional: true, emit: json
tuple val(meta), path("*.tsv"), optional: true, emit: tsv
path "versions.yml", emit: versions
tuple val("${task.process}"), val('hamronization'), eval("hamronize --version 2>&1 | sed 's/hamronize //'"), topic: versions, emit: versions_hamronization

when:
task.ext.when == null || task.ext.when
Expand All @@ -34,21 +34,11 @@ process HAMRONIZATION_AMRFINDERPLUS {
--reference_database_version ${reference_db_version} \\
--input_file_name ${prefix} \\
> ${prefix}.${format}

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' )
END_VERSIONS
"""

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

cat <<-END_VERSIONS > versions.yml
"${task.process}":
hamronization: \$(echo \$(hamronize --version 2>&1) | cut -f 2 -d ' ' )
END_VERSIONS
"""
}
41 changes: 28 additions & 13 deletions modules/nf-core/hamronization/amrfinderplus/meta.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "hamronization_amrfinderplus"
description: Tool to convert and summarize AMRfinderPlus outputs using the hAMRonization
specification.
description: Tool to convert and summarize AMRfinderPlus outputs using the
hAMRonization specification.
keywords:
- amr
- antimicrobial resistance
Expand All @@ -15,20 +15,21 @@ tools:
homepage: "https://github.com/pha4ge/hAMRonization/"
documentation: "https://github.com/pha4ge/hAMRonization/"
tool_dev_url: "https://github.com/pha4ge/hAMRonization"
licence: ["GNU Lesser General Public v3 (LGPL v3)"]
licence:
- "GNU Lesser General Public v3 (LGPL v3)"
identifier: biotools:hamronization
input:
- - meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- report:
type: file
description: Output .tsv file from AMRfinderPlus
pattern: "*.tsv"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
- edam: http://edamontology.org/format_3475
- format:
type: string
description: Type of report file to be produced
Expand All @@ -47,7 +48,7 @@ output:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- "*.json":
type: file
description: hAMRonised report in JSON format
Expand All @@ -59,20 +60,34 @@ output:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
e.g. [ id:'test' ]
- "*.tsv":
type: file
description: hAMRonised report in TSV format
pattern: "*.tsv"
ontologies:
- edam: http://edamontology.org/format_3475 # TSV
versions_hamronization:
- - ${task.process}:
type: string
description: The name of the process
- hamronization:
type: string
description: The name of the tool
- hamronize --version 2>&1 | sed 's/hamronize //':
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 name of the process
- hamronization:
type: string
description: The name of the tool
- hamronize --version 2>&1 | sed 's/hamronize //':
type: eval
description: The expression to obtain the version of the tool
authors:
- "@louperelo"
maintainers:
Expand Down
Loading
Loading