The innate immune system responds to patterns. The adaptive immune system responds to specific sequences. It takes days to mobilize, but once it recognizes a pathogen, it targets it with precise, high-affinity molecules and remembers it for a lifetime. This specificity is the basis of all vaccines, the mechanism that makes natural infection protective, and the target of essentially all modern immunotherapy.
Understanding adaptive immunity is not optional for bioinformatics practitioners in biology — T cell and B cell receptor sequencing is a major data type, immune checkpoints are the most successful class of cancer drugs, and patient immune phenotypes are critical biomarkers for drug response and disease progression.
The Two Branches
The adaptive immune system has two effector branches:
Humoral immunity — mediated by B cells and the antibodies they produce. Antibodies are secreted proteins that bind specific antigens (molecular targets) with high affinity and neutralize pathogens or mark them for destruction.
Cellular immunity — mediated by T cells. Cytotoxic T cells (CD8+) directly kill infected or cancerous cells. Helper T cells (CD4+) orchestrate the immune response — activating B cells, macrophages, and cytotoxic T cells.
Both branches require initial activation by antigen-presenting cells (primarily dendritic cells), which process and display pathogen-derived peptides to T cells in lymph nodes.
Antigen Recognition: The Core Molecular Logic
MHC Presentation
Every nucleated cell in the body constantly displays fragments of its internal proteins on the cell surface, bound to MHC (Major Histocompatibility Complex) molecules:
MHC class I (HLA-A, HLA-B, HLA-C): Presents peptides from intracellular proteins (~8–10 aa). These include self-proteins (normal), viral proteins (in infected cells), and mutant tumor proteins (neoantigens). Recognized by CD8+ T cells.
MHC class II (HLA-DR, HLA-DP, HLA-DQ): Presents peptides from extracellular proteins taken up by phagocytosis or endocytosis (~13–25 aa). Found only on professional antigen-presenting cells (DCs, macrophages, B cells). Recognized by CD4+ T cells.
The MHC proteins are the most polymorphic in the human genome — hundreds of alleles per locus. This polymorphism means different people's MHC molecules present different peptide repertoires from the same pathogen, explaining some individual differences in infection susceptibility and vaccine response.
MHC proteins are encoded by the HLA (Human Leukocyte Antigen) loci. HLA typing — determining a patient's specific HLA alleles — is required for:
- Organ transplant matching (mismatched HLA causes rejection)
- Predicting vaccine response (some HLA types present vaccine antigens better)
- Predicting drug hypersensitivity (abacavir hypersensitivity in HIV patients with HLA-B*57:01)
- Neoantigen prediction in cancer immunotherapy (which tumor mutations will be presented to T cells depends on the patient's HLA type)
HLA typing is now performed computationally from WGS/WES data using tools like HLA-HD, OptiType, or POLYSOLVER.
T Cell Receptors (TCR)
Each T cell expresses a unique T cell receptor (TCR) — a surface protein that recognizes a specific peptide-MHC complex. TCRs are generated by V(D)J recombination: the DNA segments encoding the receptor are cut and spliced together randomly from gene segments (V, D, J), generating enormous diversity (~10¹⁸ possible combinations for αβ TCRs).
When a TCR recognizes its cognate peptide-MHC, the T cell is activated — but only with co-stimulation (CD28-CD80/86 interaction). Antigen recognition without co-stimulation leads to anergy (tolerance rather than activation). This prevents T cells from attacking normal self-tissue.
B Cell Receptors (BCR) and Antibodies
B cells carry B cell receptors — membrane-bound antibodies. Like TCRs, they're generated by V(D)J recombination, creating diversity at the binding site.
When a B cell's BCR binds its antigen AND receives T cell help (via CD40L-CD40 and cytokines), the B cell:
- Proliferates (clonal expansion)
- Undergoes somatic hypermutation — point mutations are introduced into the antigen-binding region at high frequency
- Undergoes affinity maturation in germinal centers — B cells with higher-affinity mutations outcompete others for limited antigen
- Differentiates into plasma cells (antibody factories) or memory B cells
The result is an antibody with exquisitely high affinity for its antigen — often 10,000-fold higher than the initial BCR. This affinity maturation process is what makes the adaptive immune response progressively stronger with each exposure.
Antibody Structure and Function
An antibody is a Y-shaped glycoprotein with:
- Two Fab regions (Fragment antigen-binding): the "arms" that bind antigen. Each contains variable domains of one heavy chain and one light chain.
- One Fc region (Fragment crystallizable): the "stem"; recognized by Fc receptors on immune cells and by complement
The variable domains contain CDRs (Complementarity Determining Regions) — hypervariable loops that directly contact the antigen. CDR3 is the most diverse; in B cells, it's the site of somatic hypermutation.
Antibody classes (isotypes):
| Class | Location/Function |
|---|---|
| IgM | First responder; pentamer; efficient complement activation |
| IgG | Most abundant in blood; long half-life; crosses placenta |
| IgA | Mucosal surfaces (gut, respiratory tract); dimer in secretions |
| IgE | Allergy/parasites; triggers mast cell degranulation |
| IgD | B cell surface signaling |
Antibodies work through three main mechanisms:
- Neutralization: blocking pathogen attachment to host receptors
- Opsonization: coating pathogens to enhance phagocytosis (Fc receptors on macrophages recognize antibody Fc)
- Complement activation: IgG/IgM bind complement → lytic pores or opsonization
T Cell Subsets
After activation, CD4+ T cells differentiate into distinct subtypes based on the cytokine environment:
| Subset | Key cytokines secreted | Function |
|---|---|---|
| Th1 | IFN-γ, TNF-α | Fight intracellular pathogens; activate macrophages; support CTL responses |
| Th2 | IL-4, IL-5, IL-13 | Coordinate responses to parasites; drive IgE and eosinophils; allergies |
| Th17 | IL-17A, IL-17F, IL-22 | Mucosal defense against bacteria and fungi |
| Tfh (follicular helper) | IL-21, CXCR5 | Provide B cell help in germinal centers |
| Treg (regulatory) | TGF-β, IL-10 | Suppress immune responses; prevent autoimmunity |
The balance of these subsets determines the character of the immune response. In autoimmune diseases, Treg function is often impaired; in some cancers, tumor-infiltrating Tregs suppress anti-tumor immunity.
Immunological Memory
After clearing an infection, most effector T and B cells die, but a subset survives as memory cells. Memory cells:
- Are long-lived (decades)
- Respond faster and more vigorously to re-exposure
- Have lower activation thresholds (less co-stimulation required)
- Are maintained by homeostatic cytokines (IL-7 for T cells, IL-15 for NK cells)
This is the cellular basis of vaccination: you give the immune system a preview of the pathogen (antigen from killed virus, protein subunit, mRNA encoding the spike protein) to generate memory without causing disease. On subsequent exposure to the real pathogen, memory cells respond within 24–48 hours, clearing the infection before it causes severe disease.
Immune Checkpoints: Brakes on T Cell Activation
T cell activation requires a "second signal" beyond TCR binding. This co-stimulatory requirement prevents T cells from being activated by normal tissues. Additionally, regulatory signals downregulate active T cells to prevent excessive tissue damage:
CTLA-4 (Cytotoxic T-Lymphocyte Antigen 4): Expressed on activated T cells; competes with CD28 for B7 (CD80/86) binding on APCs. Engagement delivers an inhibitory signal, reducing T cell activation. Acts primarily in lymph nodes.
PD-1 (Programmed Death-1): Expressed on exhausted or activated T cells; binds PD-L1 or PD-L2 on target cells. Delivers an inhibitory signal, preventing killing. Acts in peripheral tissues — particularly the tumor microenvironment.
Why cancers exploit these checkpoints: Tumors express PD-L1 to shield themselves from cytotoxic T cells. It's like displaying a "friendly" badge that tells T cells "don't kill me." CTLA-4 and PD-1 are necessary brakes to prevent autoimmunity in normal physiology but are exploited by tumors.
Immune checkpoint inhibitors: Blocking CTLA-4 (ipilimumab) or PD-1/PD-L1 (nivolumab, pembrolizumab, atezolizumab) releases these brakes, allowing exhausted tumor-infiltrating T cells to attack the tumor. This has produced durable remissions in metastatic melanoma, lung cancer, and many other cancers. Pembrolizumab is now approved in >20 different cancer types.
TCR and BCR Sequencing in Bioinformatics
The variable regions of TCRs and BCRs are directly sequenceable by high-throughput sequencing (TCR-seq, BCR-seq or immunoSEQ). This produces a clonotype repertoire — a list of all unique receptors in a sample and their frequencies.
Applications:
- Cancer immunotherapy monitoring: tracking expansion of tumor-reactive T cell clones during checkpoint inhibitor treatment
- MRD (minimal residual disease) detection: tracking cancer B cell clones (in CLL, ALL) to detect relapse
- Vaccine immunogenicity: measuring clonal expansion of vaccine-specific T/B cells
- Autoimmunity: identifying autoreactive clones in inflammatory lesions
- Infection: tracking virus-specific T cell responses
Tools: MiXCR (alignment and clonotype assembly), IMGT/V-QUEST (germline assignment), VDJdb (database of antigen-specific TCRs), ClusTCR/GLIPH2 (grouping TCRs by likely antigen specificity).
Neoantigen prediction pipeline (central to cancer immunotherapy):
- Identify somatic mutations from tumor WES vs. normal
- Predict which mutations produce novel peptides
- Predict which peptides bind the patient's HLA alleles (using NetMHCpan)
- Identify neoantigen-reactive T cells via TCR-seq or functional assays
This computational pipeline connects genomics to immunotherapy: knowing which mutations the patient's immune system is likely to recognize guides personalized cancer vaccine design.