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
6 changes: 3 additions & 3 deletions modules/nf-core/hamronization/rgi/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
{
"id": "test"
},
"test.tsv:md5,fda542e7a38cb5c36d3c2912aebeae16"
"test.tsv:md5,e127fbecbee7544279945ca130e5533d"
]
],
"versions_hamronization": [
Expand All @@ -51,10 +51,10 @@
]
}
],
"timestamp": "2026-05-12T17:36:23.428320453",
"timestamp": "2026-08-14T06:12:49.865072999",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.0"
"nextflow": "26.04.6"
}
}
}
2 changes: 1 addition & 1 deletion modules/nf-core/rgi/bwt/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::rgi=6.0.8
- bioconda::kma=1.6.11
- bioconda::rgi=6.0.8
6 changes: 3 additions & 3 deletions modules/nf-core/rgi/bwt/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ process RGI_BWT {

conda "${moduleDir}/environment.yml"
container "${ workflow.containerEngine in ['singularity', 'apptainer'] && !task.ext.singularity_pull_docker_container
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/3f/3f452c8e124ee58ab6b26442d15401c57d471cb753f53921570dc484df4e7620/data'
: 'community.wave.seqera.io/library/rgi_kma:e905ecb8305e2609' }"
? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/3f/3f452c8e124ee58ab6b26442d15401c57d471cb753f53921570dc484df4e7620/data'
: 'community.wave.seqera.io/library/rgi_kma:e905ecb8305e2609' }"

