Lesson 9 - Antimicrobial resistance gene annotation
Learning objectives
- Explain the difference between intrinsic and acquired antimicrobial resistance, and why plasmid-borne AMR genes are of particular concern
- Run AMRFinderPlus on a bacterial assembly and interpret its Scope and Method columns
- Explain why an AMR gene hit is not the same as a confirmed resistance phenotype
9.1 Why antimicrobial resistance matters
Antimicrobial resistance occurs when bacteria, viruses, fungi, or parasites stop responding to the medicines used to treat them, making infections harder — sometimes impossible — to treat. It's a major global health threat: bacterial AMR was associated with more than 4.7 million deaths globally in 2021, and roughly 1 in 6 laboratory-confirmed bacterial infections worldwide were resistant to antibiotics in 2023. Between 2018 and 2023, resistance rose in over 40% of the pathogen–antibiotic combinations being monitored, at an average annual increase of 5–15%. Resistance isn't evenly distributed either — it's currently highest in the WHO South-East Asia and Eastern Mediterranean regions, where around 1 in 3 reported infections are resistant, and tends to be worse wherever health systems lack the capacity to diagnose or treat bacterial infections properly. Among drug-resistant Gram-negative bacteria, E. coli and K. pneumoniae are the leading causes of resistant bloodstream infections — among the most severe bacterial infections there are, often progressing to sepsis, organ failure, and death.
Misuse and overuse of antibiotics are one of the main drivers. In 2022, "access" antibiotics — the recommended first-choice treatments for most common infections — accounted for only about 53% of global human antibiotic use, short of the global target of at least 70% by 2030; "watch" antibiotics, which carry a higher resistance risk, made up around 45% of use and exceeded 70% of total use in nearly a third of countries. The knock-on effects reach well beyond the clinic: AMR drives up healthcare costs through longer hospital stays and greater reliance on intensive care, second-line antibiotics, and additional diagnostic testing, and it disproportionately affects vulnerable populations while also threatening food security through its impact on animal and plant health.
9.2 How bacteria become resistant
Resistance isn't a single mechanism — it's a whole toolkit bacteria can draw on, and it's worth understanding the basic biology before interpreting a resistance gene report. Whenever a population of bacteria is exposed to an antibiotic, any cells that happen to be resistant gain a survival advantage: as susceptible bacteria die off, the resistant ones multiply and come to dominate the population. Widespread antibiotic use is, in effect, a selection pressure for resistance.
Broadly, bacteria resist antibiotics in one of two ways: by preventing the antibiotic reaching its target at an effective concentration, or by modifying or bypassing the target itself.
Keeping the antibiotic away from its target: - Efflux pumps — membrane- or cell-wall-embedded pumps that can expel a variety of compounds, including antibiotics, out of the cell. Mutations that cause a bacterium to overproduce a particular pump can increase resistance further. - Reduced membrane permeability — changes to the bacterial membrane that make it harder for the antibiotic to get in at all. - Destroying the antibiotic — bacterial enzymes that inactivate the drug outright. β-lactamase, which breaks down the β-lactam ring in penicillins, is the classic example; extended-spectrum β-lactamase (ESBL)-producing bacteria, which can degrade a much broader range of β-lactam antibiotics — including some last-resort options — have become a major clinical problem. - Modifying the antibiotic — enzymes that attach chemical groups to the antibiotic, preventing it from binding its target.
Modifying or bypassing the target itself: - Camouflaging the target — mutations or chemical modifications that change the target's structure enough to stop the antibiotic recognising it. - Expressing alternative proteins — producing a substitute protein that does the same job as the one the antibiotic inhibits. Staphylococcus aureus acquiring the mecA gene, which produces an alternative penicillin-binding protein with low affinity for β-lactam antibiotics, is the basis of MRSA (methicillin-resistant S. aureus). - Reprogramming the target — building a structurally different version of something the antibiotic needs to bind. Vancomycin-resistant bacteria, for example, construct a different cell wall that the antibiotic can no longer interact with effectively.

