HomeTuberculosis Directly Observed TherapyGeneXpert Rapid TB Diagnostic Simulator

🫁 GeneXpert Rapid TB Diagnostic Simulator

This simulation provides a rapid molecular diagnostic tool for TB using the GeneXpert system, which is crucial for early detection and treatment.

Tuberculosis Directly Observed Therapy2DModerate60 FPS
genexpert-tb-diagnostic-simulator ↗ Open standalone

One Cartridge, One Patient — Automating Sample-to-Result TB Testing

The Xpert MTB/RIF assay (Cepheid) was the first WHO-endorsed molecular test to fully automate DNA extraction, amplification, and detection inside a single disposable plastic cartridge. A sputum sample mixed with sample reagent is pipetted directly into the cartridge — no biosafety cabinet, no separate extraction bench, no manual pipetting of reagents. This design collapsed what used to be a multi-day, multi-room laboratory workflow into roughly fifteen minutes of hands-on time followed by fully automated processing.

  • 2010: WHO endorsement (first molecular TB test recommended)
  • ~15 min: Hands-on time (sample prep to cartridge load)
  • 1:2: Sample:reagent ratio (sputum to sample reagent (SR))
  • Single-use: Cartridge use (sealed, disposable, no cross-contamination)

From sputum to cartridge — the sample preparation step

Before loading, the raw sputum specimen is treated with a proprietary Sample Reagent (SR) at a 2:1 SR:sputum ratio:

• SR is a sodium hydroxide / isopropanol-based liquefying and decontaminating agent • Liquefies mucoid sputum so it can be pipetted accurately • Kills the vast majority of viable mycobacteria and other pathogens present, reducing (though not eliminating) infectiousness before the sample leaves the biosafety-controlled area • Incubated at room temperature for 10–20 minutes with two agitation steps

After liquefaction, exactly 2 mL of treated sample is transferred with a supplied disposable pipette into the cartridge sample chamber. The cartridge is then closed and inserted into a module slot on the GeneXpert instrument — a modular platform typically configured with 4, 16, or more independent test modules per system, allowing a single instrument to run multiple patient samples in parallel, each fully isolated from the others.

Because each cartridge is single-use and internally sealed, there is no shared fluidics pathway between patients — eliminating the cross-contamination risk that plagued earlier in-house PCR assays run on open benchtop equipment.

What "fully automated" means inside the cartridge

Once the module door closes, the GeneXpert instrument takes full control of the internal cartridge mechanics for the remainder of the test:

• A built-in syringe-barrel mechanism draws and pushes fluid between the cartridge's internal chambers in a pre-programmed sequence • Ultrasonic transducers in the module bay drive sonication for cell lysis (Stage 2) • Reagent beads (pre-loaded, freeze-dried master mix) are automatically rehydrated at the correct step • An integrated Peltier-based thermocycler performs real-time PCR directly within a reaction tube built into the cartridge • An onboard optical module reads fluorescence from molecular beacon probes every cycle

The operator's role after cartridge loading is simply to select the assay and press start — the GeneXpert software (Cepheid GX system) manages every subsequent fluidic, thermal, and optical step, then outputs a structured result: MTB detected/not detected and, if detected, the rifampin resistance call.

Sonication and Lysis Inside a Closed System — Speed Without the Biosafety Burden

Traditional TB diagnostics — smear microscopy and especially culture — require handling concentrated, potentially aerosolizing mycobacterial material in dedicated biosafety cabinets, often within BSL-3 laboratories for culture work. GeneXpert moves cell lysis and DNA extraction entirely inside a sealed, single-use cartridge, so infectious aerosols generated during processing never reach the open laboratory environment.

  • Sonication: Lysis method (+ chemical lysis, fully enclosed)
  • BSL-2: Biosafety level needed (vs BSL-3 typically for culture)
  • ~20 min: Processing step time (lysis, filtration, wash, elution)
  • Minimal: Operator exposure (no open aerosol-generating steps)

Ultrasonic lysis of the mycobacterial cell wall

