MHC Binding Predictor
Project description
MHCflurry
MHCflurry predicts which peptides are likely to be displayed by MHC class I molecules. It provides pretrained models for three related tasks:
- Binding affinity: how strongly a peptide binds an MHC allele.
- Antigen processing: whether cellular processing favors the peptide.
- Presentation: a combined score using binding and processing predictions.
You can use the released models from the command line or Python, scan proteins for candidate epitopes, or train models on your own data.
Quick start
Install MHCflurry and download the pretrained presentation models:
pip install mhcflurry
mhcflurry-downloads fetch models_class1_presentation
Predict a few peptides:
mhcflurry-predict \
--alleles HLA-A0201 HLA-A0301 \
--peptides SIINFEKL SIINFEKD SIINFEKQ \
--out predictions.csv
Or scan a protein sequence for candidate ligands:
mhcflurry-predict-scan \
--sequences MFVFLVLLPLVSSQCVNLTTRTQLPPAYTNSFTRGVYYPDKVFRSSVLHS \
--alleles 'HLA-A*02:01' \
--out scan.csv
To try MHCflurry without installing anything, open the Colab notebook.
Important The current source tree documents the 2.3.0 release candidate (
2.3.0rc14). Install it withpip install --pre mhcflurryorpip install mhcflurry==2.3.0rc14. A normalpip install mhcflurrystays on the latest stable 2.2.x release until 2.3.0 is final.
In 2.3.0, the same commands are also available through one parent command, for
example mhcflurry predict and mhcflurry predict-scan. The historical
mhcflurry-* commands remain supported. See the
2.3.0 release notes for training, performance, and
evaluation changes.
Documentation
Please file an issue if you have questions or encounter problems.
Citing MHCflurry
If you use MHCflurry in your research, please cite:
T. O'Donnell, A. Rubinsteyn, U. Laserson. "MHCflurry 2.0: Improved pan-allele prediction of MHC I-presented peptides by incorporating antigen processing," Cell Systems, 2020. https://doi.org/10.1016/j.cels.2020.06.010
T. O'Donnell, A. Rubinsteyn, M. Bonsack, A. B. Riemer, U. Laserson, and J. Hammerbacher, "MHCflurry: Open-Source Class I MHC Binding Affinity Prediction," Cell Systems, 2018. https://doi.org/10.1016/j.cels.2018.05.014
Development
Contributions are welcome. Start with CONTRIBUTING.md; the testing guide describes the fast local checks and full suite.
Docker
Run the latest image from Docker Hub:
docker run -p 9999:9999 --rm openvax/mhcflurry:latest
Then open http://localhost:9999 to use the included Jupyter environment. To
build the image from a checkout:
docker build -t mhcflurry:latest .
docker run -p 9999:9999 --rm mhcflurry:latest
More resources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mhcflurry-2.3.0rc14.tar.gz.
File metadata
- Download URL: mhcflurry-2.3.0rc14.tar.gz
- Upload date:
- Size: 545.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9187df6d2e3d6490d99135ffb0f145950ba147bb808851d1b34f36e3c79a0005
|
|
| MD5 |
9646aa5a6bd6480a604cf25f3fb6f715
|
|
| BLAKE2b-256 |
6f1147be7427ca25832d5e0bdad4c4e288406c20b1a2ee3270209ffe1ffa7a02
|
Provenance
The following attestation bundles were made for mhcflurry-2.3.0rc14.tar.gz:
Publisher:
release.yml on openvax/mhcflurry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mhcflurry-2.3.0rc14.tar.gz -
Subject digest:
9187df6d2e3d6490d99135ffb0f145950ba147bb808851d1b34f36e3c79a0005 - Sigstore transparency entry: 2212370774
- Sigstore integration time:
-
Permalink:
openvax/mhcflurry@d5b371bf2e8a379158f55ee1dfe6a808c5809b46 -
Branch / Tag:
refs/tags/v2.3.0rc14 - Owner: https://github.com/openvax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d5b371bf2e8a379158f55ee1dfe6a808c5809b46 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mhcflurry-2.3.0rc14-py3-none-any.whl.
File metadata
- Download URL: mhcflurry-2.3.0rc14-py3-none-any.whl
- Upload date:
- Size: 442.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
989aec241f7c55b397d7971df7998fb53f40fdf2995106b1b003c979ca87f57e
|
|
| MD5 |
faf714537640853cda3f59b8b3366b9d
|
|
| BLAKE2b-256 |
6aed14b89879307b52b2a9f76e3a0615c78f927e1ad5079de38eb84275bf9f32
|
Provenance
The following attestation bundles were made for mhcflurry-2.3.0rc14-py3-none-any.whl:
Publisher:
release.yml on openvax/mhcflurry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mhcflurry-2.3.0rc14-py3-none-any.whl -
Subject digest:
989aec241f7c55b397d7971df7998fb53f40fdf2995106b1b003c979ca87f57e - Sigstore transparency entry: 2212370811
- Sigstore integration time:
-
Permalink:
openvax/mhcflurry@d5b371bf2e8a379158f55ee1dfe6a808c5809b46 -
Branch / Tag:
refs/tags/v2.3.0rc14 - Owner: https://github.com/openvax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d5b371bf2e8a379158f55ee1dfe6a808c5809b46 -
Trigger Event:
release
-
Statement type: