Skip to main content

MHC Binding Predictor

Project description

Build Status Coverage Status Open In Colab

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 --pre 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 This source tree documents 2.3.0rc15. Use pip install mhcflurry==2.3.0rc15 for that exact version. Omitting --pre installs the latest stable 2.2.x release until 2.3.0 is final.

The historical mhcflurry-* command names remain supported for existing scripts. See the 2.3.0 release notes for details.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mhcflurry-2.3.0rc15.tar.gz (545.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mhcflurry-2.3.0rc15-py3-none-any.whl (442.0 kB view details)

Uploaded Python 3

File details

Details for the file mhcflurry-2.3.0rc15.tar.gz.

File metadata

  • Download URL: mhcflurry-2.3.0rc15.tar.gz
  • Upload date:
  • Size: 545.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mhcflurry-2.3.0rc15.tar.gz
Algorithm Hash digest
SHA256 a3e9a1178c13d43233b8f2935a1a3e265b62e3c97e22f78e48b110fa11b37a0b
MD5 482a7022452604f713f13cf13dac6940
BLAKE2b-256 ee749d25fc997b501faa00f8e602d3e2b639b966de2d9cba9373a2ee2628844d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mhcflurry-2.3.0rc15.tar.gz:

Publisher: release.yml on openvax/mhcflurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mhcflurry-2.3.0rc15-py3-none-any.whl.

File metadata

  • Download URL: mhcflurry-2.3.0rc15-py3-none-any.whl
  • Upload date:
  • Size: 442.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mhcflurry-2.3.0rc15-py3-none-any.whl
Algorithm Hash digest
SHA256 0caccbdaa6841ed31a0c0002e595a34edcfa7e87e4a844072d0ab4aa7c05e378
MD5 28cd6686341730ecda1e47d39efafdb7
BLAKE2b-256 f39ef3cd3be73f57bc9d646992e99596033e60e74aa50137b0e5f6b1f733edad

See more details on using hashes here.

Provenance

The following attestation bundles were made for mhcflurry-2.3.0rc15-py3-none-any.whl:

Publisher: release.yml on openvax/mhcflurry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page