Mycobacterium tuberculosis has an unusually robust, lipid-rich cell wall (rich in mycolic acids) that resists simple chemical lysis — one reason TB culture historically required weeks of incubation just to get enough biomass to work with. Inside the GeneXpert cartridge, this resistant wall is broken down mechanically and chemically:

• Ultrasonic energy delivered through the module bay agitates a lysis chamber containing the processed sample plus glass/ceramic disruption beads • Combined with lysis buffer chemistry, sonication ruptures the mycolic-acid cell envelope, releasing genomic DNA into solution • The lysate then passes through an internal filter that captures and concentrates DNA while removing PCR inhibitors commonly present in sputum (e.g., host proteins, mucins, hemoglobin breakdown products) • A wash step flushes residual inhibitors before the purified DNA is eluted into the amplification chamber

All of this occurs in valved, sealed internal chambers — the technician never opens the cartridge again after the initial load, and no aerosol-generating manual step (like vortexing an open tube) is required.

Why this matters for biosafety and scale-up

Smear microscopy and culture-based TB diagnosis both require direct handling of sputum or bacterial cultures in open vessels, and culture in particular requires BSL-3-equivalent containment because it deliberately grows large quantities of a highly infectious, aerosol-transmissible pathogen. This limits where testing can be deployed — typically to centralized reference laboratories.

GeneXpert's closed-cartridge lysis changes the calculus:

• The infectious risk is front-loaded into the sample reagent decontamination step (Stage 1) and then physically contained within the sealed cartridge • WHO guidance allows Xpert MTB/RIF testing to be performed in settings with BSL-2-equivalent precautions, well below what culture requires • This has enabled decentralization of molecular TB testing to district-level and even peripheral health facilities in high-burden countries — settings that could never safely run mycobacterial culture • Removing the need for specialized containment infrastructure is a major reason GeneXpert scaled to millions of tests per year across more than 130 countries

Because lysis, extraction, and amplification all happen without the cartridge ever being reopened, a single trained health worker — not a specialized laboratory technologist — can safely run the test in a modest clinic setting.

Semi-Nested Real-Time PCR — Amplifying rpoB and Reading Rifampin Resistance Live

At the molecular core of the assay is a semi-nested real-time PCR reaction targeting the rpoB gene, which encodes the beta subunit of bacterial RNA polymerase. This single reaction accomplishes two things simultaneously: it confirms the presence of M. tuberculosis complex DNA, and — because more than 95% of rifampin-resistance mutations cluster in one small region of this same gene — it directly reads out rifampin susceptibility in real time, without any separate resistance test.

  • rpoB: Target gene (RNA polymerase β subunit)
  • 81 bp: Resistance-determining region (RRDR, codons 507–533)
  • 5: Molecular beacon probes (overlapping wild-type probes)
  • ~131 CFU/mL: Limit of detection (colony-forming units per mL sputum)

Semi-nested amplification for maximal sensitivity

The assay uses a semi-nested PCR strategy to boost sensitivity from limited starting DNA:

• First round: a large outer primer pair amplifies a broad region spanning the rpoB target, building up template copy number • Second round: an inner (nested) primer pair, sharing one primer with the first round, re-amplifies specifically within that product — dramatically increasing specificity and effective sensitivity for low-bacillary-load (paucibacillary) samples • The entire semi-nested reaction runs inside the same sealed tube, with cycling parameters and primer/probe chemistry automatically controlled by the GeneXpert thermocycler • Real-time fluorescence is read every cycle, generating an amplification curve much like conventional qPCR

This nested design is a major reason Xpert MTB/RIF achieves useful sensitivity even in smear-negative, paucibacillary specimens where the absolute number of bacterial genome copies is very low.

Five molecular beacons scanning the RRDR

Rifampin kills M. tuberculosis by binding RNA polymerase and blocking transcription. More than 95% of clinically significant rifampin resistance arises from point mutations within an 81-base-pair stretch of rpoB called the rifampin-resistance-determining region (RRDR, spanning codons 507–533) — mutations here alter the RNA polymerase binding pocket enough that rifampin can no longer bind effectively.

The assay covers this entire region with five overlapping molecular beacon probes, each labeled with a distinct fluorophore:

• Each beacon is complementary to a specific wild-type (non-mutated) sub-segment of the RRDR • A beacon binds and fluoresces only if its target sequence is a perfect match — a single mutated base weakens or abolishes binding • If all five beacons signal normally alongside amplification: wild-type rpoB → rifampin susceptible • If one or more beacons fail to bind (delayed or absent signal) while amplification still succeeds: a mutation is present in that beacon's region → rifampin resistance detected • Because the beacons overlap, virtually any single point mutation across the RRDR is captured by at least one probe

This is the same molecular logic used across most modern GeneXpert TB assays: five probes act as five independent "spell-checkers" reading the same 81-base sentence of the rpoB gene, and any one typo anywhere in that sentence flips the resistance call.

Reading the amplification curve and cycle threshold (Ct)

As amplification proceeds cycle by cycle, fluorescence intensity is plotted against cycle number, producing the familiar sigmoidal real-time PCR curve:

• Early cycles: fluorescence stays near baseline (too few copies to detect) • Exponential phase: once enough amplicon accumulates, fluorescence rises sharply, doubling roughly every cycle • Plateau: reagents are consumed and the curve flattens

The cycle threshold (Ct) — the cycle number at which fluorescence first crosses a defined detection threshold — is inversely related to starting DNA quantity: a high-bacillary-load sample crosses threshold early (low Ct, strong positive), while a paucibacillary, low-bacillary-load sample crosses much later (high Ct) or may not cross at all within the cycle limit, producing a "not detected" or borderline result. This is the molecular basis for why sensitivity is highest in smear-positive, high-bacillary-load disease and reduced in smear-negative, paucibacillary disease.

Two Hours Versus Six Weeks — A Diagnostic Speed Revolution

Before molecular testing, confirming active tuberculosis and its drug-susceptibility profile through culture required waiting for a famously slow-growing organism — M. tuberculosis divides roughly once every 18–24 hours — to form visible colonies or detectable growth signal. GeneXpert compresses that wait from weeks to hours, fundamentally changing what is possible in real-world TB care, especially where patients may not return for a second clinic visit.

  • ~2 hrs: GeneXpert result time (sample load to printed result)
  • 3–8 wks: Solid culture (LJ media) (Löwenstein-Jensen, visible colonies)
  • 1–2 wks: Liquid culture (MGIT) (faster automated liquid system)
  • Enabled: Same-day treatment start (result available within one visit)

Why culture is inherently slow

M. tuberculosis is an exceptionally slow-growing bacterium compared to most clinically important pathogens (E. coli, for comparison, can double in as little as 20 minutes under ideal conditions):

• Doubling time: roughly 18–24 hours • Solid media (Löwenstein-Jensen, egg-based agar slants): visible colonies typically take 3–8 weeks to appear • Liquid culture systems (e.g., BACTEC MGIT 960): automated fluorescence-based oxygen-consumption detection shortens this to roughly 1–2 weeks, still far slower than molecular testing • After positive culture, phenotypic drug-susceptibility testing (growing the isolate again in the presence of drugs) adds further weeks

This multi-week timeline was the standard of care for decades — meaning patients often began empiric treatment based on clinical suspicion and smear microscopy alone, with culture confirmation and resistance results arriving long after treatment decisions had already been made, or worse, after the patient was lost to follow-up.

What real-time molecular detection unlocks clinically

Because the entire Xpert MTB/RIF workflow — lysis, PCR amplification, and rifampin-resistance genotyping — completes in about two hours, it becomes feasible to deliver an actionable result within a single clinical encounter rather than across multiple visits spanning weeks:

• Patients in remote or resource-limited settings, who may travel long distances and struggle to return for follow-up, can receive a diagnosis and begin appropriate therapy the same day • Rifampin resistance status — a critical branch point for treatment selection — is available immediately alongside the TB diagnosis itself, rather than requiring a separate weeks-long resistance test after culture • Faster turnaround directly shortens the time an undiagnosed, untreated infectious patient continues transmitting M. tuberculosis in their household or community • Public health systems can redirect limited culture and phenotypic drug-susceptibility testing capacity toward confirmatory and second-line resistance testing rather than primary diagnosis

The WHO estimates that replacing smear microscopy with Xpert MTB/RIF as the initial diagnostic test can substantially reduce time-to-treatment-initiation, a change directly linked to reduced mortality and reduced ongoing community transmission in high-burden settings.

From Molecular Signal to Treatment Decision

The final output of the GeneXpert workflow is not just a laboratory value — it is a direct branch point in patient management. A combined TB-detection and rifampin-resistance report, generated automatically by the instrument software, tells the clinician within hours whether to start the standard first-line regimen or to urgently initiate a drug-resistant TB workup.

  • 2: Possible TB results (MTB detected / not detected)
  • 3: Possible rifampin calls (susceptible / resistant / indeterminate)
  • ~90%: Rifampin as MDR proxy (RIF-resistant strains also INH-resistant)
  • 6 months: First-line regimen length (standard HRZE-based therapy)

The four possible outcome combinations

Because the assay reports TB detection and rifampin resistance as two linked but distinct calls, four broad outcome patterns are possible:

1. MTB not detected: no further action from this test; if clinical suspicion remains high (e.g., paucibacillary or extrapulmonary disease), clinicians may repeat testing or pursue culture 2. MTB detected, rifampin susceptible: the large majority of results in most settings — supports starting the WHO-recommended standard first-line regimen without delay 3. MTB detected, rifampin resistance detected: triggers urgent referral for expanded (second-line) drug-susceptibility testing and initiation of a drug-resistant TB treatment pathway 4. MTB detected, rifampin resistance indeterminate: occurs when amplification succeeds for TB detection but the resistance probe signal is inconclusive (e.g., very low bacillary load); typically prompts repeat testing or reflex culture-based drug-susceptibility testing

Every result additionally carries a semi-quantitative bacillary-load estimate (e.g., high, medium, low, very low/trace) derived from the Ct value, which correlates with infectiousness and helps triage isolation precautions.

Why rifampin resistance is used as an MDR-TB proxy marker

Rifampin resistance is not tested merely because it is easy to detect — it is clinically strategic. Approximately 90% of rifampin-resistant M. tuberculosis strains are also resistant to isoniazid, the other cornerstone first-line drug. This strong correlation exists because rifampin resistance frequently arises later in the evolution of drug resistance, after isoniazid resistance has already developed under selective pressure from incomplete or mismanaged prior treatment.

As a result, rifampin resistance functions as a reliable surrogate marker for multidrug-resistant TB (MDR-TB, defined as resistance to at least both isoniazid and rifampin) — allowing a single rapid molecular test to flag patients who very likely need a fundamentally different treatment strategy, without waiting for a separate isoniazid-resistance assay.

Translating the result into a treatment pathway

Rifampin-susceptible pathway: • Start the standard WHO first-line regimen: isoniazid, rifampin, pyrazinamide, and ethambutol (HRZE) for 2 months, followed by isoniazid and rifampin (HR) for 4 months • Continue routine treatment monitoring (symptom review, sputum smear/culture conversion checks)

Rifampin-resistant pathway: • Immediately flag as presumptive MDR/RR-TB (rifampin-resistant TB) • Send the specimen or isolate for expanded second-line drug-susceptibility testing (e.g., line-probe assays for fluoroquinolones and second-line injectables, or extended phenotypic culture-based DST) • Initiate a WHO-recommended shorter all-oral regimen for drug-resistant TB where eligible (e.g., bedaquiline-based regimens such as BPaLM), rather than the standard first-line drugs • Enroll in enhanced case management: closer monitoring for treatment-related adverse events, and contact tracing/investigation given the higher transmission and treatment-failure risk associated with drug-resistant strains

A single molecular test, completed within one clinical visit, now routes a patient onto one of two very different treatment trajectories — a decision that previously depended on phenotypic culture-based resistance testing taking many additional weeks.
⚙ Under the hood

This simulation provides a rapid molecular diagnostic tool for TB using the GeneXpert system, which is crucial for early detection and treatment.

CanvasBiomedicine

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

What did you find?

Add reproduction steps (optional)