mhctools¶
mhctools is a Python library for running MHC binding, presentation, immunogenicity, and antigen-processing predictors. It provides a common interface to tools such as NetMHCpan and MHCflurry, with results you can inspect in Python or export as a pandas DataFrame.
Choose what to predict¶
| Question | Predictors |
|---|---|
| Class I binding affinity | NetMHCpan or MHCflurry |
| Class I presentation | NetMHCpan, MHCflurry, MixMHCpred, BigMHC (EL), CapHLA |
| Class II binding or presentation | NetMHCIIpan; MixMHC2pred for presentation |
| Peptide-MHC complex stability | NetMHCstabpan |
| Proteasomal cleavage | Pepsickle or NetChop |
| Class II cleavage | NetCleave (class II) |
| TAP transport | DeepTAP |
| ERAP1 trimming | ERAMER |
| T-cell immunogenicity | Calis, PRIME, BigMHC (IM), DeepImmuno; TLimmuno2 for class II |
| Recognition by a specific TCR | NetTCR, Tulip, MixTCRpred |
| Free-peptide half-life | PeptiVerse, PlifePred2 |
| Per-bond peptidase evidence | Peptidase activity |
The selection guide explains input, installation, and license constraints. Read each model's guide for its output and validation limits.
Quickstart¶
Install mhctools and download the MHCflurry model weights:
pip install mhctools
mhctools fetch mhcflurry
from mhctools import MHCflurry
predictor = MHCflurry(alleles=["HLA-A*02:01"])
results = predictor.predict(["SIINFEKL", "GILGFVFTL"])
df = predictor.predict_dataframe(["SIINFEKL", "GILGFVFTL"])
The getting started guide explains the results and shows how to use another predictor.
Start here¶
- Getting started: install the library and make your first prediction.
- User guide: supported predictors, inputs, and examples.
- Recipes: scan proteins, run multiple samples, and annotate tables.
- API reference: Python classes and functions.
Choose and evaluate models¶
- Choosing a predictor: biological questions, inputs, and practical constraints.
- Getting models: install or download the required tools and weights.
- Known limits and benchmarks: interpret model coverage and evaluation evidence.
- Licensing: the mhctools license and separate upstream terms.
For installation help, see troubleshooting.
Processing and vaccine analysis¶
The antigen-processing guide covers proteasomes, peptidases, transport, and trimming, with model recommendations and batch assessments. Related workflows include vaccine reports and assay-aware benchmarks.