BIOL-380 · Lesson 11 of 12 · 28 min

Immunodeficiency and transplantation

This lesson examines two situations in which the immune system's normal behaviour becomes the problem. In immunodeficiency, part of the system is missing or fails, and infections that a healthy person would shrug off become dangerous. In transplantation, the system works exactly as it should, recognizing foreign tissue, and in doing so threatens a life-saving graft. The two topics are linked: transplant recipients are deliberately immunodeficient, and hematopoietic stem cell transplantation is the main cure for many inherited immunodeficiencies.

Primary immunodeficiencies

Primary immunodeficiencies, now often called inborn errors of immunity, are inherited defects in immune genes. More than 500 have been described, and although each is rare, together they affect perhaps one in 1,000 to 5,000 people, many undiagnosed. The pattern of infections points to the defective component. Defects in antibody production cause recurrent bacterial infections of the airways and sinuses, often starting after six months of age, when maternal IgG has waned. Defects in T cells cause infections with viruses, fungi and intracellular organisms, often severe from early infancy. Defects in phagocytes cause bacterial and fungal abscesses, and complement defects cause infections with encapsulated bacteria or, for terminal components, Neisseria (lesson 2).

Selected primary immunodeficiencies
CategoryExampleDefectTypical infections or features
Combined (T and B)Severe combined immunodeficiency (SCID)IL2RG (X-linked), ADA, RAG1/RAG2 and othersSevere viral, fungal and opportunistic infections in infancy; fatal without treatment
AntibodyX-linked agammaglobulinemiaBTK; no mature B cellsRecurrent bacterial infections from about 6 months; enteroviral infections
AntibodyCommon variable immunodeficiencyMostly unknown; low IgG with poor vaccine responsesRecurrent sinus and lung infections; autoimmunity
AntibodySelective IgA deficiencyLow IgA; most common (about 1 in 300–700 people of European descent)Often none; some infections and allergy
Class switchingHyper-IgM syndromeCD40 ligand or AIDBacterial and opportunistic infections (CD40L)
T cellDiGeorge syndrome (22q11.2 deletion)Thymic hypoplasiaVariable T cell deficiency; heart and parathyroid defects
PhagocyteChronic granulomatous diseaseNADPH oxidaseCatalase-positive bacteria and fungi (lesson 3)
RegulationIPEX, APS-1, ALPSFOXP3, AIRE, FasAutoimmunity (lessons 7–8)
InnateMyD88 or IRAK-4 deficiencyTLR signallingInvasive pyogenic bacterial infections in childhood

Severe combined immunodeficiency (SCID) is the most serious. Infants with SCID lack functional T cells and, depending on the defect, B and NK cells; they appear healthy at birth, protected by maternal antibody, but develop severe infections within months and die before age two unless treated. The most common form, X-linked SCID, results from mutations in IL2RG, which encodes the common γ chain shared by the receptors for interleukins 2, 4, 7, 9, 15 and 21; without interleukin-7 signalling, T cells cannot develop. David Vetter, the boy who lived in a plastic isolator in Texas from 1971 until 1984, had this form. Another form results from deficiency of adenosine deaminase (ADA), which causes toxic metabolites to accumulate in lymphocytes.

SCID can be cured by hematopoietic stem cell transplantation, best from an HLA-matched sibling and most successful when performed in the first months of life, before serious infections. It was also the first disease treated successfully by gene therapy: ADA-SCID in 1990 and X-linked SCID in 2000. Early gene therapy trials for X-linked SCID used retroviral vectors that inserted near cancer-causing genes and caused leukaemia in several children, which led to safer self-inactivating lentiviral vectors. An ex vivo gene therapy for ADA-SCID, Strimvelis, was approved in Europe in 2016. Because early diagnosis is crucial, newborn screening for SCID using T cell receptor excision circles (TRECs, lesson 6) became universal in the United States by 2018 and has been adopted by most Canadian provinces and territories since Ontario began screening in 2013.

Antibody deficiencies are the most common symptomatic primary immunodeficiencies. Bruton described X-linked agammaglobulinemia in 1952, in a boy with recurrent pneumonia whose serum lacked the gamma globulin fraction, and identified the treatment that is still used: replacement of antibodies. Today patients receive immunoglobulin purified from the pooled plasma of thousands of donors, given intravenously every three to four weeks or under the skin weekly. Common variable immunodeficiency, usually diagnosed in adolescence or adulthood, combines low antibody levels and poor vaccine responses with a high frequency of autoimmunity and lymphoma.

