Interpreting predictions
MHCflurry’s default presentation predictor outputs several columns for each peptide. This guide explains what each number means, which column to rank by, and what cutoffs work well in practice.
What each column means
In the command-line tool (mhcflurry predict and mhcflurry predict-scan),
prediction columns are prefixed with mhcflurry_. In the Python API
(Class1PresentationPredictor.predict()), the same columns appear without the
mhcflurry_ prefix.
Column |
Scale |
Direction |
What it measures |
|---|---|---|---|
|
|
Higher is stronger |
Overall probability-like score combining MHC binding affinity and antigen processing. |
|
|
Lower is stronger |
Rank of |
|
|
Lower is stronger |
Predicted peptide–MHC binding affinity in nanomolar. Values below |
|
|
Lower is stronger |
Allele-specific rank of |
|
|
Higher is stronger |
Allele-independent estimate of how likely cellular cleavage and transport are to generate this peptide. |
|
Allele name |
— |
When scoring a multi-allele genotype (sample), the single allele with the strongest predicted binding for that peptide. |
Which score should I use?
Prioritizing candidate epitopes or neoantigens (most users): Rank by
presentation_score(highest first) orpresentation_percentile(lowest first). Combining binding affinity with antigen processing consistently improves enrichment of real mass-spectrometry ligands over binding affinity alone, especially when source-protein flanking sequences are available.Predicting or comparing in-vitro binding assays: Use
affinity(nM) oraffinity_percentile. Antigen processing does not occur in a purified peptide–MHC binding assay.Filtering peptides when you do not know the MHC allele: Use
processing_scorealone (orClass1ProcessingPredictor).
Practical cutoffs and percentile ranks
Why percentile rank is often better than a fixed nM cutoff
Different MHC alleles naturally have different binding-strength distributions —
some alleles bind many peptides below 100 nM, while others bind their best
ligands around 300–1,000 nM. Comparing raw nM values across alleles can
unfairly favor tighter-binding alleles.
affinity_percentile normalizes each allele against a panel of random
peptides:
<= 2.0(top 2%): standard inclusive screening threshold (also the default filter formhcflurry predict-scan).<= 0.5(top 0.5%): stricter strong-binder threshold.
If you prefer a fixed affinity cutoff:
<= 500 nM: common moderate-to-strong binder cutoff.<= 50 nM: strong binder cutoff.
Presentation score cutoffs
There is no single universal cutoff for presentation_score because the
fraction of true ligands depends on your peptide pool size, allele set, and
whether flanking sequences were supplied. In practice:
Sort candidates by
presentation_scoredescending and take the top K candidates your downstream assay can test, orFilter by
presentation_percentile(for example,<= 2.0or<= 1.0) when you need a consistent rank cutoff across different samples.
Single alleles vs. multi-allele genotypes
When you pass one allele per query (for example, --alleles 'HLA-A*02:01' 'HLA-B*07:02'),
MHCflurry outputs one row per peptide for each allele separately.
When you pass a genotype or allele set (for example, --alleles 'HLA-A*02:01;HLA-B*07:02'
on the CLI, or alleles=["HLA-A*02:01", "HLA-B*07:02"] in Python):
MHCflurry scores the peptide against every allele in the set.
It keeps the strongest binder (lowest nM
affinity), records which allele won inbest_allele, and computespresentation_scorefrom that strongest affinity plus the peptide’sprocessing_score.
A single patient’s 6-allele HLA class I genotype is a natural allele set. A large population panel of 20+ alleles is not — score population alleles separately so one promiscuous allele does not mask the others.
With flanks vs. without flanks
MHCflurry’s presentation bundle contains two processing models:
With flanks (used automatically by
predict-scan, and bypredictwhenn_flankandc_flankcolumns are provided): uses up to 15 amino acids upstream and downstream of the peptide in its source protein to model proteasomal cleavage.Without flanks (used automatically when flank columns are omitted or
--no-flankingis passed): scores processing from the peptide sequence alone.
Whenever you know the source protein sequence, include flanking sequences (or
use predict-scan directly on the protein FASTA) for the strongest presentation
ranking.