NOTEBOOK 04 ← Previous  |  Next →

edgeR Differential Abundance Analysis

TCR Repertoire Analysis — Notebook 04: Negative binomial GLM, volcano plots, and significant expander/contractor identification
Joshua LuthyR + edgeR + tidyverseSynthetic Data2025
Contents
  1. Analysis Overview
  2. edgeR Model Setup
  3. Volcano Plots
  4. Top Expanders & Contractors
  5. V Gene Enrichment
  6. Summary

01 Analysis Overview

This notebook applies the edgeR differential abundance framework to identify individual clonotypes that significantly expand or contract from Apheresis to Product. Each clonotype is treated analogously to a gene, with clone counts as the "expression" measure. We use edgeR's negative binomial GLM with a fixed BCV of 0.4 for this unreplicated design.

# edgeR differential abundance — fixed BCV for unreplicated design library(edgeR) bcv <- 0.4 y$common.dispersion <- bcv^2 fit <- glmFit(y, design, dispersion = bcv^2) lrt <- glmLRT(fit, coef = 2)

02 edgeR Model Setup

For each patient, we build a count matrix (clonotypes × samples), apply TMM normalization, and fit a negative binomial GLM. With only 2 samples per patient (no biological replicates), we use a fixed BCV of 0.4 (dispersion = 0.16), consistent with edgeR user guide recommendations for unreplicated designs in immune repertoire analysis.

6
Patients Analyzed
NB GLM
Model Type
0.40
Fixed BCV
FDR < 0.05
Significance Threshold

03 Volcano Plots

Volcano plots display log₂ fold change (x-axis) against −log₁₀ FDR (y-axis). Points above the dashed significance line and beyond fold-change cutoffs are colored as expanders (green) or contractors (red).

Figure 1. Combined volcano plot across all patients. Green = significant expanders (Product > Apheresis), Red = significant contractors, Gray = not significant. Dashed line: FDR = 0.05.
Interpretation

The volcano plots reveal strong asymmetry — many more clonotypes are significantly contracting (lost in Product) than expanding. This is expected: manufacturing selects a small subset for expansion while the majority of apheresis clonotypes are depleted. The expander population shows more extreme fold changes, indicating focused amplification.

04 Top Expanders & Contractors

The most significantly expanding clonotypes represent candidate therapeutic clones selected during manufacturing. Contractors represent the diverse starting material that was not carried into the Product.

Figure 2. Number of significant expanders vs contractors per patient, faceted by clinical response. All patients show more contractors than expanders, consistent with the diversity reduction during manufacturing.

05 V Gene Enrichment in Expanders

We test whether significantly expanding clonotypes preferentially use certain TRBV gene segments relative to background Product usage, revealing potential biases in clonal selection.

Figure 3. Log₂ enrichment of V gene usage among significant expanders vs background. Positive values indicate over-representation among expanding clonotypes.

06 Summary

Key Findings

1. edgeR identifies hundreds of significantly differentially abundant clonotypes per patient (FDR < 0.05), with the majority being contractors.

2. Significant expanders represent the clonotypes selected and amplified during manufacturing — the candidate therapeutic clones.

3. CR patients show distinct expansion patterns with the most extreme fold changes in the expander population.

4. V gene enrichment analysis reveals potential biases in which TCR gene segments are preferentially expanded.

Statistical Framework