mhcmatch#
NEOANTIGEN RANKING AND CASSETTE DESIGN
Which neoantigens are presented, which ones a T cell will see, and which twenty to put in a construct. MHC I and MHC II, human and mouse, pure Python on the seqtree search core.
Version 1.20.2. Everything on these pages is what this release does; the release history
is in ROADMAP.md.
Every reference dataset is fetched from
isalgo/pmhc_data on first use, so a fresh
pip install mhcmatch runs every example here with no manual downloads.
Getting started
Install, build a store, predict restriction, scan a protein.
Command line
Every command grouped by what you are trying to do, how to stage reference data, and the env vars a cluster needs.
The EPIC scorer
Rank neoantigen candidates: nine fitted terms in four blocks, one page each — expression, presentation, immunogenicity, complementarity.
Running a cohort
Re-rank your own table or call epitopes de novo, from a directory of files, on a laptop or under SLURM.
Designing a cassette
Choose the k epitopes to carry, withdraw the unsafe ones, and score the finished construct.
Notebooks
Six worked examples, one per section of the paper, each running end to end in minutes on published data.
The shipped models
All eight fitted cells: coefficients, what each was fitted on, how well it scores, and what it cannot be asked.
API reference
Store, search, proteome, pseudoseq diffusion, expression, logos.
What it does#
Presentation, without a per-allele model
Per-allele weight matrices over an anchor-factored decomposition, reported as a control-calibrated %rank. Rare allotypes borrow from groove-similar frequent ones through a pseudosequence diffusion kernel, which recovers most of what an allele's own measured repertoire buys.
Affinity as a Potts model
Peptide binding core against the 34-residue groove pseudosequence, fitted on measured
IC50. Combined with presentation through Fisher's method into
binder — a soft AND, which is what makes the gated fast path worth
having.
Recognition, not just binding
The TCR-facing strip scored on burial and charge, plus anchor-masked k-mer density against three reference corpora — self, thymic and viral. Resemblance to the thymic immunopeptidome raises the score; resemblance to self is the largest negative term in the model.
Mimicry as signed risk
Viral, self and thymic resemblance split by anchor and TCR-facing channel, as signed log-odds rather than one distance. The two families have opposite signs, so a whole-peptide distance averages them to nothing.
A cassette is a set, not a list
Choosing k units is a portfolio problem: two constructs with identical expected responders can differ twofold in P(at least one works). The objective prices shared allotypes and shared sequence — the two mechanisms — and is submodular, so greedy carries a bound.
Assembly, safety and escape
Withdraw units matching essential-tissue self peptides, size each allotype, order them, choose the spacer by minimising junctional binding, back-translate and emit a map. Price what the tumour pays to delete a unit, and what it costs to lose an allele.