Secondary immunodeficiencies

Far more common than primary defects are secondary, or acquired, immunodeficiencies. Malnutrition is the most common cause worldwide, impairing thymic function and lymphocyte numbers. Others include extremes of age, chemotherapy and radiotherapy, corticosteroids and other immunosuppressive drugs, removal of the spleen, diabetes, chronic kidney disease, cancers of the immune system such as leukaemia, lymphoma and myeloma, and infections that damage immunity, of which HIV is the most important. Measles also causes temporary immunodeficiency through immune amnesia (lesson 9).

HIV and AIDS

Acquired immunodeficiency syndrome (AIDS) was first recognized in 1981, when clusters of young, previously healthy men in Los Angeles and New York developed Pneumocystis pneumonia and Kaposi sarcoma, diseases previously seen only in severely immunosuppressed people. In 1983 Françoise Barré-Sinoussi and Luc Montagnier at the Institut Pasteur isolated the causative retrovirus, human immunodeficiency virus (HIV), and received the 2008 Nobel Prize. HIV is transmitted through sexual contact, blood and from mother to child during pregnancy, birth or breastfeeding. Since the start of the epidemic, about 90 million people have been infected and more than 40 million have died; in 2024 about 40 million people were living with HIV worldwide.

HIV infects cells that express CD4 together with a chemokine coreceptor, CCR5 or CXCR4 (lesson 3): CD4 T cells, macrophages and dendritic cells. Its envelope glycoprotein binds CD4, changes shape, binds the coreceptor and fuses with the cell membrane. Reverse transcriptase copies the RNA genome into DNA, which the viral integrase inserts into the host genome, where it becomes a provirus. Reverse transcriptase lacks proofreading, so each replication cycle introduces mutations, and with billions of new virions made each day, HIV evolves within each person, escaping antibodies and CD8 T cells and developing drug resistance.

Untreated infection follows a typical course. In acute infection, the virus replicates explosively, peaking at millions of copies per millilitre of blood, and massively depletes CD4 T cells in the gut-associated lymphoid tissue within weeks; many people have a flu-like illness. CD8 T cell responses then bring the viral load down to a set point, and a clinically latent phase lasting on average about ten years follows, during which CD4 T cells decline steadily, driven by direct killing, pyroptosis of abortively infected cells and chronic immune activation. When the CD4 count falls below 200 cells per microlitre, compared with a normal range of roughly 500 to 1,500, opportunistic infections such as Pneumocystis pneumonia, cytomegalovirus, toxoplasmosis and cryptococcal meningitis appear, defining AIDS.

A graph over about 12 years. The CD4 T cell count, on the left axis, falls sharply in the first weeks, partly recovers, then declines steadily through the clinically latent period to below 200 cells per microlitre, where opportunistic infections and AIDS begin. The viral load, on a logarithmic right axis, peaks in acute infection, falls to a set point, then rises again in late disease. A shaded band at the top indicates acute infection, clinical latency and AIDS.
The typical course of untreated HIV infection

Antiretroviral therapy (ART), combining drugs that inhibit reverse transcriptase, integrase, protease and viral entry, transformed HIV from a fatal disease into a chronic manageable condition after the introduction of combination therapy in 1996. Effective treatment suppresses the viral load below the limit of detection, allows CD4 counts to recover and gives near-normal life expectancy when started early. People with an undetectable viral load do not transmit HIV sexually, a finding summarized as undetectable equals untransmittable (U=U), established by large studies such as PARTNER and HPTN 052. Pre-exposure prophylaxis (PrEP) with daily oral tenofovir-based pills, or long-acting injections, protects HIV-negative people at risk; in June 2025 the US Food and Drug Administration approved lenacapavir, a capsid inhibitor injected twice a year, for PrEP after trials showed nearly complete protection.

