Written and maintained by CASRAI Editorial Board
Published
On this page
NetMHCpan is a pan-specific bioinformatics tool that uses artificial neural networks to predict peptide binding to any major histocompatibility complex class I (MHC-I) molecule of known protein sequence. Developed by researchers at the Technical University of Denmark (DTU Health Tech), the platform integrates quantitative in vitro binding affinity measurements with mass spectrometry-derived eluted ligand datasets to calculate presentation likelihood scores and allele-normalized percentile ranks for rational epitope discovery.
Definition and scope of NetMHCpan
In adaptive immunity, cytotoxic CD8+ T lymphocytes recognize foreign antigens presented as short peptide fragments bound to major histocompatibility complex class I (MHC-I) molecules on the cell surface. MHC-I molecules in humans—encoded by human leukocyte antigen (HLA) loci HLA-A, HLA-B, HLA-C, and non-classical genes such as HLA-E—are among the most polymorphic proteins known, with tens of thousands of allelic variants documented across global populations. Predicting which intracellular protein fragments will be successfully processed, bound by a specific MHC allele, and displayed to T cells is the foundational computational task in modern immunotherapy, infectious disease vaccine design, and immunogenicity screening.
Early bioinformatics algorithms relied on allele-specific models, such as position-specific scoring matrices (PSSMs) or isolated neural networks trained independently for each individual HLA allele. While effective for extensively characterized alleles such as HLA-A*02:01 or HLA-B*07:02, allele-specific predictors could not make predictions for poorly characterized, rare, or newly sequenced alleles that lacked direct experimental binding measurements. NetMHCpan resolved this fundamental limitation by introducing a pan-specific architecture that predicts peptide binding across any MHC-I molecule of known sequence by modeling the structural similarities and residue contacts shared across the entire MHC class I polymorphic cleft.
The biological and taxonomic scope of NetMHCpan covers both human classical and non-classical HLA alleles as well as veterinary and model organism species. In addition to human HLA-A, HLA-B, HLA-C, and HLA-E, the platform supports mouse (H-2 alleles including Db, Kb, Dd, Kd, and Ld), cattle (BoLA), swine (SLA), equine (Eqca), canine (DLA), and non-human primates (chimpanzee Patr, macaque Mamu, and gorilla Gogo). Furthermore, users can evaluate completely novel or uncharacterized MHC class I proteins by submitting the full-length amino acid sequence of the MHC heavy chain. In peptide length scope, while MHC class I molecules preferentially present canonical 9-mer peptides, NetMHCpan accommodates peptides ranging from 8 to 14 amino acids, accurately capturing allele-specific length distributions and conformational bulging in the binding groove.
How NetMHCpan works: algorithms and biological mechanisms
NetMHCpan achieves high predictive accuracy by combining three core computational and biological innovations: structural pseudo-sequence cleft representation, dual training on binding affinity and eluted ligand data, and unsupervised motif deconvolution through the NNAlign_MA machine learning framework.
The foundational concept of pan-specific prediction, introduced by Nielsen and colleagues in 2007, relies on representing each MHC molecule as a compact 34-amino-acid pseudo-sequence. By examining high-resolution X-ray crystallographic structures of peptide-MHC complexes, researchers identified 34 polymorphic amino acid residues within the alpha-1 and alpha-2 domains that reside within 4.0 angstroms of a bound nonamer peptide. These contact positions define the spatial and biochemical architecture of the six primary binding pockets (pockets A through F). Rather than processing the entire 360-residue heavy chain sequence, NetMHCpan extracts this 34-residue pseudo-sequence and concatenates it directly with the query peptide sequence. As a result, the artificial neural network learns a continuous interaction function between peptide amino acids and MHC pocket residues, allowing it to interpolate binding predictions for uncharacterized alleles based on shared sequence homology at critical contact sites.
A second major algorithmic advance occurred with the integration of distinct experimental data modalities. Historical predictors were trained exclusively on quantitative in vitro binding affinity (BA) data, typically measured by competitive radioligand or fluorescence polarization assays that determine the half-maximal inhibitory concentration (IC50 in nanomolar units). While binding affinity is the single most selective biochemical filter in antigen presentation, measuring in vitro binding in isolation neglects upstream cellular processing events. In living cells, a peptide must be excised from its source protein by the proteasome, transported across the endoplasmic reticulum membrane by the transporter associated with antigen processing (TAP), and trimmed at its N-terminus by endoplasmic reticulum aminopeptidases (ERAP1 and ERAP2) before encountering MHC-I molecules.
To capture these processing constraints, NetMHCpan incorporates liquid chromatography-tandem mass spectrometry (LC-MS/MS) eluted ligand (EL) data. In eluted ligand experiments, peptide-MHC complexes are immunoaffinity-purified directly from cell surfaces using locus- or pan-specific monoclonal antibodies, the peptides are acid-eluted, and their sequences are identified via a rigorous mass spectrometry database search. Because eluted ligands have survived the entire intracellular processing and presentation pathway, they carry the distinctive cleavage and transport signatures required for natural presentation. Modern NetMHCpan architectures train neural networks with a dual-output objective function that simultaneously predicts quantitative binding affinity and the binary likelihood of a peptide being a naturally processed eluted ligand.
The integration of eluted ligand data presented a major computational challenge: most mass spectrometry datasets are derived from natural, non-engineered cell lines expressing up to six distinct HLA-A, HLA-B, and HLA-C alleles. Because immunoaffinity pull-downs typically use pan-MHC antibodies (such as W6/32), the resulting peptide mixtures are multi-allelic (MA), meaning the exact cognate restricting HLA molecule for each detected peptide is initially ambiguous. NetMHCpan resolves this using the NNAlign_MA machine learning framework. NNAlign_MA employs an unsupervised pseudo-labeling strategy during network training. As the neural network learns binding motifs, it dynamically assigns each multi-allelic ligand to the specific HLA allele that yields the highest predicted presentation score. This iterative deconvolution allows millions of previously unannotated multi-allelic MS peptides to be incorporated into training without requiring laborious single-allele engineered cell lines.
Key outputs, metrics, and interpretation thresholds
When running a sequence analysis through NetMHCpan, the output table provides several quantitative metrics that must be interpreted according to standardized immunoinformatics principles. The primary metrics reported by the tool include the eluted ligand presentation score (Score_EL), the eluted ligand percentile rank (%Rank_EL), the predicted binding core (Core), and the categorical binding level (BindLevel).
The Score_EL is a continuous probability metric between 0.0 and 1.0 reflecting the likelihood that the peptide is naturally processed and presented on the cell surface. However, raw prediction scores and binding affinities vary substantially across different HLA alleles due to intrinsic thermodynamic differences in pocket structures. For example, HLA-A*02:01 ligands frequently display high absolute affinities with IC50 values below 50 nM, whereas typical ligands for alleles such as HLA-B*27:05 or HLA-B*44:03 exhibit lower baseline affinities while remaining potent biological epitopes. To enable meaningful comparisons across diverse alleles and peptide lengths, NetMHCpan normalizes raw scores against a background distribution of hundreds of thousands of random natural peptides, producing the percentile rank score (%Rank_EL).
The %Rank_EL metric represents the percentage of random natural peptides that score higher than the candidate query peptide. A lower percentile rank denotes a higher predicted affinity and presentation probability. For MHC class I predictions, NetMHCpan applies two authoritative default classification thresholds:
- Strong Binder (SB): Assigned to peptides with a %Rank_EL below 0.5%. These candidates represent the top 0.5% of predicted natural ligands and possess the highest likelihood of biological presentation and T-cell immunogenicity.
- Weak Binder (WB): Assigned to peptides with a %Rank_EL below 2.0% (and at or above 0.5%). These candidates represent secondary binders that frequently demonstrate positive experimental binding in biochemical assays and can function as functional epitopes under conditions of high antigen expression.
- Non-Binder: Assigned to peptides with a %Rank_EL at or above 2.0%, which are generally excluded from downstream validation pipelines.
When users enable the optional binding affinity output, the server reports the Score_BA, the predicted equilibrium dissociation constant in nanomolar units (Affinity_nM), and the corresponding %Rank_BA. Historically, an IC50 threshold of 500 nM was considered the gold standard for MHC-I binding, with peptides below 50 nM categorized as high-affinity binders. However, extensive comparative benchmarking by the Immune Epitope Database (IEDB) demonstrated that percentile ranks normalized to allele-specific background distributions significantly outperform static nanomolar cutoffs in identifying true immunogenic T-cell epitopes.
Evolution and comparison across NetMHCpan versions
NetMHCpan has undergone continuous architectural refinement since its inception in 2007. Understanding the functional differences across versions is essential for evaluating published immunological literature and selecting appropriate computational parameters. The data table below compares the foundational specifications, training architectures, and dataset scopes established across all major releases of the NetMHCpan platform.
In version 1.0 (Nielsen et al., 2007), the model demonstrated the viability of the 34-residue pseudo-sequence for quantitative IC50 prediction across HLA-A and HLA-B alleles. Version 2.0 (Hoof et al., 2009) expanded training coverage to more than 110,000 peptide-MHC interactions, incorporating HLA-C, HLA-E, and diverse animal species including non-human primates and swine, while introducing percentile rank normalization against a pool of 1,000,000 random natural 9-mers. NetMHCpan 3.0 introduced pan-length alignment networks capable of handling insertions and deletions, expanding reliable predictions from 8-mers through 14-mers.
A revolutionary leap occurred in NetMHCpan 4.0 (Jurtz et al., 2017) with the integration of mass spectrometry eluted ligands, creating a dual-objective neural network that captured intracellular antigen processing rules alongside binding affinity. NetMHCpan 4.1 (Reynisson et al., 2020) incorporated the NNAlign_MA framework, scaling the training corpus to 13,245,212 data points across 250 distinct MHC class I molecules. By deconvoluting multi-allelic datasets, version 4.1 dramatically improved predictive accuracy for HLA-B and HLA-C alleles, which were historically under-represented in single-allele affinity datasets.
When compared to competing computational algorithms, NetMHCpan exhibits distinct operational advantages and trade-offs. MHCflurry (developed by O’Donnell and colleagues) utilizes deep neural networks with separate models for peptide processing, presentation, and surface stability, performing exceptionally well on canonical human alleles. MixMHCpred (Gfeller and colleagues) uses mixture position weight matrices tailored specifically for mass spectrometry deconvolution but lacks support for non-canonical wildcard residues or fully novel MHC sequences. NetMHCpan remains unique in its pan-specific generalizability, enabling researchers to analyze any uncharacterized vertebrate MHC class I sequence without requiring new model training.
Where NetMHCpan matters for immunology labs and clinical research
NetMHCpan has become a cornerstone computational engine across academic, clinical, and industrial biotechnology settings. Its primary applications span personalized cancer immunotherapy, infectious disease vaccine formulation, and laboratory reagent development.
In personalized cancer immunotherapy, next-generation sequencing of patient tumor biopsies reveals somatic non-synonymous mutations that generate novel peptide sequences known as neoantigens. Because neoantigens are strictly tumor-specific, they represent ideal targets for personalized mRNA vaccines, synthetic long peptides, and adoptive T-cell therapies. However, a typical solid tumor may harbor hundreds of missense mutations, of which only a small fraction are presented on patient HLA molecules and recognized by autologous T cells. Clinical bioinformaticians deploy NetMHCpan to screen all 8- to 11-mer peptides spanning tumor mutations against the patient’s six HLA-A, HLA-B, and HLA-C alleles. Candidates with %Rank_EL scores below 0.5% are prioritized for therapeutic formulation, slashing the cost and turnaround time of clinical vaccine manufacturing.
In viral and bacterial vaccine development, NetMHCpan enables rational epitope discovery across emerging pathogens. Rather than synthesizing exhaustive overlapping peptide libraries spanning entire viral proteomes, researchers filter target antigens in silico. By selecting high-scoring epitopes conserved across viral variants and predicting their presentation across broad population HLA supertypes, immunologists design targeted protein subunit vaccine constructs that maximize global population coverage while avoiding immunodominant decoy regions.
In the wet lab, NetMHCpan directly guides the selection and synthesis of peptide reagents for cellular assays. Synthesizing peptides for experimental validation requires substantial capital; filtering candidate pools using strict %Rank thresholds reduces reagent costs by up to 90%. Furthermore, predicting high-affinity binders is required for assembling stable peptide-MHC multimers and tetramers used in flow cytometry to detect, enumerate, and sort antigen-specific CD8+ T cells from peripheral blood mononuclear cells. These flow-sorted populations are frequently coupled with T-cell receptor sequencing to characterize the clonotypic T-cell repertoire responding to predicted epitopes.
In analytical immunopeptidomics pipelines, NetMHCpan functions as an indispensable post-acquisition validation tool. When researchers execute immunoprecipitation protocols to pull down MHC-peptide complexes from cell lysates followed by tandem mass spectrometry, NetMHCpan is used to deconvolute the resulting peptide lists, confirming that the observed sequence motifs align with the known binding preferences of the host cell’s HLA alleles and flagging non-specific background contaminants.
Common misunderstandings and interpretation pitfalls
Despite its accessibility, deploying NetMHCpan in research and clinical workflows requires awareness of several frequent interpretive pitfalls:
- Equating MHC binding with T-cell immunogenicity: High-affinity MHC binding is a necessary, but insufficient, condition for an immune response. A peptide with a %Rank_EL of 0.05% will bind stably to MHC-I, but it will not trigger T-cell activation unless the host maintains a naive T-cell repertoire with complementary T-cell receptors (TCRs) that avoid central thymic tolerance. NetMHCpan predicts presentation, not TCR engagement or immunogenicity.
- Relying on static IC50 cutoffs across different alleles: Applying a rigid 500 nM binding affinity cutoff across all HLA loci introduces severe biological bias. Certain alleles naturally bind peptides at weaker baseline affinities while inducing potent cellular responses. Researchers should prioritize %Rank_EL over raw nanomolar values for inter-allele prioritization.
- Ignoring mass spectrometry technical biases: Because NetMHCpan is heavily trained on LC-MS/MS eluted ligands, it inherits the systematic biases of mass spectrometry. Peptides containing hydrophobic residues that ionize efficiently (high flyability) are over-represented in training sets, whereas highly hydrophilic peptides or those containing sensitive cysteine residues are systematically under-detected.
- Confusing MHC Class I and MHC Class II predictors: NetMHCpan is designed strictly for MHC Class I molecules, which feature a closed binding groove that accommodates 8- to 14-mers (optimally 9-mers). Predicting peptide binding to MHC Class II molecules (HLA-DR, HLA-DP, HLA-DQ), which have open binding grooves accommodating 13- to 25-mers, requires NetMHCIIpan rather than NetMHCpan.
- Neglecting post-translational modifications and proteasomal splicing: Standard NetMHCpan inputs evaluate linear genomic amino acid sequences. Peptides containing biological post-translational modifications (such as phosphorylation or glycosylation) or non-contiguous spliced peptides generated by the proteasome cannot be evaluated accurately without specialized modifications.
Step-by-step workflow: from FASTA sequence to validated candidate epitopes
To execute a rigorous epitope prediction campaign, researchers follow an established six-stage computational and experimental workflow:
1. Target sequence preparation: Obtain the curated protein sequence in standard FASTA format. For viral or bacterial targets, ensure that the sequence reflects circulating clinical strains and verify signal peptide boundaries using SignalP secretome predictions to avoid evaluating cleaved leader peptides.
2. HLA typing and allele selection: Determine the four-digit HLA-A, HLA-B, and HLA-C genotypes of the target donor or population cohort (for example, HLA-A*02:01, HLA-A*24:02, HLA-B*07:02, HLA-B*44:02, HLA-C*07:01, HLA-C*07:02). In NetMHCpan, select these specific alleles from the nomenclature menu, or upload a custom sequence if working with uncharacterized alleles.
3. Parameter configuration: Select the query peptide lengths. For standard MHC-I screens, specify lengths of 8, 9, 10, and 11 amino acids. Enable both Eluted Ligand (Score_EL, default) and Binding Affinity (Score_BA) predictions to evaluate both presentation likelihood and biochemical affinity.
4. Filtering and rank stratification: Filter the resulting tabular output. Designate all peptides with %Rank_EL below 0.5% as Strong Binders and peptides between 0.5% and 2.0% as Weak Binders. Where multiple overlapping peptides share an identical binding core, select the length variant demonstrating the lowest %Rank_EL.
5. Cross-checking cleavage and expression: Confirm that the candidate peptides originate from proteins with confirmed cellular expression in the target tissue. Check flanking sequences for proteasomal cleavage compatibility, verifying that the C-terminal residue matches canonical proteasomal cleavage motifs.
6. Experimental validation: Procure synthetic peptides matching the prioritized candidates at greater than 90% purity. Validate biochemical binding via in vitro MHC stabilization assays, and confirm cellular immunogenicity using IFN-gamma ELISpot or fluorescent MHC tetramer staining on donor-derived peripheral blood mononuclear cells.
Frequently asked questions
What is the difference between NetMHC and NetMHCpan?
NetMHC consists of individual allele-specific neural networks trained exclusively on experimental data available for each specific allele. In contrast, NetMHCpan uses a pan-specific architecture based on a 34-residue pseudo-sequence of the MHC binding cleft, allowing it to predict binding across any MHC class I molecule of known sequence, including uncharacterized and novel alleles lacking direct experimental measurements.
How does NetMHCpan predict binding for an uncharacterized HLA allele?
NetMHCpan extracts the 34 polymorphic amino acid residues that line the peptide-binding cleft within 4.0 angstroms of the bound peptide from the uncharacterized allele sequence. The neural network, which was trained on thousands of combinations of peptide sequences and MHC pseudo-sequences, interpolates binding based on the sequence similarity of these key contact residues to previously characterized alleles.
Why is percentile rank (%Rank) preferred over nanomolar affinity (IC50)?
Percentile rank normalizes prediction scores against a large reference distribution of random natural peptides for each specific allele. Because different HLA alleles exhibit distinct baseline binding affinity ranges, applying a uniform nanomolar cutoff (such as 500 nM) introduces significant bias. Percentile rank provides an allele-independent metric where a %Rank below 0.5% consistently identifies top-tier candidate epitopes.
Can NetMHCpan predict MHC class II peptide presentation?
No, NetMHCpan is designed specifically for MHC class I molecules. MHC class II molecules feature an open binding groove accommodating longer peptides (typically 13 to 25 amino acids) with distinct binding cores and flanking residues. MHC class II predictions must be performed using NetMHCIIpan, which employs an open-groove alignment architecture specifically calibrated for class II dimers.
What are the default cutoff thresholds for strong and weak binders in NetMHCpan?
For MHC class I molecules, NetMHCpan defines Strong Binders as peptides with an eluted ligand percentile rank (%Rank_EL) below 0.5%, and Weak Binders as peptides with a %Rank_EL below 2.0%. Peptides with a %Rank_EL equal to or exceeding 2.0% are classified as non-binders.
Sources
- Reynisson B, Alvarez B, Paul S, Peters B, Nielsen M. NetMHCpan-4.1 and NetMHCIIpan-4.0: improved predictions of MHC antigen presentation by concurrent motif deconvolution and integration of MS MHC eluted ligand data. Nucleic Acids Res. 2020;48(W1):W449-W454. URL: https://doi.org/10.1093/nar/gkaa379. Accessed: 2026-11-15.
- Jurtz V, Paul S, Andreatta M, Marcatili P, Peters B, Nielsen M. NetMHCpan-4.0: Improved Peptide-MHC Class I Interaction Predictions Integrating Eluted Ligand and Binding Affinity Data. J Immunol. 2017;199(9):3360-3368. URL: https://doi.org/10.4049/jimmunol.1700893. Accessed: 2026-11-15.
- Nielsen M, Lundegaard C, Blicher T, Lamberth K, Harndahl M, Justesen S, Roder G, Peters B, Sette A, Lund O, Buus S. NetMHCpan, a Method for Quantitative Predictions of Peptide Binding to Any HLA-A and -B Locus Protein of Known Sequence. PLoS ONE. 2007;2(8):e796. URL: https://doi.org/10.1371/journal.pone.000796. Accessed: 2026-11-15.
- Hoof I, Peters B, Sidney J, Pedersen LE, Sette A, Lund O, Buus S, Nielsen M. NetMHCpan, a method for MHC class I binding predictions: a huge up-scale in presentation of peptide-binding data. Immunogenetics. 2009;61(1):1-13. URL: https://doi.org/10.1007/s00251-008-0341-z. Accessed: 2026-11-15.
- DTU Health Tech Bioinformatic Services. NetMHCpan 4.1 Server Documentation. Technical University of Denmark. URL: https://services.healthtech.dtu.dk/services/NetMHCpan-4.1/. Accessed: 2026-11-15.
- Immune Epitope Database (IEDB) Analysis Resource. MHC-I Binding and Processing Tools Documentation. URL: https://tools.iedb.org/mhci/. Accessed: 2026-11-15.
- Alvarez B, Barra C, Nielsen M, Andreatta M. Computational tools for the identification and interpretation of sequence motifs in immunopeptidomes. Proteomics. 2018;18(12):e1700252. URL: https://doi.org/10.1002/pmic.201700252. Accessed: 2026-11-15.
Data: NetMHCpan Version Evolution and Algorithmic Specifications
Comparative technical specifications, training architectures, and dataset scopes established across foundational releases of the NetMHCpan MHC class I binding prediction platform.
Period covered: 2007 to 2026. Coverage: Global.
| Version | Release Year | Primary Machine Learning Architecture | Training Data Modalities | Training Data Size (interactions) | MHC Allelic Coverage | Peptide Length Range (amino acids) | Percentile Rank Normalization |
|---|---|---|---|---|---|---|---|
| NetMHCpan 1.0 | 2007 | Feed-forward artificial neural networks with 34-residue pseudo-sequence | Quantitative in vitro peptide-MHC binding affinity (IC50) | 37190 | Human HLA-A and HLA-B alleles | Canonical 9-mers | Not available in initial release |
| NetMHCpan 2.0 | 2009 | Ensemble neural networks with expanded pseudo-sequence alignment | Quantitative in vitro binding affinity (IC50) | 110000 | HLA-A, B, C, E; chimpanzee, macaque, gorilla, mouse, swine | 8 to 11 amino acids | Introduced against 1,000,000 random natural 9-mers |
| NetMHCpan 3.0 | 2016 | Pan-allele and pan-length alignment networks with insertion/deletion support | Quantitative in vitro binding affinity (IC50) | 180000 | HLA-A, B, C; BoLA; non-human primates | 8 to 14 amino acids | Standardized percentile rank across variable lengths |
| NetMHCpan 4.0 | 2017 | Dual-output feed-forward neural networks integrating EL and BA | In vitro binding affinity (BA) and mass spectrometry eluted ligands (EL) | 850000 | 170 MHC molecules across human and animal species | 8 to 14 amino acids | Separate %Rank_EL and %Rank_BA scores |
| NetMHCpan 4.1 | 2020 | NNAlign_MA with unsupervised motif deconvolution and pseudo-labeling | Single-allele and multi-allele MS-EL combined with BA | 13245212 | 250 distinct MHC class I molecules (human, murine, bovine, swine, canine, equine) | 8 to 14 amino acids (default) | Default %Rank_EL with |
Sources
- Nielsen et al., PLoS ONE 2007 (NetMHCpan 1.0) (accessed 2026-11-15)
- Hoof et al., Immunogenetics 2009 (NetMHCpan 2.0) (accessed 2026-11-15)
- Jurtz et al., J Immunol 2017 (NetMHCpan 4.0) (accessed 2026-11-15)
- Reynisson et al., Nucleic Acids Res 2020 (NetMHCpan 4.1) (accessed 2026-11-15)
- DTU Health Tech NetMHCpan 4.1 Server Documentation (accessed 2026-11-15)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







