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.
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.
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 |
| Descriptive foreignness | WEIRDO |
| Free-peptide half-life | Cavaco, PeptiVerse, PlifePred2 |
| Cell penetration classification | PeptiVerse CPP |
| 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.
Start here¶
Use the recipes for protein scans, multiple samples and table annotation, or the API reference for class and function details. For installation help, see troubleshooting.
Read known limits and benchmarks when interpreting predictions. Research and evidence traces primary studies, validation audits and open calibration questions.
For processing workflows, start with the antigen-processing guide, then use batch assessments or vaccine reports.