Antibiotic resistance strategies in bacteria. Source: ReAct — Resistance mechanisms in bacteria
Some bacteria are naturally immune to a given antibiotic from the outset — intrinsic resistance, such as an antibiotic that targets a cell wall structure a particular species simply doesn't have. Acquired resistance is different: it's when a previously susceptible population evolves resistance over time, whether through spontaneous mutation or by picking up resistance genes from elsewhere.
That second route matters a great deal for genomic surveillance: resistance genes are often carried on mobilisable genetic elements such as plasmids, which allows horizontal gene transfer to spread resistance rapidly through — and between — bacterial populations, independent of normal reproduction. Whether an AMR gene sits on the main bacterial chromosome or on a plasmid makes a significant difference in practice — plasmids are mobile and can be passed between bacterial cells and even between species, making plasmid-borne genes far more capable of spreading through a hospital environment than chromosomal ones. Carbapenem resistance is a well-documented example of this in action: carbapenems are broad-spectrum antibiotics used for a wide range of infections, and over the last three decades, resistance has spread worldwide via an expanding array of carbapenemase genes, driving outbreaks of carbapenemase-producing bacteria in healthcare settings globally. This makes plasmid-borne carbapenemase genes a particular concern for outbreak control.
9.3 Software overview
9.3.1 AMRFinderPlus
In this workshop we will run AMRFinderPlus. It compares isolate genomes against the NCBI Bacterial Antimicrobial Resistance Reference Gene Database using BLAST, and against a curated HMM set using HMMER, then uses a built-in gene hierarchy to report the most specific AMR gene or family present — rather than simply returning the closest database hit.
Why does it matter?
That distinction matters in practice: presented with a novel blaKPC allele nearly identical to blaKPC-2, a closest-hit tool might call it blaKPC-2, but AMRFinderPlus calls it blaKPC, avoiding a name that could mislead a reader into assuming a specific, well-characterised phenotype.
Beyond the core AMR gene and point-mutation calls made by the original AMRFinder, AMRFinderPlus also identifies select members of related gene classes — virulence factors, and biocide, heat, acid, and metal resistance genes.
Biocides
Biocides are antimicrobial chemical agents used heavily across domestic, industrial, and healthcare settings for disinfection — disinfectants, antiseptics, and preservatives including quaternary ammonium compounds (QACs), biguanides, chlorine-releasing agents, and peroxygens. Their heavy use is itself a source of selective pressure: bacteria can evolve biocide resistance much as they evolve antibiotic resistance.
How a QAC disinfectant kills a Gram-negative cell: it inserts into the membrane bilayer and disrupts it, releasing the autolytic enzymes that finish the cell off. Source: Jones & Joshi, 2021 — "Biocide Use in the Antimicrobial Era: A Review"
Virulence factors
Virulence factors are the physical structures and chemical substances a bacterium produces that let it infect a host and evade the host's defences — collectively, what makes a pathogen actually pathogenic, rather than just present. Beyond structural factors like capsules (protective outer coatings), flagella, and pili (movement and attachment), many pathogens also secrete a whole arsenal of enzymes and toxins purpose-built to disable specific host defences.
Secreted virulence factors of Group A Streptococcus (Streptococcus pyogenes), each disabling a different arm of host immunity: superantigens (SAgs) trigger non-specific T-cell activation and a cytokine storm; streptolysins O and S (SLO, SLS) lyse host cells and disrupt tissue barriers; SpeB degrades extracellular matrix and host proteins; streptokinase (SK) breaks down fibrin clots and matrix to promote spread; secreted DNases degrade neutrophil extracellular traps (NETs) and suppress interferon responses; IdeS/Mac-1 and EndoS cleave host IgG to block antibody-mediated immunity; and SIC, PepO, and CEF each block a different step of complement activation. Source: Fan et al., 2026 — "Group A Streptococcal Virulence Factors and Vaccine Development—An Update" (Microorganisms)
9.3.1.1 Typical command and options
amrfinder \
-n /path/to/assembly.fasta \
-d /path/to/amrfinderplus_db \
--plus \
--threads <int> \
-o /path/to/output/sample.amrfinder_plus.tsv
-n/--nucleotide <nucleotide_fasta>— assembled nucleotide FASTA to search. A protein FASTA can be given instead with-p <protein_fasta>, useful once you already have annotated proteins (e.g. from Bakta or Prokka).-d/--database <database_dir>— path to the AMRFinderPlus database directory.--plus— also report the "Plus" subset (virulence factors, stress-response genes, etc.) alongside the default "Core" set. This training's pipeline always includes it — the biocide, stress, and virulence genes covered in Outputs (Section 9.3.1.2) only show up with--plusturned on.--threads <#>— number of threads to use (defaults to 4 on machines with 4 or more cores).-o/--output <output_file>— write results directly to a file.
Other options worth knowing:
-O/--organism <name>— screens for organism-specific point mutations and filters out near-universal, uninformative genes for that taxon.--coverage_min <0-1>— minimum proportion of the reference gene that must be covered for a BLAST-based hit (default0.5) — this is the 50% floor referenced in the Method column description (Section 9.3.1.2.2).
For anything else — combined-mode input formats, the full --organism support table, custom databases, and more — see the Running AMRFinderPlus page on AMRFinderPlus's GitHub wiki.
9.3.1.2 Outputs
Genotype is not phenotype
Before reading a results table, it's worth stating plainly: finding an AMR gene in your assembly does not, by itself, mean the isolate is actually resistant to the corresponding antibiotic. AMRFinderPlus identifies genes and mutations with the capacity to contribute to resistance — it does not predict resistance phenotype directly. A gene has to actually be expressed to confer resistance, and many AMR proteins only reduce antibiotic susceptibility partially, not enough to cross a clinically meaningful resistance threshold. The reverse can happen too: an isolate can gain or lose resistance through mechanisms with no corresponding gene hit at all, such as losing the porin protein an antibiotic needs to enter the cell in the first place.
9.3.1.2.1 The "Scope" column and the --plus option
AMRFinderPlus splits its database into two subsets, and by default only reports genes from the first:
- Core — highly curated, AMR-specific genes and point mutations from the Bacterial Antimicrobial Resistance Reference Gene Database (BioProject PRJNA313047).
- Plus — genes related to biocide and stress resistance, general efflux, virulence, or antigenicity, or AMR genes whose presence/absence is unlikely to affect phenotype or is highly uncertain. Only reported when
--plusis used.
9.3.1.2.2 The "Method" column
Each hit is tagged with a method describing how — and how confidently — it was found, which is worth reading before trusting a given row:
- EXACTX / EXACTP / ALLELEX / ALLELEP — an amino-acid-identical match to a database protein.
ALLELEis used for gene families with a formal allele-numbering scheme (so the "gene symbol" is really an allele symbol);EXACTis used where no such scheme exists, so the same symbol may be shared across closely related sequences. - BLASTX / BLASTP — a BLAST hit below 100% identity but above 90% coverage. The identity cutoff defaults to 90%, though it can be set higher or lower where a gene family's cutoff has been manually curated (usually true of "Plus" genes, which lack a curated HMM).
- PARTIALX / PARTIALP / PARTIAL_CONTIG_ENDX / PARTIAL_CONTIG_ENDP — a hit covering less than 90% of the reference protein.
PARTIAL_CONTIG_ENDspecifically flags a hit ending within two bases of a contig boundary, in the orientation expected if the gene continues past it — since assemblers can split genes across contigs, these are often full-length genes in reality. By default, AMRFinderPlus doesn't report anything below 50% coverage at all (tunable with--coverage_min), so aPARTIALhit always falls between 50–90% coverage. - INTERNAL_STOP — a premature stop codon appears when the hit is translated from genomic sequence, making it less likely to be functional. Only assessed when a nucleotide FASTA is supplied.
- HMM — no BLAST hit met the cutoff, but an HMM built for that gene or gene family scored above its curated threshold. Usually a distant relative of a known family, and occasionally a strong candidate for a new one.
An X, P, or N suffix on most of these methods indicates whether the match came from translated genomic sequence (X), protein sequence (P), or nucleotide sequence (N, point mutations only).
9.3.1.2.3 The "Type", "Subtype", "Class", and "Subclass" columns
Type and Subtype describe what kind of element was found.

Selected definitions of Type (AMR, STRESS and VIRULENCE) and Subtype follow the AMRFinderPlus wiki's own Element Type and Subtype table.
Class and Subclass describe what it's relevant to.
- Class — the drug class (or, for STRESS genes, the compound class) the gene is known to affect.
- Subclass — narrows Class further when known. Sometimes it's identical to Class, as for qacEdelta1: Class QUATERNARY AMMONIUM, Subclass QUATERNARY AMMONIUM, no further detail available. Sometimes it's narrower — blaIMP-15 is Class BETA-LACTAM but Subclass CARBAPENEM specifically, which matters clinically since not every beta-lactamase is a carbapenemase.
Examples of antibiotics you can see in the Class column

Let's work through an example together, using ERR8282752's own report (assembled at ~30x — 20 hits in total):
- Does this sample carry genes associated with resistance to any antibiotics? Yes — 5 of the 20 hits are
Type=AMRgenes, spanning three antibiotic classes. - How many AMR genes are present? 5 (
qnrB35,blaCMY,blaIMP-1,aac(6')-Ib4,qnrA). The remaining 15 hits areSTRESS-type — an arsenic-resistance operon, a cation-efflux gene, and a mercury-resistance operon that turns up on two different replicons. - Which antibiotic classes are represented? QUINOLONE (
qnrB35,qnrA), BETA-LACTAM (blaCMY— cephalosporin;blaIMP-1— carbapenem), and AMINOGLYCOSIDE (aac(6')-Ib4). - Are any of the resistance genes on mobile elements that could support spread between bacteria or between species? Some of them:
qnrB35andblaCMYsit on the chromosome, butblaIMP-1andaac(6')-Ib4are both plasmid-borne on plasmid_1, andqnrAsits on plasmid_3. - Are the matches full-length or partial? Mostly full-length:
qnrB35,blaIMP-1, andaac(6')-Ib4are all cleanALLELEXcalls at 100% coverage and identity. Two aren't —blaCMYisINTERNAL_STOPat 95.8% coverage, andqnrAisPARTIALXat just 61.9% coverage. - Are there any efflux pump or stress-response genes that could contribute to reduced susceptibility or persistence? Extensively — a 4-gene arsenic-resistance operon (
arsRDBC) and a cation-efflux transporter (fieF) on the chromosome, plus a 5-gene mercury-resistance operon (merRTADE) that appears in full twice: once on the chromosome, and again, independently, on plasmid_1. - Does the sample appear to have a broader resistance profile or a narrow, single-class profile? Narrower on the antibiotic side — three classes among five AMR genes — but broad on the stress side, with the same mercury operon independently present on two separate replicons.
-
Does this sample suggest a potential outbreak risk based on the presence of mobile AMR genes? Yes —
blaIMP-1, a carbapenemase, sits on plasmid_1 directly next toaac(6')-Ib4. A plasmid carrying a carbapenemase alongside a second resistance gene is exactly the kind of finding that would flag a sample for closer outbreak investigation, since plasmids can transfer between species as well as between strains.
The chromosome (5.06 Mb) carries both stress-gene clusters — the 4-gene arsenic operon and one copy of the 5-gene mercury operon — plus a cation-efflux gene (fieF) and the two chromosomal AMR hits (qnrB35,blaCMY), each shown at its true position on the ring.
plasmid_1 (linear, 50.4 kb) carries its own complete copy of the mercury-resistance operon seen on the chromosome, plus blaIMP-1— outlined in red as a carbapenem-subclass hit — sitting directly next toaac(6')-Ib4. plasmid_3 (circular, 5.4 kb) carries only the partialqnrAhit.
What can more coverage buy you?
ERR8282752 was assembled twice — once from the ~80x sample, once from ~30x — and AMRFinderPlus run on each. qnrA, qnrB35, qnrA1, aac(6')-Ib4, blaIMP-1 come back identical either way. The one place the two reports diverge:
| Higher coverage | Lower coverage | |
|---|---|---|
blaCMY call |
blaCMY-66, ALLELEX, 100%/100% |
blaCMY, INTERNAL_STOP, 95.8%/97.3% |
A coverage-driven consensus-accuracy effect, not an AMRFinderPlus quirk: fewer reads means a shakier consensus, and here it introduces a premature stop codon that makes an intact gene look disrupted. Since blaCMY has a numbered-allele scheme, AMRFinderPlus only calls the specific allele (blaCMY-66) on a clean ALLELE-level match, so the broken consensus drops the -66 rather than guess (same logic as the blaKPC/blaKPC-2 example above). Coverage doesn't just add confidence — it can change whether a gene looks intact or disrupted in the first place.
9.3.2 Beyond AMRFinderPlus
9.3.2.1 Complement: whole-genome annotation with Prokka or Bakta
AMRFinderPlus's nucleotide mode already finds genes without needing a genome annotation first, but it can do better with one. Running your assembly through Prokka (the long-established default) or Bakta (its newer, more actively maintained successor) produces a .gff annotation plus a protein FASTA, which AMRFinderPlus can take directly via -p protein.fasta -g annotation.gff -n assembly.fasta --annotation_format prokka (or bakta) — AMRFinderPlus's combined mode, which cross-checks BLAST/HMM hits against predicted gene boundaries rather than searching raw nucleotide sequence alone.
9.3.2.2 Alternative: mass AMR/virulence screening with ABRicate
For quickly screening many samples at once, ABRicate is a lighter-weight alternative to running amrfinder directly: BLAST-based mass screening against a choice of curated databases — CARD, ResFinder, ARG-ANNOT, MEGARES, VFDB, PlasmidFinder, and, notably, NCBI's own AMRFinderPlus database too, so the exact reference data used in this training can also be queried through ABRicate.
9.3.2.3 Beyond a single isolate: variants and phylogeny
Everything in this module describes one genome in isolation — what genes it carries, and how confidently. It says nothing about whether two isolates are actually related. That's a separate question, answered by variant calling against a reference or core-genome alignment, then building a phylogenetic tree from the result. This is exactly the kind of question this training's own hospital surveillance samples raise: two isolates sharing the same blaIMP-15 cassette could reflect a single transmission chain, or nothing more than a coincidence of both carrying a common regional plasmid — phylogenetics is what actually distinguishes the two.
9.4 Exercise
How you run these commands is up to you
Type each command straight into the terminal, or write them into a script and execute that — whichever you find easier. Best to run everything from your home directory unless a step tells you otherwise.
Avoid typing a command out by hand, or copying it by selecting the text directly — it's easy to miss a line or pick up a stray character that way. Instead, hover over a code block and click the copy-to-clipboard button that appears in its corner.

-
Run AMRFinderPlus on your polished assembly — pick either 1A or 1B below. 1B additionally reports biocide, stress, and virulence genes (the "Plus" subset covered in Outputs, Section 9.3.1.2), but otherwise takes the same effort to run. This training's AMRFinderPlus database is at
~/data/ref/amrfinderplus_db/2026-08-07.1.1A. Without
--plus— Core AMR genes and point mutations only.Solution
sample_id=<your_sample_id> polished_assembly=medaka/consensus.fasta amrfinder_db=~/data/ref/amrfinderplus_db/2026-08-07.1 # AMR gene detection with AMRFinderPlus (Core set only) mkdir -p amrfinder amrfinder \ -n "${polished_assembly}" \ -d "${amrfinder_db}" \ --threads 4 \ > "amrfinder/${sample_id}.amrfinder_core.tsv"1B. With
--plus— also reports biocide, stress, and virulence hits.Solution
sample_id=<your_sample_id> polished_assembly=medaka/consensus.fasta amrfinder_db=~/data/ref/amrfinderplus_db/2026-08-07.1 # AMR gene detection with AMRFinderPlus (--plus captures biocide/stress/virulence too) mkdir -p amrfinder amrfinder \ -n "${polished_assembly}" \ -d "${amrfinder_db}" \ --plus \ --threads 4 \ > "amrfinder/${sample_id}.amrfinder_plus.tsv"
Cross-check against the assembly graph
We have prepared an additional visualisation command to help you understand what is happening in your sample: it draws each contig as a mock chromosome or plasmid — circular if Flye/Plassembler reported it as circular, a straight line otherwise — with your AMR/stress/virulence hits placed at their true position along it. Chromosome and plasmid contigs are drawn as two separate figures.
# Chromosome + plasmid maps, built from the --plus report plus Flye/Plassembler's
# circularity calls (writes <tsv-stem>.chromosome_map.png and .plasmid_map.png into --outdir)
python3 "${HOME}/scripts/utilities/amr_dna_map.py" \
--amrfinder-tsv "amrfinder/${sample_id}.amrfinder_plus.tsv" \
--flye-info flye/assembly_info.txt \
--plassembler-summary plassembler/plassembler_summary.tsv \
--id-map draft_assembly.fasta.id_map.txt \
--outdir amrfinder
-
Answer the following questions about your sample, using whichever report you generated in 1A or 1B. Note that a few of these are only answerable from the
--plusreport — if you only ran 1A, skip those.- Does this sample carry genes associated with resistance to any antibiotics?
- How many AMR genes are present?
- Which antibiotic classes are represented?
- Are any of the resistance genes on mobile elements that could support spread between bacteria or between species?
- Are the matches full-length or partial?
- Are there any efflux pump or stress-response genes that could contribute to reduced susceptibility or persistence?
- Does the sample appear to have a broader resistance profile or a narrow, single-class profile?
- Does this sample suggest a potential outbreak risk based on the presence of mobile AMR genes?
Wrap-up
You've now run AMRFinderPlus on your assembly and can read its Scope and Method columns to judge how confident each AMR gene call is. This is one of the most common real-world endpoints of bacterial long-read sequencing — identifying resistance genes to inform outbreak investigation and treatment decisions.
9.5 References
Hands-on: Pathogen detection from (direct Nanopore) sequencing data using Galaxy - Foodborne Edition / Pathogen detection from (direct Nanopore) sequencing data using Galaxy - Foodborne Edition / Microbiome. Accessed September 17, 2026. https://training.galaxyproject.org/training-material/topics/microbiome/tutorials/pathogen-detection-from-nanopore-foodborne-data/tutorial.html
Home · ncbi/amr Wiki. Accessed September 17, 2026. https://github.com/ncbi/amr/wiki/
NCBI - Pathogen Detection - NCBI. Accessed September 17, 2026. https://www.ncbi.nlm.nih.gov/pathogens/pathogens_help/#amr
Antimicrobial resistance. Accessed September 17, 2026. https://www.who.int/news-room/fact-sheets/detail/antimicrobial-resistance
Understand – Toolbox – ReAct. Accessed September 17, 2026. https://www.reactgroup.org/toolbox/understand/
Feldgarden M, Brover V, Haft DH, et al. Validating the AMRFinder Tool and Resistance Gene Database by Using Antimicrobial Resistance Genotype-Phenotype Correlations in a Collection of Isolates. Antimicrobial Agents and Chemotherapy. 2019;63(11):e00483-19. doi:10.1128/AAC.00483-19
Roberts LW, Enoch DA, Khokhar F, et al. Long-read sequencing reveals genomic diversity and associated plasmid movement of carbapenemase-producing bacteria in a UK hospital over 6 years. Microbial Genomics. 2023;9(7):mgen001048. doi:10.1099/MGEN.0.001048
Prussing C, Snavely EA, Singh N, et al. Nanopore MinION Sequencing Reveals Possible Transfer of blaKPC–2 Plasmid Across Bacterial Species in Two Healthcare Facilities. Frontiers in Microbiology. 2020;11:569311. doi:10.3389/FMICB.2020.02007/TEXT
Factors affecting bacterial pathogenicity. Accessed September 17, 2026. https://microbenotes.com/factors-affecting-bacterial-pathogenicity/
Jones IA, Joshi LT. Biocide Use in the Antimicrobial Era: A Review. Molecules 2021, Vol 26, Page 2276. 2021;26(8):2276. doi:10.3390/MOLECULES26082276
oschwengers/bakta: Rapid & standardized annotation of bacterial genomes, MAGs & plasmids. Accessed September 17, 2026. https://github.com/oschwengers/bakta
tseemann/prokka: :zap: Rapid prokaryotic genome annotation. Accessed September 17, 2026. https://github.com/tseemann/prokka
tseemann/abricate: :mag_right: Mass screening of contigs for antimicrobial and virulence genes. Accessed September 17, 2026. https://github.com/tseemann/ABRICATE
Fan S, Tsai CJY, Loh JMS, Proft T. Group A Streptococcal Virulence Factors and Vaccine Development—An Update. Microorganisms. 2026;14(2):357. doi:10.3390/MICROORGANISMS14020357