Illustration of four scientists in lab coats, examining colorful molecular structures on a screen and a tablet. A man gestures towards the structures while a woman takes notes on a laptop.

Predicting Antigen‑Specific T Cells: Tools, Data

Table of Contents
Picture of Jonathan Alles

Jonathan Alles

EVOBYTE Digital Biology

Introduction

If you could reliably predict which T cells recognize which antigens, you’d accelerate TCR‑T therapy design, catch off‑targets before they harm patients, and know—early—whether a cancer vaccine or checkpoint regimen is raising the right clones. That’s the promise of T cell receptor (TCR) specificity prediction. It sits at the crossroads of immunology, structural biology, and machine learning, and it’s moving fast—though not as fast as many headlines imply.

In this overview, we’ll set the stage with a quick primer on TCRs, peptide–MHC (pMHC) complexes, and the difference between MHC class I and II. Then we’ll tour the methods—from sequence‑based clustering to deep learning and structure‑aware modeling—and close with a practical outlook you can use to guide projects in immuno‑oncology or vaccine R&D.

TCRs, pMHCs, and the MHC class I vs II split

T cells “see” antigens as short peptides bound by major histocompatibility complex proteins on cell surfaces. The complex of peptide plus MHC (pMHC) is what a TCR actually binds. As a rule of thumb, MHC class I presents endogenous peptides to CD8+ T cells, while MHC class II presents exogenous peptides to CD4+ T cells. Cross‑presentation muddies the waters a bit, but that split still frames most assays, datasets, and models. The structural differences matter too: class I has a closed binding groove that favors shorter peptides; class II’s open groove accommodates longer peptides. These biological constraints echo through every computational approach we use.

Why prediction matters in the clinic and the lab

Two use cases dominate today. First, adoptive T cell therapy. When you engineer or select TCRs for therapy, the number‑one safety risk is off‑target recognition—binding to a self‑peptide that looks “close enough” to your intended target in the right HLA context. The community learned this the hard way with affinity‑enhanced MAGE‑A3–specific receptors that cross‑reacted with a Titin‑derived peptide presented in heart tissue, leading to fatal cardiac toxicity. That single episode still shapes how we think about preclinical screening and model validation.

Second, immuno‑oncology and vaccines. Whether you’re tracking tumor‑infiltrating lymphocytes after a checkpoint inhibitor or assessing a T‑cell vaccine, you want evidence that antigen‑specific clones expanded and that their targets are the ones you care about. Predictive models help you go beyond “clonal expansion happened” to “these clones likely recognize this pMHC,” which informs both biomarker discovery and next‑experiment design.

Why prediction is hard (and why data scarcity still bites)

TCR diversity is astronomical, HLA polymorphism is massive, and TCRs are promiscuous—one receptor can recognize many peptides, and conversely a single epitope can be recognized by many TCRs. On top of that, ground‑truth binding data are limited and biased. Public resources like VDJdb and McPAS‑TCR are invaluable, yet a small set of viral epitopes and common HLA alleles dominate; one recent review estimated that roughly a hundred antigens account for the majority of curated TCR–antigen pairs. Negative examples are also scarce, forcing many models to synthesize “non‑binders,” which can skew training and benchmarking. These realities explain why many models perform well in‑distribution but struggle on unseen epitopes.

From sequences to structure: the methods that matter now

Early approaches asked a simple question: if two TCRs look similar, do they recognize similar peptides? Tools like GLIPH/GLIPH2 and TCRdist operationalized that idea and remain workhorses for grouping clones into putative specificity clusters. They’re fast, interpretable, and helpful when you have repertoires from stimulated or treated samples and want to see convergence. In parallel, network‑based approaches such as TCR‑NET build large CDR3 similarity graphs to spot enriched neighborhoods associated with antigens. Together, these methods are strong at “who’s like whom?” and “what’s expanded with what?” even when exact epitope labels are missing.

Supervised deep learning models stepped in as curated pMHC–TCR pairs grew. NetTCR‑2.0 uses paired alpha–beta chains, boosting performance over beta‑only inputs. Frameworks like DeepTCR learn sequence patterns end‑to‑end, while attention‑based architectures such as TITAN jointly encode peptides and receptors. More recently, protein language models (PLMs) have improved representation learning for TCR sequences and peptides, and multimodal variants aim to better capture cross‑chain context and HLA effects. The catch is generalization: many models excel on known epitopes, but performance drops on truly novel peptide–HLA combinations—precisely what we need for discovery.

Structure‑aware modeling has become the third pillar. Here, the goal isn’t just “binds or not,” but “how does it bind?” TCRmodel2 extends AlphaFold‑style modeling to predict TCR–pMHC complex structures directly from sequence for both class I and class II. Benchmarks and comparative studies suggest TCRmodel2 is competitive for TCR–pMHC complexes and can complement AlphaFold‑based pipelines. Those predicted interfaces feed back into design and interpretation—think, rationalizing cross‑reactivity, proposing mutational tweaks, or extracting contact features to inform downstream classifiers. It’s compute‑heavier than sequence‑only methods, but the added mechanistic signal is often worth it.

A quick feel for the workflows

Let’s make this concrete. Imagine you’ve run single‑cell V(D)J on pre‑ and post‑therapy tumor biopsies and want to ask whether treatment raised antigen‑specific T cells. You could start with sequence‑level convergence and then zoom in structurally on top clones.

First pass, cluster by TCR similarity and check expansion:

# minimal sketch using tcrdist3
import pandas as pd
from tcrdist.repertoire import TCRrep

meta = pd.read_csv("tcr_ab.tsv", sep="\t")  # columns: subject, epitope(optional), cdr3_a, v_a, j_a, cdr3_b, v_b, j_b
tr = TCRrep(cell_df=meta, organism="human", chains=["alpha","beta"])
tr.compute_distances()            # pairwise TCRdist
clusters = tr.cluster(method="single", threshold=50)
meta["cluster_id"] = clusters
# Now test which clusters expand post-therapy and, if you have labels, which align with known epitopes.

This gives you specificity‑like groups and candidate responders without assuming a particular epitope. Later, you can annotate clusters with literature‑derived motifs or known epitope matches.

For your top expanded clones, add structural context with TCRmodel2:

# minimal TCRmodel2 usage (see repo/server for full options)
python run_tcrmodel2_ub_tcr.py \
  --tcr_alpha_seq CAVRDTNTGKLIF \
  --tcr_beta_seq CASSLGQGNTIYF \
  --peptide SPRWYFYYL \
  --mhc HLA-B*07:02 \
  --outdir ./tcrpmhc_models
# Inspect predicted interfaces; extract contacts to cross-check plausible cross-reactivity.

This helps explain why certain clones expanded—and flags potential off‑targets if a known self‑peptide could present a similar motif in relevant HLAs.

Current state and an actionable outlook

Where does this leave you in late 2026? A few practical patterns have emerged.

First, mix methods. Use clustering to find convergent biology in repertoires, supervised models to prioritize peptide candidates for those clusters, and structure‑aware modeling to pressure‑test binding modes and triage off‑target risk. No single model is yet trustworthy enough, on its own, to green‑light a therapeutic TCR without extensive wet‑lab follow‑up.

Second, be data‑honest. If your target epitope–HLA pair is rare in public datasets, expect drop‑offs in model performance. Curate hard negatives, stratify by HLA, and validate on held‑out epitopes to avoid optimistic in‑distribution scores. Independent benchmarks continue to show limited generalization across unseen peptides; design your pipeline with that reality in mind.

Third, close the loop with experiments. High‑throughput dextramer/tetramer mapping, yeast or mammalian display, and single‑cell transcriptomics with antigen‑barcoded reagents can all generate the ground truth your models lack. Even small bespoke datasets—carefully balanced across HLAs and including true negatives—can move performance more than yet another architectural tweak.

Finally, keep structure in play. Even when you don’t need atomic detail, structure‑derived features (contact maps, pose confidence, interface hotspots) can regularize sequence models and make their rankings more robust. And when you do need detail—say, to interpret cross‑reactivity risks—the extra computation tends to pay for itself by preventing costly dead‑ends downstream.

Summary / Takeaways

TCR specificity prediction is no longer a moonshot, but it isn’t push‑button either. The most dependable results come from layered evidence: convergence in repertoires, consistent scores from sequence‑based models that know your HLA context, and structural checks that make biochemical sense. If you’re advancing a TCR candidate, start with sequence clustering to find responders, prioritize peptide–HLA hypotheses with models like NetTCR‑2.0 or TITAN, and sanity‑check binding modes with TCRmodel2 before you spend on large wet‑lab screens. And remember the cautionary lessons from MAGE‑A3/Titin: build off‑target assessment into the plan from day one.

Further Reading

Leave a Comment