Foundation model for MHC class I peptide binding prediction built on deep contrastive learning.
See the online documentation for full API details and tutorials.
Install the latest release from PyPI:
pip install fennomix-mhcOr install the development version directly from GitHub:
pip install git+https://github.com/FennOmix/FennOmix.MHC.gitAfter installation the fennomix-mhc command exposes several sub-commands. The examples below assume your peptide or protein sequences are stored in FASTA or tabular files.
fennomix-mhc embed-proteins --fasta my_hla.fasta --out-folder ./outputfennomix-mhc embed-peptides --peptide-file peptides.tsv --out-folder ./outputfennomix-mhc predict-epitopes-for-mhc --peptide-file peptides.tsv \
--alleles A02_01,B07_02 --out-folder ./outputfennomix-mhc predict-mhc-binders-for-epitopes --peptide-file peptides.tsv \
--out-folder ./outputAdditional commands deconvolute-peptides and deconvolute-and-predict-peptides are also available.
All functionality of the command line interface is available through the fennomix_mhc.pipeline_api module:
from fennomix_mhc.pipeline_api import (
embed_proteins,
embed_peptides_from_file,
predict_epitopes_for_mhc,
predict_mhc_binders_for_epitopes,
)
# compute and save embeddings
embed_proteins("my_hla.fasta", "./output")
embed_peptides_from_file("peptides.tsv", "./output")
# run predictions using the saved files
predict_epitopes_for_mhc(
"peptides.tsv",
["A02_01"],
"./output",
)