ART does not cure HIV, because the provirus persists in a latent reservoir of long-lived resting memory CD4 T cells, which produce no viral proteins and are invisible to immune responses; if ART stops, virus rebounds within weeks. A handful of people, fewer than ten, have apparently been cured after receiving stem cell transplants for leukaemia or lymphoma from donors who were homozygous for CCR5-Δ32 (lesson 3), beginning with Timothy Ray Brown, the Berlin patient, in 2008. Because such transplants are dangerous, research focuses on strategies to reduce or silence the reservoir, broadly neutralizing antibodies that recognize conserved sites on the HIV envelope, and therapeutic vaccines.

In Canada, an estimated 65,000 people were living with HIV at the end of 2022, the most recent national estimate from the Public Health Agency of Canada, and diagnoses have risen since 2020, with large increases in Saskatchewan and Manitoba, where injection drug use is a major route of transmission and Indigenous people are disproportionately affected. Canada has committed to the global 95-95-95 targets: 95 per cent of people with HIV diagnosed, 95 per cent of those on treatment and 95 per cent of those virally suppressed. Treatment and PrEP coverage are provided through provincial programs, which differ in eligibility and cost (figures as reported by PHAC; check current estimates).

CD4 counts are measured by flow cytometry. Cells in a blood sample are labelled with fluorescent antibodies against surface markers and passed one at a time through laser beams; detectors measure scattered light, which reflects cell size and granularity, and fluorescence, which reveals the markers each cell carries. Analysts draw gates around populations in successive two-dimensional plots, first identifying lymphocytes by their scatter, then T cells by CD3, then CD4 and CD8 subsets.

Gating a simulated flow cytometry data set to obtain a CD4 count (synthetic data)
import random
# Simulated flow cytometry gating: count CD4 T cells in a blood sample (synthetic data).
random.seed(380)
cells = []
def add(n, cd3, cd4, cd8, kind):
    for _ in range(n):
        cells.append((random.gauss(cd3, 0.35), random.gauss(cd4, 0.35), random.gauss(cd8, 0.35), kind))
# log-scale marker intensities: about 1 = negative, about 3.5 = positive
add(1800, 3.5, 3.5, 1.0, "CD4 T")
add(1100, 3.5, 1.0, 3.5, "CD8 T")
add(600, 1.0, 1.0, 1.0, "B or NK")
add(500, 1.0, 2.2, 1.0, "monocyte")    # monocytes carry low CD4 but no CD3
t_cells = [c for c in cells if c[0] > 2.3]                 # gate 1: CD3-positive
cd4 = [c for c in t_cells if c[1] > 2.3 and c[2] < 2.3]    # gate 2: CD4+ CD8-
cd8 = [c for c in t_cells if c[2] > 2.3 and c[1] < 2.3]
lymphs_per_ul = 2000       # absolute lymphocyte count from a blood count (cells per microlitre)
lymph_events = len([c for c in cells if c[3] != "monocyte"])
cd4_fraction = len(cd4) / lymph_events
print(f"events: {len(cells)}; CD3+ T cells: {len(t_cells)}; CD4+: {len(cd4)}; CD8+: {len(cd8)}")
print(f"CD4 cells as share of lymphocytes: {cd4_fraction:.1%}")
print(f"absolute CD4 count: about {cd4_fraction * lymphs_per_ul:.0f} cells per microlitre")
print(f"CD4:CD8 ratio: {len(cd4) / len(cd8):.2f}")
contaminated = len([c for c in cells if c[1] > 2.0])
print(f"if gating on CD4 alone (no CD3 gate), {contaminated} events would be counted, including monocytes")
Output
events: 4000; CD3+ T cells: 2899; CD4+: 1799; CD8+: 1100
CD4 cells as share of lymphocytes: 51.4%
absolute CD4 count: about 1028 cells per microlitre
CD4:CD8 ratio: 1.64
if gating on CD4 alone (no CD3 gate), 2177 events would be counted, including monocytes

The simulation shows why gating order matters. Monocytes carry low levels of CD4, so gating on CD4 alone would overcount CD4 T cells; gating first on CD3 removes them. The CD4 percentage is converted into an absolute count using the lymphocyte count from a standard blood test. The simulated sample, with a CD4 count of about 1,000 cells per microlitre and a CD4 to CD8 ratio of about 1.6, is normal; in untreated HIV infection both values fall.

Transplantation

Transplantation of kidneys, livers, hearts, lungs, pancreases, corneas and bone marrow saves or improves tens of thousands of lives each year. The first successful kidney transplant, performed by Joseph Murray in Boston in 1954, was between identical twins, avoiding rejection. Peter Medawar's experiments in the 1940s and 1950s showed that rejection is an immune response, with second grafts from the same donor rejected faster, and that tolerance to grafts could be induced in newborn mice, work for which he shared the 1960 Nobel Prize with Burnet.

Recipients recognize donor HLA molecules in two ways. In direct recognition, recipient T cells bind intact donor MHC molecules on donor dendritic cells that migrate out of the graft; this pathway involves the high frequency of alloreactive T cells described in lesson 4 and dominates early acute rejection. In indirect recognition, recipient dendritic cells take up donor proteins, including MHC, and present donor peptides on recipient MHC, as for any foreign antigen; this pathway drives antibody production and chronic rejection.

Types of transplant rejection
Type of rejectionTimingMechanismPrevention or treatment
HyperacuteMinutes to hoursPreformed antibodies against donor ABO or HLA antigens activate complement on graft endotheliumABO matching and crossmatch testing before transplant
Acute cellularDays to monthsT cells, mostly via direct recognition, infiltrate and damage the graftImmunosuppression; corticosteroids or T cell-depleting antibodies
Acute antibody-mediatedDays to monthsNew donor-specific antibodies injure graft vesselsPlasma exchange, intravenous immunoglobulin, B cell-targeting drugs
ChronicMonths to yearsIndirect recognition, antibodies and non-immune factors cause vascular narrowing and fibrosisDifficult; the main cause of long-term graft loss

Transplant success depends on matching and immunosuppression. ABO compatibility is essential for most organs, and recipients are tested for preformed antibodies against donor HLA, by a crossmatch with donor cells and by testing serum against panels of HLA antigens; highly sensitized recipients, often women who have had several pregnancies or people with previous transplants, wait longest for compatible organs. HLA matching improves kidney graft survival but is less important for livers and is limited for hearts and lungs by the time available. Most recipients take lifelong combinations of a calcineurin inhibitor such as tacrolimus, which blocks NFAT activation and interleukin-2 production (lesson 6), an antiproliferative drug such as mycophenolate and, often, corticosteroids, with T cell-depleting or anti-CD25 antibodies at the time of transplant. These drugs increase the risks of infection, including cytomegalovirus and BK virus, and of cancers driven by viruses, such as Epstein–Barr virus-associated lymphoma and skin cancers.

Hematopoietic stem cell transplantation, used for leukaemia, lymphoma, inherited immunodeficiencies and blood disorders, poses the reverse problem. The recipient's immune system is first destroyed with chemotherapy or radiation; the graft then contains donor T cells that can attack the recipient, causing graft-versus-host disease (GVHD), which damages the skin, gut and liver. Close HLA matching reduces GVHD, but mismatched transplants from half-matched relatives are now possible with post-transplant cyclophosphamide, which selectively kills alloreactive T cells after they begin to divide. Donor T cells also attack residual leukaemia cells, the graft-versus-leukaemia effect, which is part of why transplantation cures some forms of leukaemia.

Organ shortage is the main limit on transplantation. Xenotransplantation, transplanting organs from other species, is being revived with pigs genetically modified to remove carbohydrate antigens such as α-gal, which humans' preformed antibodies attack, and to add human complement regulators and other protective genes. Pig hearts were transplanted into two patients at the University of Maryland in 2022 and 2023, and pig kidneys into several living patients in Boston and New York from 2024; the first recipients survived weeks to months, and by 2025 the US Food and Drug Administration had allowed formal clinical trials of pig kidney transplants to begin (status as of 2025–2026; this field is changing rapidly).

In Canada, about 3,000 or more organ transplants are performed each year, and several thousand people are on waiting lists. Organ donation is organized provincially, with Canadian Blood Services coordinating interprovincial sharing through the Canadian Transplant Registry. Nova Scotia became the first jurisdiction in North America to adopt deemed consent for deceased organ donation, in effect since January 2021: adults are presumed to consent unless they have opted out. Other provinces use opt-in registries.

Worked problem

Interpreting a pattern of infections

A 9-month-old boy has had pneumococcal pneumonia twice and Haemophilus influenzae otitis media three times, but recovered normally from chickenpox. His maternal uncle had similar infections. Serum IgG, IgA and IgM are all very low, and flow cytometry shows almost no CD19-positive B cells but normal T cell numbers. What is the diagnosis, and why did infections begin after six months?

Show solution
  1. Recurrent infections with encapsulated bacteria and normal handling of a viral infection suggest an antibody defect with intact T cells.
  2. Absent B cells, very low antibodies of all classes and X-linked inheritance point to X-linked agammaglobulinemia, caused by mutations in BTK.
  3. Maternal IgG transferred across the placenta protected him for the first months; infections began as it waned.
  4. Treatment is lifelong immunoglobulin replacement and prompt antibiotics; live vaccines are generally avoided.

Answer: X-linked agammaglobulinemia; maternal IgG protected him until about six months of age.

Common mistakes

  • MistakeAssuming all immunodeficiencies cause the same infections.

    InsteadThe infections reveal the defect: bacteria for antibody, opportunists and viruses for T cells, abscesses for phagocytes.

  • MistakeThinking antiretroviral therapy cures HIV.

    InsteadART suppresses replication but a latent reservoir persists; stopping treatment leads to rebound.

  • MistakeGating on CD4 alone to count helper T cells.

    InsteadMonocytes also carry CD4; gate on CD3 first.

  • MistakeBelieving rejection is mainly caused by antibodies to ABO antigens in modern transplants.

    InsteadABO matching prevents hyperacute rejection; T cells and donor-specific antibodies cause most rejection now.

  • MistakeTreating graft-versus-host disease as rejection of the graft.

    InsteadIn GVHD, donor T cells attack the recipient; it is the reverse of rejection.

Summary and key terms

  • Inborn errors of immunity number more than 500; the pattern of infections points to the defective component.
  • SCID is fatal without stem cell transplantation or gene therapy; newborn TREC screening enables early cure.
  • X-linked agammaglobulinemia and common variable immunodeficiency are treated with immunoglobulin replacement.
  • HIV infects CD4 cells through CD4 and CCR5 or CXCR4, depletes CD4 T cells and causes AIDS below 200 cells per microlitre.
  • ART suppresses HIV, U=U prevents sexual transmission and PrEP protects; a latent reservoir prevents cure.
  • Rejection involves direct and indirect allorecognition; matching, crossmatching and immunosuppression prevent it.
  • Stem cell transplants risk GVHD but also provide graft-versus-leukaemia effects; xenotransplantation is entering clinical trials.
primary immunodeficiency
An inherited defect of immune function, also called an inborn error of immunity.
secondary immunodeficiency
An acquired loss of immune function due to disease, drugs or malnutrition.
severe combined immunodeficiency
A group of inherited disorders with absent T cell (and often B cell) function.
provirus
Viral DNA integrated into the host genome.
viral set point
The steady viral load reached after acute HIV infection.
latent reservoir
Long-lived infected cells carrying silent provirus that persists despite ART.
PrEP
Pre-exposure prophylaxis with antiretroviral drugs to prevent HIV infection.
flow cytometry
Measurement of light scatter and fluorescence of single cells to identify cell types.
direct allorecognition
Recognition by recipient T cells of intact donor MHC molecules.
graft-versus-host disease
Attack on the recipient by donor T cells after stem cell transplantation.
xenotransplantation
Transplantation of cells, tissues or organs between species.

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. What pattern of infections suggests a T cell defect?

    Show answer

    Severe viral, fungal and opportunistic infections from early infancy.

  2. Why does IL2RG deficiency abolish T cell development?

    Show answer

    The common γ chain is needed for IL-7 signalling, which T cell development requires.

  3. What caused leukaemia in early SCID gene therapy trials?

    Show answer

    Retroviral vectors inserted near cancer-causing genes.

  4. Which receptors does HIV use to enter cells?

    Show answer

    CD4 together with CCR5 or CXCR4.

  5. What CD4 count defines AIDS?

    Show answer

    Below 200 cells per microlitre.

  6. What does U=U mean?

    Show answer

    People with an undetectable viral load do not transmit HIV sexually.

  7. Distinguish direct and indirect allorecognition.

    Show answer

    Direct: T cells recognize intact donor MHC; indirect: donor peptides presented on recipient MHC.

  8. What is the graft-versus-leukaemia effect?

    Show answer

    Donor T cells in a stem cell transplant kill residual leukaemia cells.

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz