MHCflurry 2.0 2.0
Open-source pan-allele presentation predictor whose distinctive idea is a separate antigen-processing model: it reads the peptide together with fifteen amino acids of flanking sequence on each side, because the proteasome cut depends on what lies around the cut site.
At a glance
What it does
Predicts binding affinity and presentation; the final presentation score is a three-parameter logistic regression combining the binding network and the processing network. Installable with pip, which makes it the practical choice for reproducible pipelines.
Notable uses in oncology
The processing model recovers known biology: proline is depleted just before the peptide and enriched at position 2, matching the action of ERAP trimming. The measured gain from adding processing is real but modest — 3.3% on average.
Tasks, data types and cancers
Architecture
Where NetMHCpan searches for the right alignment, MHCflurry hands the network all three alignments at once and lets it decide. Multi-allelic data are handled by taking the best score among the alleles the sample carries, rather than by training-time deconvolution.
Training data
IEDB binding affinities plus MS-eluted ligands from mono- and multi-allelic samples; negatives are decoys drawn from the same source proteins as the hits.
Linked datasets
- training IEDB — Immune Epitope Database Open download
- training Mono-allelic HLA class I peptidome (Sarkizova / Abelin) Open download
- benchmark IEDB automated benchmark (MHC class I) Open download
Evaluation
| Benchmark / dataset | Metric | Value | External validation | Source |
|---|---|---|---|---|
| held-out mass-spec ligands (1:99 decoys from the same proteins) | PPV | reported in paper; not comparable with PPV numbers computed at 1:999 by other tools | yes | Source |
| effect of the antigen-processing model | relative improvement | +3.3% on average | no | Source |
How to run
pip install mhcflurry
mhcflurry-downloads fetch models_class1_presentation
from mhcflurry import Class1PresentationPredictor
predictor = Class1PresentationPredictor.load()
predictor.predict(
peptides=['SIINFEKL', 'KLGGALQAK'],
alleles={'sample1': ['HLA-A*02:01', 'HLA-B*57:01']},
# n_flanks/c_flanks add the antigen-processing signal when you have the source protein
)
The presentation predictor needs the downloaded model bundle (mhcflurry-downloads fetch). Supplying flanking sequences is what activates the processing model — without them you are running the binding network only.
Regulatory status and intended use
Regulatory status is quoted from the source linked above and can change. Research-use-only models must not be used for clinical decisions.
Limitations and bias
- Same assumed-negative problem and MS biases as every model in this family.
- Decoys drawn from the same proteins make its PPV numbers stricter than some competitors' and not directly comparable.
- One published benchmark had to exclude it because of train/test overlap — check your evaluation split.
Sources
This page is educational — it is not medical advice and does not replace consultation with an oncologist. Diagnostic and treatment decisions are made solely by specialist physicians.