input:
tuple val(meta), path(reads, arity: '1..2')
Expand All @@ -18,7 +18,7 @@ process RGI_BWT {
tuple val(meta), path("temp/"), emit: tmp
tuple val("${task.process}"), val('rgi'), eval("rgi main --version"), emit: versions_rgi, topic: versions
tuple val("${task.process}"), val('rgi-database'), eval("echo \$DB_VERSION"), emit: versions_db , topic: versions
tuple val("${task.process}"), val('kma'), eval("kma -v"), emit: versions_kma, topic: versions
tuple val("${task.process}"), val('kma'), eval("kma -v | sed 's/KMA-//'"), emit: versions_kma, topic: versions

when:
task.ext.when == null || task.ext.when
Expand Down
10 changes: 6 additions & 4 deletions modules/nf-core/rgi/bwt/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ input:
description: Single-end or paired-end nucleotide sequences in FASTQ or FASTA format
pattern: "*.{fastq,fastq.gz,fq,fq.gz,fasta,fasta.gz,fa,fa.gz,fna,fna.gz,faa,faa.gz}"
ontologies:
- edam: http://edamontology.org/format_1930
- edam: http://edamontology.org/format_1930 # FASTQ
- card:
type: directory
description: Directory containing the CARD database. This is expected to be the unarchived but otherwise unaltered download folder (see RGI documentation for download instructions).
Expand All @@ -46,7 +46,7 @@ output:
description: JSON formatted file with RGI results
pattern: "*.{json}"
ontologies:
- edam: http://edamontology.org/format_3464
- edam: http://edamontology.org/format_3464 # JSON
tsv:
- - meta:
type: map
Expand Down Expand Up @@ -95,9 +95,10 @@ output:
- kma:
type: string
description: The name of the tool
- kma -v:
- kma -v | sed 's/KMA-//':
type: eval
description: The expression to obtain the version of the tool

topics:
versions:
- - ${task.process}:
Expand All @@ -124,9 +125,10 @@ topics:
- kma:
type: string
description: The name of the tool
- kma -v:
- kma -v | sed 's/KMA-//':
type: eval
description: The expression to obtain the version of the tool

authors:
- "@vinisalazar"
maintainers:
Expand Down
35 changes: 14 additions & 21 deletions modules/nf-core/rgi/bwt/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ nextflow_process {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ id:'test', single_end:false ],
[
file(params.modules_testdata_base_path + '../../mag/test_data/test_minigut_R1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + '../../mag/test_data/test_minigut_R2.fastq.gz', checkIfExists: true),
Expand All @@ -53,24 +53,17 @@ nextflow_process {
}

then {
assertAll(
{ assert process.success },
{
def outDir = file(process.out.tsv[0][1][0]).parentFile

def mappingFile = outDir.listFiles().find {
it.name.endsWith(".gene_mapping_data.txt")
}

assert mappingFile != null : "No .gene_mapping_data.txt file found in ${outDir}"

def sortedLines = mappingFile.readLines().sort()

assert snapshot([output: sortedLines],
process.out.findAll { key, val -> key.startsWith('versions') }
).match()
def outDir = file(process.out.tsv[0][1][0]).parentFile
def mappingFile = outDir.listFiles().find {
it.name.endsWith(".gene_mapping_data.txt")
}

},
assert process.success
assertAll(
{ assert snapshot(
sanitizeOutput(process.out, unstableKeys: ["tsv", "json"]),
mappingFile.readLines().sort()
).match() },
)
}
}
Expand All @@ -83,7 +76,7 @@ nextflow_process {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
[ id:'test', single_end:false ],
[
file(params.modules_testdata_base_path + '../../mag/test_data/test_minigut_R1.fastq.gz', checkIfExists: true),
file(params.modules_testdata_base_path + '../../mag/test_data/test_minigut_R2.fastq.gz', checkIfExists: true),
Expand All @@ -96,9 +89,9 @@ nextflow_process {
}

then {
assert process.success
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
{ assert snapshot(sanitizeOutput(process.out)).match() }
)
}
}
Expand Down
126 changes: 57 additions & 69 deletions modules/nf-core/rgi/bwt/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"rgi/bwt - minigut - test_fastq_gz - stub": {
"content": [
{
"0": [
"json": [
[
{
"id": "test",
Expand All @@ -11,54 +11,65 @@
"test.json:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"tmp": [
[
{
"id": "test",
"single_end": false
},
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
[

]
]
],
"2": [
"tsv": [
[
{
"id": "test",
"single_end": false
},
[

]
]
],
"3": [
[
"RGI_BWT",
"rgi",
"6.0.8"
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"4": [
"versions_db": [
[
"RGI_BWT",
"rgi-database",
"stub_version"
]
],
"5": [
"versions_kma": [
[
"RGI_BWT",
"kma",
"KMA-1.6.11"
"1.6.11"
]
],
"versions_rgi": [
[
"RGI_BWT",
"rgi",
"6.0.8"
]
]
}
],
"timestamp": "2026-08-17T08:23:55.264483205",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.6"
}
},
"rgi/bwt - minigut - test_fastq_gz": {
"content": [
{
"json": [
[
{
"id": "test",
"single_end": false
},
"test.json:md5,d41d8cd98f00b204e9800998ecf8427e"
"test.allele_mapping_data.json"
]
],
"tmp": [
Expand All @@ -68,7 +79,7 @@
"single_end": false
},
[

"test.temp.sam.temp.fsa:md5,bd47f4f8e6eefb9f9e70deb5cd42e7f9"
]
]
],
Expand All @@ -78,54 +89,20 @@
"id": "test",
"single_end": false
},
"test.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
[
"test.allele_mapping_data.txt",
"test.artifacts_mapping_stats.txt",
"test.coverage.temp.txt",
"test.coverage_all_positions.summary.temp.txt",
"test.coverage_all_positions.temp.txt",
"test.gene_mapping_data.txt",
"test.overall_mapping_stats.txt",
"test.reference_mapping_stats.txt",
"test.seqs.temp.txt",
"test.temp.txt"
]
]
],
"versions_db": [
[
"RGI_BWT",
"rgi-database",
"stub_version"
]
],
"versions_kma": [
[
"RGI_BWT",
"kma",
"KMA-1.6.11"
]
],
"versions_rgi": [
[
"RGI_BWT",
"rgi",
"6.0.8"
]
]
}
],
"timestamp": "2026-07-08T14:46:07.17825",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.4"
}
},
"rgi/bwt - minigut - test_fastq_gz": {
"content": [
{
"output": [
"ARO Term\tARO Accession\tReference Model Type\tReference DB\tAlleles with Mapped Reads\tReference Allele(s) Identity to CARD Reference Protein (%)\tResistomes & Variants: Observed in Genome(s)\tResistomes & Variants: Observed in Plasmid(s)\tResistomes & Variants: Observed Pathogen(s)\tCompletely Mapped Reads\tMapped Reads with Flanking Sequence\tAll Mapped Reads\tAverage Percent Coverage\tAverage Length Coverage (bp)\tAverage MAPQ (Completely Mapped Reads)\tNumber of Mapped Baits\tNumber of Mapped Baits with Reads\tAverage Number of reads per Bait\tNumber of reads per Bait Coefficient of Variation (%)\tNumber of reads mapping to baits and mapping to complete gene\tNumber of reads mapping to baits and mapping to complete gene (%)\tMate Pair Linkage (# reads)\tReference Length\tAMR Gene Family\tDrug Class\tResistance Mechanism",
"Escherichia coli acrA\t3004043\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t51.00\t0.00\t51.00\t100.00\t1194.00\t188.71\t0\t0\t0\t0\tN/A\tN/A\t\t1194\tresistance-nodulation-cell division (RND) antibiotic efflux pump\tfluoroquinolone antibiotic; cephalosporin; glycylcycline; penicillin beta-lactam; tetracycline antibiotic; rifamycin antibiotic; phenicol antibiotic; disinfecting agents and antiseptics\tantibiotic efflux",
"Escherichia coli emrE\t3004039\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t23.00\t0.00\t23.00\t100.00\t333.00\t175.96\t0\t0\t0\t0\tN/A\tN/A\t\t333\tsmall multidrug resistance (SMR) antibiotic efflux pump\tmacrolide antibiotic\tantibiotic efflux",
"LptD\t3005059\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tKlebsiella pneumoniae\t38.00\t0.00\t38.00\t44.57\t1047.00\t131.34\t0\t0\t0\t0\tN/A\tN/A\t\t2349\tATP-binding cassette (ABC) antibiotic efflux pump\tcarbapenem; peptide antibiotic; aminocoumarin antibiotic; rifamycin antibiotic\tantibiotic efflux",
"acrB\t3000216\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t133.00\t0.00\t133.00\t100.00\t3150.00\t191.36\t0\t0\t0\t0\tN/A\tN/A\t\t3150\tresistance-nodulation-cell division (RND) antibiotic efflux pump\tfluoroquinolone antibiotic; cephalosporin; glycylcycline; penicillin beta-lactam; tetracycline antibiotic; rifamycin antibiotic; phenicol antibiotic; disinfecting agents and antiseptics\tantibiotic efflux",
"kdpE\t3003841\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t45.00\t0.00\t45.00\t100.00\t678.00\t175.80\t0\t0\t0\t0\tN/A\tN/A\t\t678\tkdpDE\taminoglycoside antibiotic\tantibiotic efflux",
"leuO\t3003843\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t55.00\t0.00\t55.00\t100.00\t945.00\t173.55\t0\t0\t0\t0\tN/A\tN/A\t\t945\tmajor facilitator superfamily (MFS) antibiotic efflux pump\tnucleoside antibiotic; disinfecting agents and antiseptics\tantibiotic efflux",
"rmtH\t3003198\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tKlebsiella pneumoniae\t4.00\t0.00\t4.00\t6.59\t50.00\t79.00\t0\t0\t0\t0\tN/A\tN/A\t\t759\t16S rRNA methyltransferase (G1405)\taminoglycoside antibiotic\tantibiotic target alteration",
"tet(Q)\t3000191\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tBacteroides fragilis\t138.00\t0.00\t138.00\t100.00\t1974.00\t179.62\t0\t0\t0\t0\tN/A\tN/A\t\t1974\ttetracycline-resistant ribosomal protection protein\ttetracycline antibiotic\tantibiotic target protection"
]
},
{
"versions_db": [
[
"RGI_BWT",
Expand All @@ -137,7 +114,7 @@
[
"RGI_BWT",
"kma",
"KMA-1.6.11"
"1.6.11"
]
],
"versions_rgi": [
Expand All @@ -147,12 +124,23 @@
"6.0.8"
]
]
}
},
[
"ARO Term\tARO Accession\tReference Model Type\tReference DB\tAlleles with Mapped Reads\tReference Allele(s) Identity to CARD Reference Protein (%)\tResistomes & Variants: Observed in Genome(s)\tResistomes & Variants: Observed in Plasmid(s)\tResistomes & Variants: Observed Pathogen(s)\tCompletely Mapped Reads\tMapped Reads with Flanking Sequence\tAll Mapped Reads\tAverage Percent Coverage\tAverage Length Coverage (bp)\tAverage MAPQ (Completely Mapped Reads)\tNumber of Mapped Baits\tNumber of Mapped Baits with Reads\tAverage Number of reads per Bait\tNumber of reads per Bait Coefficient of Variation (%)\tNumber of reads mapping to baits and mapping to complete gene\tNumber of reads mapping to baits and mapping to complete gene (%)\tMate Pair Linkage (# reads)\tReference Length\tAMR Gene Family\tDrug Class\tResistance Mechanism",
"Escherichia coli acrA\t3004043\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t51.00\t0.00\t51.00\t100.00\t1194.00\t188.71\t0\t0\t0\t0\tN/A\tN/A\t\t1194\tresistance-nodulation-cell division (RND) antibiotic efflux pump\tfluoroquinolone antibiotic; cephalosporin; glycylcycline; penicillin beta-lactam; tetracycline antibiotic; rifamycin antibiotic; phenicol antibiotic; disinfecting agents and antiseptics\tantibiotic efflux",
"Escherichia coli emrE\t3004039\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t23.00\t0.00\t23.00\t100.00\t333.00\t175.96\t0\t0\t0\t0\tN/A\tN/A\t\t333\tsmall multidrug resistance (SMR) antibiotic efflux pump\tmacrolide antibiotic\tantibiotic efflux",
"LptD\t3005059\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tKlebsiella pneumoniae\t38.00\t0.00\t38.00\t44.57\t1047.00\t131.34\t0\t0\t0\t0\tN/A\tN/A\t\t2349\tATP-binding cassette (ABC) antibiotic efflux pump\tcarbapenem; peptide antibiotic; aminocoumarin antibiotic; rifamycin antibiotic\tantibiotic efflux",
"acrB\t3000216\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t133.00\t0.00\t133.00\t100.00\t3150.00\t191.36\t0\t0\t0\t0\tN/A\tN/A\t\t3150\tresistance-nodulation-cell division (RND) antibiotic efflux pump\tfluoroquinolone antibiotic; cephalosporin; glycylcycline; penicillin beta-lactam; tetracycline antibiotic; rifamycin antibiotic; phenicol antibiotic; disinfecting agents and antiseptics\tantibiotic efflux",
"kdpE\t3003841\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t45.00\t0.00\t45.00\t100.00\t678.00\t175.80\t0\t0\t0\t0\tN/A\tN/A\t\t678\tkdpDE\taminoglycoside antibiotic\tantibiotic efflux",
"leuO\t3003843\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tEscherichia coli\t55.00\t0.00\t55.00\t100.00\t945.00\t173.55\t0\t0\t0\t0\tN/A\tN/A\t\t945\tmajor facilitator superfamily (MFS) antibiotic efflux pump\tnucleoside antibiotic; disinfecting agents and antiseptics\tantibiotic efflux",
"rmtH\t3003198\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tKlebsiella pneumoniae\t4.00\t0.00\t4.00\t6.59\t50.00\t79.00\t0\t0\t0\t0\tN/A\tN/A\t\t759\t16S rRNA methyltransferase (G1405)\taminoglycoside antibiotic\tantibiotic target alteration",
"tet(Q)\t3000191\tprotein homolog model\tCARD\t1\t100.0\tno data\tno data\tBacteroides fragilis\t138.00\t0.00\t138.00\t100.00\t1974.00\t179.62\t0\t0\t0\t0\tN/A\tN/A\t\t1974\ttetracycline-resistant ribosomal protection protein\ttetracycline antibiotic\tantibiotic target protection"
]
],
"timestamp": "2026-07-08T16:46:41.850311",
"timestamp": "2026-08-17T12:30:32.794546461",
"meta": {
"nf-test": "0.9.5",
"nextflow": "26.04.4"
"nextflow": "26.04.6"
}
}
}
3 changes: 2 additions & 1 deletion modules/nf-core/rgi/cardannotation/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ channels:
- conda-forge
- bioconda
dependencies:
- bioconda::rgi=6.0.5
- bioconda::kma=1.6.11
- bioconda::rgi=6.0.8
Loading