HomeHIV Antiretroviral Therapy ManagementHIV Drug Resistance Genotype Testing Simulator

🧬 HIV Drug Resistance Genotype Testing Simulator

This simulation helps healthcare providers interpret genotypic resistance tests to determine the most effective antiretroviral drugs for a patient with HIV, based on viral genetic mutations.

HIV Antiretroviral Therapy Management2DModerate60 FPS
hiv-genotype-resistance-testing-simulator ↗ Open standalone

From Plasma to Sequence — Amplifying and Reading the HIV Genome

Genotypic resistance testing begins with a blood draw during active viremia. Viral RNA is extracted from plasma, reverse-transcribed into cDNA, and amplified by RT-PCR across the three genes that encode the enzymatic targets of nearly every approved antiretroviral: reverse transcriptase, protease, and integrase. The resulting amplicons are sequenced — traditionally by Sanger (population) sequencing, increasingly by next-generation sequencing (NGS) — to yield the raw nucleotide data that every downstream resistance call depends on.

  • 500–1,000: Minimum viral load (copies/mL (assay dependent))
  • 3–7 days: Turnaround time (population Sanger sequencing)
  • 3: Genes routinely sequenced (RT, protease, integrase)
  • 1–20%: NGS minority-variant floor (platform/pipeline dependent)

From plasma to amplicon — extraction, RT-PCR, and library prep

Plasma is separated from whole blood by centrifugation and, if not processed immediately, frozen at −70°C. Viral RNA is purified by silica-column or magnetic-bead extraction, then converted to cDNA by reverse transcription using gene-specific or random primers.

Gene-specific nested or one-step RT-PCR then amplifies three overlapping regions: • Reverse transcriptase (RT): codons 1–240 of the 560-amino-acid enzyme, covering essentially all clinically validated NRTI and NNRTI resistance positions • Protease (PR): the full 99-amino-acid gene, small enough to sequence in its entirety • Integrase (IN): codons spanning the catalytic core and C-terminal domains of the 288-amino-acid enzyme, covering all validated INSTI resistance positions

At low viral loads (<1,000 copies/mL), nested PCR — a second round of amplification using primers internal to the first product — improves sensitivity and success rate, since template copy number is the limiting factor for amplification, not enzyme fidelity.

Purified amplicons are then submitted to cycle sequencing (Sanger) or fragmented into a sequencing library (NGS) for base calling.

Population Sanger sequencing versus next-generation sequencing

Population (Sanger) sequencing has been the clinical standard since the late 1990s. It reports the dominant "consensus" base at each position and reliably detects viral variants present at roughly ≥20% of the circulating quasispecies — variants below that threshold are invisible as mixed peaks are averaged away.

Next-generation sequencing (Illumina, Ion Torrent, and increasingly nanopore-based platforms) sequences millions of individual template molecules in parallel, enabling detection of minority resistant variants down to 1–2% of the viral population with appropriately validated bioinformatic pipelines. This matters clinically: transmitted or archived minority resistance mutations below the Sanger cutoff have been associated with a higher risk of early virologic failure, particularly for NNRTI-containing regimens.

Despite its sensitivity advantage, NGS interpretation is not yet fully standardized across laboratories — cutoffs for calling a variant "real" versus PCR/sequencing error vary by platform, and most clinical guidelines still anchor primarily on Sanger-equivalent (≥20%) calls for regimen decisions, with NGS used as a supplementary or research tool.

Because Sanger sequencing only reports variants present above roughly 20% of the viral population, a clinically important resistance mutation selected earlier in a patient's treatment history can "disappear" from a genotype report once therapy is stopped and wild-type virus re-emerges as dominant — even though the resistant variant persists archived in latent reservoirs and can re-emerge under future drug pressure. This is why cumulative, not just current, genotype results guide regimen selection.

Codon-by-Codon Comparison — Calling Resistance-Associated Mutations

