metaAMR-Plus is a Nextflow pipeline for comprehensive analysis of long-read Nanopore metagenomic data. It detects antimicrobial resistance (AMR) genes, identifies plasmids and virulence factors, and performs taxonomic classification using multiple parallel tools and databases. Results are integrated into a single interactive HTML report.
The pipeline supports two main modes:
- Standard mode — full analysis with assembly, AMR detection, plasmid detection, and taxonomic profiling
- Target species mode — extract and analyse reads from specific target organisms (e.g. known pathogens of interest)
Input reads (Nanopore FASTQ)
│
├── Quality control (FastQC)
├── Adapter trimming (Porechop_ABI)
├── Length filtering (Filtlong)
└── Host removal (Minimap2)
│
├── [WITH ASSEMBLY]
│ ├── Assembly (Flye) → [Polishing (Racon) →] QC (QUAST)
│ ├── AMR detection: RGI · AMRFinderPlus · ResFinder
│ ├── Virulence detection: Abricate (VFDB)
│ ├── AMR integration: hAMRonization
│ ├── Plasmid detection: PlasmidFinder · PlasClass
│ └── Taxonomic profiling: Centrifuge · Kaiju · Krona
│
├── [WITHOUT ASSEMBLY]
│ ├── ResFinder (reads-based)
│ └── Taxonomic profiling: Centrifuge · Kaiju · Krona
│
└── [TARGET SPECIES MODE]
├── Classification (Centrifuge)
├── Read extraction (target species only)
└── AMR detection (ResFinder)
│
▼
MultiQC + Interactive HTML report
- Multi-tool AMR detection — RGI (CARD), AMRFinderPlus, and ResFinder run in parallel; RGI, AMRFinderPlus, and Abricate results are integrated via hAMRonization
- Virulence factor detection — Abricate (VFDB database); results are included in hAMRonization
- Plasmid detection — PlasmidFinder (replicon typing) + PlasClass (sequence composition)
- Dual taxonomic profiling — Centrifuge (k-mer) and Kaiju (protein-level) with Krona visualisation
- Target species mode — extract reads classified as specific organisms before AMR analysis
- Interactive HTML report — integrated summary with AMR heatmap, VF categorisation, plasmid-taxonomy cross-reference, contig search
- Adaptive reporting — report automatically adjusts based on which tools were run
- Flexible tool selection — core tools run by default; enable assembly and assembly-based tools (RGI, AMRFinderPlus, PlasmidFinder, PlasClass) explicitly via
--perform_assemblyand--run_*flags
- Install Nextflow (≥24.04.2)
- Install Singularity or Docker
- Prepare your samplesheet (see usage)
- Run the pipeline:
Minimal run
nextflow run Leilanasd/metaAMR-Plus \
-profile <singularity/docker>
--outdir results_testDefault run (FastQC + ResFinder + Centrifuge + Krona + MultiQC + HTML report)
nextflow run Leilanasd/metaAMR-Plus \
-profile <singularity/docker> \
--input samplesheet.csv \
--outdir results \
--databases database.csvFull run (all tools enabled)
nextflow run Leilanasd/metaAMR-Plus \
-profile <singularity/docker> \
--input samplesheet.csv \
--outdir results \
--databases database.csv \
--hostremoval_reference /path/to/host.fa \
--perform_trim \
--perform_hostremoval \
--perform_assembly \
--perform_polish_assembly \
--run_abricate \
--run_plasmidfinder \
--run_plasclass \
--run_rgi \
--run_amrfinderplus \
--run_kaiju \
--download_rgi_db \
--download_amrfinderplus_dbIf you have existing local databases, provide them in
database.csvinstead of using the download flags.
To run analysis restricted to specific organisms:
nextflow run /path/to/metaAMR-Plus \
-profile <singularity/docker> \
--input samplesheet.csv \
--outdir results_kleb \
--target_species "Klebsiella pneumoniae" \
--databases database.csv \
--download_resfinder_dbMultiple species can be specified as a comma-separated string:
--target_species "Klebsiella pneumoniae,Enterococcus faecium"sample,reads
LH040,/path/to/LH040.fastq.gz
LH024,/path/to/LH024.fastq.gz
LH077,/path/to/LH077.fastq.gz
LH085,/path/to/LH085.fastq.gzImportant: The
samplefield must match the base name of the FASTQ file (without.fastq.gz) for consistent MultiQC naming.
metaAMR-Plus uses several reference databases. These can be downloaded automatically by the pipeline or provided as pre-built local copies.
| Tool | Database | Auto-download flag | Notes |
|---|---|---|---|
| RGI | CARD | --download_rgi_db |
Or provide via database.csv |
| AMRFinderPlus | NCBI AMRFinder | --download_amrfinderplus_db |
Or provide via database.csv |
| ResFinder | ResFinder DB | --download_resfinder_db |
Or provide via database.csv |
To save downloaded databases for reuse in future runs:
--save_databasesTo use existing local databases (skip download), provide them all via the database.csv :
tool,db_name,db_params,db_path
kaiju,kaiju_db,,/path/to/kaiju_db
centrifuge,centrifuge_db,,/path/to/centrifuge_db
rgi,rgi_db,,/path/to/rgi_db
resfinder,resfinder_db,,/path/to/resfinder_db
amrfinderplus,amrfinderplus_db,,/path/to/amrfinderplus_dbPass it with --databases database.csv. No download flags are needed when paths are provided in the database.csv.
Centrifuge and Kaiju databases are always provided via the database.csv (see above). These cannot be auto-downloaded and must be built or obtained separately before running the pipeline.
| Tool | Database | Notes |
|---|---|---|
| Abricate | VFDB | Bundled with Abricate container |
| PlasmidFinder | PlasmidFinder DB | Bundled with PlasmidFinder container |
| PlasClass | — | Model-based, no external DB needed |
The main outputs are in <outdir>/:
| Directory | Contents |
|---|---|
report/ |
Interactive HTML report |
multiqc/ |
MultiQC quality report |
assemblies/ |
Raw assembly FASTA (Flye) |
polished_assemblies/ |
Polished assembly FASTA (Racon) |
quast/ |
Assembly quality statistics |
resfinder/ |
ResFinder AMR results |
rgi/ |
RGI (CARD) results |
amrfinderplus/ |
AMRFinderPlus results |
abricate/ |
Abricate VF results |
hamronization/ |
hAMRonization integrated summary |
plasmidfinder/ |
PlasmidFinder replicon results |
plasclass/ |
PlasClass contig classification |
centrifuge/ |
Centrifuge taxonomic profiles |
kaiju/ |
Kaiju taxonomic profiles |
krona/ |
Krona interactive visualisations |
See output documentation for full details.
metaAMR-Plus was originally written by Leila Nasirzadeh and Jyotirmoy Das.
- Leila Nasirzadeh — Department of Biomedical and Clinical Sciences, Linköping University
- Jyotirmoy Das — Department of Biomedical and Clinical Sciences, Linköping University
We thank the following people for their contributions to the development of this pipeline:
- Malgorzata Lysaik
- Jenny Welander
- Haiko Schurz
- Ida Karlsson
- Olivia Andersson
- Samuel Lampa
- Mårten Lindqvist
If you use this pipeline, please cite:
metaAMR-Plus: a Nextflow pipeline for comprehensive AMR analysis of Nanopore metagenomic data. DOI: 10.5281/zenodo.15682600
Please also cite the individual tools used. A full list is available in CITATIONS.md.
This pipeline was developed at the Bioinformatics Core Facility, Faculty of Medicine and Health Sciences,Linköping University, and Clinical Genomics Linköping, SciLifeLab. We are also grateful to LiU-IT (DIGIT) for their support on Fraka (HPC) during development and testing of metaAMR-Plus.
If you encounter issues or have suggestions, please open a GitHub issue.