FennOmix.MHC Documentation

Versions License Docs Github

Features

  • Peptide retrieval / prediction for given HLA (MHC) alleles.

  • HLA allele retrieval for a given peptide.

  • Peptide clustering analysis.

  • HLA clustering analysis.

Cite FennOmix.MHC

Building FennOmix-MHC for peptide-HLA representation learning and shared epitope discovery

Installation

Install the latest release from PyPI:

pip install fennomix-mhc

Or install the development version directly from GitHub:

pip install git+https://github.com/FennOmix/FennOmix.MHC.git

Command line interface

After 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.

Embed MHC proteins

fennomix-mhc embed-proteins --fasta my_hla.fasta --out-folder ./output

Embed peptides

fennomix-mhc embed-peptides --peptide-file peptides.tsv --out-folder ./output

Predict epitopes for MHC alleles

fennomix-mhc predict-epitopes-for-mhc --peptide-file peptides.tsv \
    --alleles A02_01,B07_02 --out-folder ./output

Predict MHC binders for given epitopes

fennomix-mhc predict-mhc-binders-for-epitopes --peptide-file peptides.tsv \
    --out-folder ./output

Additional commands deconvolute-peptides and deconvolute-and-predict-peptides are also available.

Pipeline API

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",
)