Once a clean consensus sequence is obtained, it is aligned against the HIV-1 HXB2 reference genome — the historical subtype B prototype sequence to which all resistance codon numbering is anchored. Every amino acid position where the patient's virus differs from wild-type is examined against curated mutation lists (IAS-USA, Stanford HIVdb) to determine whether the substitution is a recognized resistance-associated mutation (RAM), a harmless natural polymorphism, or an uncharacterized novel variant.

  • 9,719 bp: HXB2 genome length (HIV-1 subtype B prototype)
  • aa 1–240: RT resistance-relevant span (of 560 aa full-length RT)
  • 99 aa: Protease length (small homodimeric aspartic protease)
  • 288 aa: Integrase length (catalyzes strand transfer)

Alignment against HXB2 and subtype-aware interpretation

Automated pipelines (Stanford HIVdb's Sierra engine, REGA, HyDRA) align the query sequence to HXB2 and translate nucleotides to the standard amino-acid codon numbering used in every clinical guideline and publication. This numbering convention lets a clinician anywhere in the world read "K103N" and immediately know it refers to lysine-to-asparagine at RT codon 103.

Interpretation must be subtype-aware: HIV-1 group M comprises subtypes A–D, F–H, J, K and dozens of circulating recombinant forms (CRF01_AE, CRF02_AG, etc.), each carrying natural polymorphisms at positions that differ from the subtype B reference without conferring resistance. An algorithm blind to subtype background could over-call resistance in non-B subtypes; validated interpretation systems apply subtype-specific baseline corrections.

Major, accessory, and polymorphic mutations

Not every amino-acid difference from wild-type carries equal weight. Curated resistance mutation lists (updated regularly by the IAS-USA panel) sort substitutions into tiers:

• Major (primary) mutations — arise directly under drug selective pressure, substantially reduce drug binding on their own, and are rarely seen in untreated patients (e.g., M184V, K103N, N155H) • Accessory (secondary/compensatory) mutations — usually emerge after major mutations, restore replicative fitness lost to the major mutation, or modestly increase the resistance level in combination (e.g., L10I, A71V, G140S) • Polymorphic mutations — natural subtype variation with no independent resistance effect, though they can modulate the genetic pathway a virus takes toward resistance

Distinguishing these tiers is essential because interpretation algorithms weight them very differently: a single major mutation can flip a drug from fully active to high-level resistant, while an accessory mutation alone typically leaves susceptibility largely intact.

M184V — the signature lamivudine/emtricitabine resistance mutation — is a striking example of a mutation with mixed consequences: it confers high-level 3TC/FTC resistance, but it also measurably reduces viral replicative fitness and, counterintuitively, increases susceptibility to zidovudine and tenofovir. Some clinicians deliberately retain 3TC/FTC in a regimen specifically to maintain selective pressure for M184V as a fitness-lowering, partially resensitizing mutation.

Scoring Genotype into Predicted Drug Susceptibility

A raw list of detected mutations is clinically useless without translation into an actionable susceptibility prediction. Rules-based interpretation algorithms — most widely the Stanford HIVdb algorithm, alongside ANRS (France) and REGA (Belgium) — assign each mutation a penalty score against every antiretroviral drug, sum interacting mutation combinations, and output a five-tier susceptibility call per drug that clinicians read directly off the resistance report.

  • 3: Major algorithms in clinical use (Stanford HIVdb, ANRS, REGA)
  • 5: Susceptibility tiers (HIVdb) (susceptible → high-level resistance)
  • ~20: Drugs scored per report (across 4 major drug classes)
  • Ongoing: Algorithm revision cadence (continuously updated rule sets)

Rules-based scoring — from mutation list to five-tier susceptibility call

Each interpretation algorithm encodes, for every drug, a table of mutation penalty scores derived from correlating thousands of clinical genotypes with matched phenotypic resistance data. Scores are summed across all mutations detected in a sample, with additional rules capturing known synergistic combinations (mutations that amplify resistance together) and antagonistic combinations (mutations that partially offset one another, such as K65R's antagonism with certain thymidine-analog mutation pathways).

The cumulative score for each drug is then mapped onto a standardized five-tier scale: Susceptible → Potential Low-Level Resistance → Low-Level Resistance → Intermediate Resistance → High-Level Resistance

This tiered output — rather than a single yes/no resistant flag — lets clinicians weigh partially active drugs (which can still contribute meaningfully to a regimen, especially in combination) differently from drugs with no expected activity at all.

Genotype-phenotype correlation and algorithm validation

The penalty scores underlying every genotypic algorithm are calibrated against phenotypic resistance assays (historically PhenoSense, Antivirogram) that directly measure the fold-change in drug concentration needed to inhibit a patient-derived recombinant virus relative to wild-type in cell culture. Phenotyping is slower and more expensive than genotyping, so it is reserved for complex, heavily mutated cases where genotypic interpretation is ambiguous.

Because the three major algorithms (HIVdb, ANRS, REGA) were built from overlapping but non-identical training data and rule logic, they can disagree in roughly 10–15% of complex mutation patterns — most often for protease inhibitors and second-generation integrase inhibitors, where resistance is driven by combinations of accessory mutations rather than a single dominant change. Clinical laboratories typically report the HIVdb interpretation as primary, with algorithm discordance flagged for expert review.

Interpretation algorithms are not static: as new phenotypic and clinical outcome data accumulate, rule sets are revised — meaning the very same raw sequence submitted in 2015 and again in 2024 can yield a different resistance call, particularly for newer drugs like doravirine or bictegravir that had limited calibration data at the time of their approval.

How Resistance Pathways Differ Across NRTI, NNRTI, PI, and INSTI

Resistance does not accumulate uniformly across antiretroviral classes — each class has a distinct genetic barrier, a distinct set of resistance pathways, and a distinct relationship between mutation count and clinical impact. Understanding these class-specific patterns is what allows a genotype report to be read as a strategic map rather than a flat list of substitutions.

  • M184V/I: NRTI signature mutation (3TC/FTC resistance; resensitizes TDF)
  • 1 mutation: NNRTI genetic barrier (often sufficient for high-level resistance)
  • 3–4+ mutations: PI genetic barrier (boosted) (typically needed for failure)
  • High: 2nd-gen INSTI barrier (dolutegravir/bictegravir resist single mutations)

NRTI and NNRTI resistance pathways in reverse transcriptase

NRTI resistance evolves along two broadly distinct pathways affecting the thymidine-analog drugs (AZT, d4T) via nucleotide excision: • Thymidine-analog mutation (TAM) pathway 1: M41L, L210W, T215Y • TAM pathway 2: D67N, K70R, K219Q/E

Both pathways enhance the enzyme's ability to excise an incorporated chain-terminating nucleotide, restoring polymerization. Separately, M184V/I confers high-level resistance to lamivudine/emtricitabine through steric interference at the enzyme active site, while K65R reduces susceptibility to tenofovir and abacavir and is notably antagonistic with the TAM pathway — viruses rarely carry both efficiently.

NNRTI resistance has a fundamentally lower genetic barrier: because non-nucleoside inhibitors bind a single hydrophobic pocket rather than the catalytic site, a single well-placed substitution (K103N, Y181C, G190A, or E138K) can produce high-level resistance to efavirenz and nevirapine in one step. Doravirine and, to a lesser extent, rilpivirine retain partial activity against some — but not all — of these first-generation NNRTI mutations.

PI and INSTI resistance pathways in protease and integrase

Protease inhibitor resistance behaves very differently. Major mutations at the substrate-binding cleft (D30N — nelfinavir-specific, V82A, I50V, L90M) each modestly reduce susceptibility, but boosted PI regimens (ritonavir- or cobicistat-boosted) maintain drug trough concentrations so high that multiple accumulated mutations — typically three to four or more — are usually required before clinically meaningful failure occurs. This high genetic barrier is a principal reason boosted darunavir remains a reliable backbone even in treatment-experienced patients.

Integrase strand-transfer inhibitors (INSTIs) split into two genetic-barrier tiers. First-generation raltegravir and elvitegravir share resistance pathways through N155H or the Q148H/R/K pathway (often with secondary mutations G140S/A), each of which alone can cause clinically significant resistance. Second-generation dolutegravir and bictegravir were specifically engineered to remain active against the N155H pathway and single Q148 mutations, giving them a markedly higher genetic barrier — though accumulation of Q148 plus multiple secondary mutations, or emergence of R263K, can still erode their activity.

Cross-drug overlap within a class

Mutations within a class do not uniformly compromise every drug in that class. K65R, for example, primarily reduces susceptibility to tenofovir and abacavir but has minimal effect on zidovudine; M184V affects only lamivudine/emtricitabine within the NRTI class while modulating (not blocking) others. This intra-class heterogeneity is precisely why a genotype report lists per-drug — not just per-class — susceptibility, and why "reduced susceptibility to the class" and "resistant to every drug in the class" are clinically distinct statements.

Turning Genotype Results into a Resistance-Informed Regimen

The entire genotyping workflow exists to answer one clinical question: which drugs will still work? Guideline bodies (DHHS, EACS, IAS-USA, WHO) converge on the same core principle — a new or salvage regimen must combine at least two, ideally three, agents predicted to retain full activity, drawn preferentially from classes and drugs unaffected by the mutations just characterized.

  • ≥2: Fully active agents recommended (when constructing a new regimen)
  • DTG/BIC-based: Preferred first-line backbone (per WHO / DHHS 2024 guidance)
  • Recommended: Baseline resistance testing (for all newly diagnosed patients)
  • On therapy: Repeat testing at failure (or within ~4 weeks of stopping)

Principles of resistance-informed regimen construction

The cardinal rule of resistance management is never to add a single active drug to a failing regimen — doing so risks selecting resistance to that new agent as well, functionally burning a future option while control of viremia may not even be achieved. Instead, clinicians construct a new regimen with at least two, and ideally three, fully active agents identified from the current and cumulative historical genotype.

Cumulative interpretation matters because Sanger sequencing only detects the currently dominant viral population; mutations selected during a prior failed regimen can archive in latent reservoirs and re-emerge under renewed drug pressure even if absent from the present-day report. Guidelines therefore instruct clinicians to treat a patient as resistant to any drug flagged by any historical genotype, not only the most recent one.

Beyond raw susceptibility, regimen selection weighs adherence barriers, pill burden, tolerability, drug-drug interactions, renal and bone safety (relevant to tenofovir formulation choice), and pregnancy status — resistance data narrows the field of eligible drugs, but does not alone determine the final prescription.

Special cases — multidrug resistance and salvage therapy

A minority of heavily treatment-experienced patients accumulate resistance spanning NRTI, NNRTI, PI, and INSTI classes simultaneously, leaving few or no fully active legacy drugs. For this population, agents with novel mechanisms unaffected by classical RAMs have expanded options considerably:

• Fostemsavir — a gp120 attachment inhibitor blocking viral entry upstream of coreceptor binding • Ibalizumab — a CD4-directed monoclonal antibody that sterically blocks the conformational change needed for entry • Lenacapavir — a long-acting capsid inhibitor disrupting multiple stages of the viral lifecycle

These agents are typically combined with an optimized background regimen built from any legacy drugs still showing partial activity, aiming to reconstruct at least two active agents even in extensively drug-resistant virus.

Because transmitted drug resistance — resistance acquired at the time of initial infection from a source partner's resistant virus, without the newly diagnosed patient ever having taken antiretrovirals — occurs in roughly 10–15% of new diagnoses in many regions (and higher for NNRTI mutations specifically in some settings), DHHS and WHO guidelines recommend baseline genotypic resistance testing for essentially every newly diagnosed patient before selecting a first-line regimen, not only for patients who later experience virologic failure.
⚙ Under the hood

This simulation helps healthcare providers interpret genotypic resistance tests to determine the most effective antiretroviral drugs for a patient with HIV, based on viral genetic mutations.

CanvasBiomedicine

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)