DTU Health Tech

Department of Health Technology

We recently made large changes to the webserver infrastructure, so you might experience errors. Please report issues to health-master@dtu.dk

NetMHCIIpan - 4.1

Pan-specific binding of peptides to MHC class II mocules of known sequence

The NetMHCIIpan-4.1 server predicts peptide binding to any MHC II molecule of known sequence using Artificial Neural Networks (ANNs). It is trained on an extensive dataset of over 500.000 measurements of Binding Affinity (BA) and Eluted Ligand mass spectrometry (EL), covering the three human MHC class II isotypes HLA-DR, HLA-DQ, HLA-DP, as well as the mouse molecules (H-2). The introduction of EL data extends the number of MHC II molecules covered, since BA data covers 59 molecules and EL data covers 74. As mentioned, the network can predict for any MHC II of known sequence, which the user can specify as FASTA format. The network can predict for peptides of any length.

The output of the model is a prediction score for the likelihood of a peptide to be naturally presented by and MHC II receptor of choice. The output also includes %rank score, which normalizes prediction score by comparing to prediction of a set of random peptides. Optionally, the model also outputs BA prediction and %rank scores.

New in version 4.1: The method is trained on a extented set of EL data compared to version 4.0, and novel and correct BA for HLA-DQA1*04:01-DQB1*04:02 are included.

Refer to the instructions page for more details.

The project is a collaboration between DTU-Bioinformatics, and LIAI.

View the version history of this server.


Hover the mouse cursor over the symbol for a short description of the options


Paste a single sequence or several sequences in FASTA format into the field below:

... or upload a file in FASTA format directly from your local disk:

... or load some sample data:

PEPTIDE LENGTH (specify variable length as a comma separated list):  

Use context encoding


Select Allele(s) (max. 20 per submission)

... or type a list of molecules names separated by commas without spaces (max 20 per submission)

For the list of available molecule names click here

Alternatively, upload full length Alpha and Beta chain protein sequences:


Threshold for strong binder (% Rank)  

Threshold for weak binder (% Rank)  

Include BA predictions

Turn on filtering options 

Print only the strongest binding core 

Sort output by prediction score 

Save predictions to xls file 

At most 5000 sequences per submission; each sequence not more than 20,000 amino acids and not less than 8 amino acids. Max 20 MHC alleles per submission.

The sequences are kept confidential and will be deleted after processing.


For publication of results, please cite:

  • Improved prediction of MHC II antigen presentation through integration and motif deconvolution of mass spectrometry MHC eluted ligand data.
    Reynisson B, Barra C, Kaabinejadian S, Hildebrand WH, Peters B, Nielsen M
    J Proteome Res 2020 Apr 30. doi: 10.1021/acs.jproteome.9b00874.
    PubMed: 32308001


Benchmark data used to develop this server were obtained from:




In this section, the user must define the input for the prediction server following these steps:
1) Specify the desired type of input data (FASTA or PEPTIDE ) using the drop down menu.
2) Provide the input data by means of pasting the data into the blank field, uploading it using the "Choose File" button or by loading sample data using the "Load Data" button. All the input sequences must be in one-letter amino acid code. The alphabet is as follows (case sensitive):

A C D E F G H I K L M N P Q R S T V W Y and X (unknown)

Any other symbol will be converted to X before processing. At most 5000 sequences are allowed per submission; each sequence must be not more than 20,000 amino acids long and not less than 9 amino acids long.

3) If FASTA was selected as input type, the user must select the peptide length(s) the prediction server is going to work with. NetMHCIIpan-4.0 will "chop" the input FASTA sequence in overlapping peptides of the provided length and will predict binding against all of them. By default input proteins are digested into 15-mer peptides. Note that, if PEPTIDE was selected as input type, this step is unnecessary and thus the peptide length selector will directly not appear in the interface.

4)Context encoding informs the network of the proteolytic context the ligand. Context is automatically generated from the source protein if the user selects FASTA format. Briefly, context is made up of 12 amino acids: 3 amino acids upstream of the ligand, 3 first amino acids at the ligand N-terminus, 3 last amino acids at the ligand C-terminus and 3 amino acids downstream the ligand(in the source protein), all concatenated together. If the input type is PEPTIDE , the user must specify the ligand context(see PEPTIDECONT ).


In this section, the user must define which MHC molecule(s) the input data is going to be predicted against:

1) Here the user can select from a list of MHC molecules by first selecting the species/loci and clicking MHCs in the list. Note that for DP and DQ alleles, both ALPHA and BETA chains must be selected.
Note further, the label HighQ in the drop-down menue refers to HLA molecules characterize with sufficient MS HLA ligand data to derive a highly accurate characterisation of the binding motif.

2) The user can also type the molecule names. Note, that for HLA-DP and HLA-DQ alleles, ALPHA and BETA chains must both be typed. Please consult List of MHC molecule names. Note that molecules selected from step 1. populate this bar.

3) If the molecule of interest is not provided in the lists, the user can input ALPHA and BETA sequences in fasta format(for HLA-DR, only the BETA chain is needed). With this option, rank score predictions are not available.


In this section, the user may define additional parameters to further customize the run:

1) Specify thresholds for strong and weak binders. They are expressed in terms of %Rank, that is percentile of the predicted binding affinity compared to the distribution of affinities calculated on set of random natural peptides. The peptide will be identified as a strong binder if it is found among the top x% predicted peptides, where x% is the specified threshold for strong binders (by default 2%). The peptide will be identified as a weak binder if the % Rank is above the threshold of the strong binders but below the specified threshold for the weak binders (by default 10%).

2) Tick this option to include also Binding Affinity predictions together with Eluted Ligand likelihood.

3) Tick this option to output only peptides with a % Rank score below a specified threshold. Useful for large submissions.

4) Tick this box to output only the strongest binding core.

5) Tick this box to have the output sorted by descending prediction score.

6) Enable this option to export the prediction output to .XLS format (readable for most spreadsheet softwares, like Microsoft Excel).
    Three "common" columns:
    1. Pos: peptide position (starting from 0).
    2. Peptide: peptide sequence.
    3. ID: Protein ID.
    5 additional columns for each MHC selected for prediction:
    4. EL-score: raw eluted ligand likelihood prediction score.
    5. EL_Rank: Rank of the predicted eluted ligand likelihood score compared to a set of random natural peptides.
    6. BA-score: if BA output was selected, this column will display the raw binding affinity prediction score.
    7. nM: if BA output was selected, this column will display the predicted IC50 binding values (in nM).
    8. BA_Rank: if BA output was selected, this column will display the binding affinity Rank score.
    And, finally, two last "common" columns:
    9. Ave: average over the raw EL predictions.
    10. NB: number of alleles a given peptide binds with EL %RANK threshold < 10%.


After the user has finished the "INPUT DATA", "MHC SELECTION" and "ADDITIONAL CONFIGURATION" steps, the submission can now be done. To do so, the user can click on "Submit" to submit the job to the processing server, or click on "Clear fields" to clear the page and start over.

The status of your job (either 'queued' or 'running') will be displayed and constantly updated until it terminates and the server output appears in the browser window.

After the server has finished running the corresponding predictions, an output page will be delivered to the user. A description of the output format can be found HERE.

At any time during the wait you may enter your e-mail address and simply leave the window. Your job will continue; when it terminates you will be notified by e-mail with a URL to your results. They will be stored on the server for 24 hours.


Output format


For the following FASTA input example:


With parameters:

Peptide length: 15
Allele: DRB1_0101
Sort by prediction score: On

NetMHCIIpan-4.1 will return the following output (showing the top 10 predicted peptides):

# NetMHCIIpan version 4.1

# Input is in FASTA format

# Peptide length 15

# Prediction Mode: EL

# Threshold for Strong binding peptides (%Rank)	1%
# Threshold for Weak binding peptides (%Rank)	5%

# Allele: DRB1_0101
 Pos           MHC              Peptide   Of        Core  Core_Rel        Identity      Score_EL %Rank_EL Exp_Bind  BindLevel
  40     DRB1_0101      QGQWRGAAGTAAQAA    3   WRGAAGTAA     1.000          P9WNK5      0.867119     0.56       NA   <=SB
  39     DRB1_0101      LQGQWRGAAGTAAQA    4   WRGAAGTAA     1.000          P9WNK5      0.775118     0.99       NA   <=SB
  41     DRB1_0101      GQWRGAAGTAAQAAV    2   WRGAAGTAA     1.000          P9WNK5      0.585897     2.04       NA   <=WB
  38     DRB1_0101      SLQGQWRGAAGTAAQ    5   WRGAAGTAA     1.000          P9WNK5      0.513786     2.57       NA   <=WB
  73     DRB1_0101      STNIRQAGVQYSRAD    3   IRQAGVQYS     1.000          P9WNK5      0.184990     7.08       NA       
  26     DRB1_0101      KTQIDQVESTAGSLQ    3   IDQVESTAG     0.993          P9WNK5      0.122282     9.40       NA       
  15     DRB1_0101      AGNFERISGDLKTQI    3   FERISGDLK     1.000          P9WNK5      0.121026     9.45       NA       
  53     DRB1_0101      AAVVRFQEAANKQKQ    3   VRFQEAANK     0.873          P9WNK5      0.118252     9.59       NA       
  14     DRB1_0101      EAGNFERISGDLKTQ    4   FERISGDLK     1.000          P9WNK5      0.118084     9.60       NA       
  72     DRB1_0101      ISTNIRQAGVQYSRA    4   IRQAGVQYS     0.993          P9WNK5      0.103021    10.47       NA       


The prediction output for each molecule consists of the following columns:

  • Pos Residue number (starting from 0)

  • MHC MHC molecule name

  • Peptide Amino acid sequence

  • Of Starting position offset of the optimal binding core (starting from 0)

  • Core Binding core register

  • Core_Rel Reliability of the binding core, expressed as the fraction of networks in the ensemble selecting the optimal core

  • Identity Annotation of the input sequence, if specified

  • Score_EL Eluted ligand prediction score

  • %Rank_EL Percentile rank of eluted ligand prediction score

  • Exp_bind If the input was given in PEPTIDE format with an annotated affinity value (mainly for benchmarking purposes).

  • Score_BA Predicted binding affinity in log-scale (printed only if binding affinity predictions were selected)

  • Affinity(nM) Predicted binding affinity in nanomolar IC50 (printed only if binding affinity predictions were selected)

  • %Rank_BA % Rank of predicted affinity compared to a set of 100.000 random natural peptides. This measure is not affected by inherent bias of certain molecules towards higher or lower mean predicted affinities (printed only if binding affinity predictions were selected)

  • BindLevel (SB: strong binder, WB: weak binder). The peptide will be identified as a strong binder if the % Rank is below the specified threshold for the strong binders. The peptide will be identified as a weak binder if the % Rank is above the threshold of the strong binders but below the specified threshold for the weak binders.

  • Article abstracts

    In preparation

    Supplementary material

    Training data


    Here, you will find the data set used for training of NetMHCIIpan-4.1.


    Download the file and untar the content using

    cat NetMHCIIpan_train.tar.gz | uncompress | tar xvf -

    This will creat the directory called NetMHCIIpan_train. In this directory you will find 12 files. 10 files (c00?_ba, c00?_el) with partitions with binding affinity (ba) with eluted ligand data (el). The format for each file is (here shown for an el file)

    where the different columns are peptide, target value, MHC_molecule/cell-line, and context. In cases where the 3rd columns is a cell-line ID, the MHC molecules expressed in the cell-line are listed in the allelelist.txt file.

    The allelelist.txt file contains the information about alleles expressed in each MA cell-line data set, and pseudosequence.2016.all.X.dat the MHC pseudo sequenes for each MHC molecule.

    Version history

    Please click on the version number to activate the corresponding server.

    4.0 The current server (online since April 2020). New in this version:
    • The two output neuron architechture introduced in NetMHCpan-4.0 permits the inclusion of EL data, and the new training algorithm NNAlign_MA extends training data to ligands of ambiguous allele assignments. The model also, optionally, encodes ligand context.
    Main publication:

    • Improved prediction of MHC II antigen presentation through integration and motif deconvolution of mass spectrometry MHC eluted ligand data.
      Reynisson B, Barra C, Kaabinejadian S, Hildebrand WH, Peters B, Nielsen M
      J Proteome Res 2020 Apr 30. doi: 10.1021/acs.jproteome.9b00874.
      PubMed: 32308001
    3.2 (online since January 2018). New in this version:
    • Method retrained on an extensive dataset of over 100,000 datapoints, covering 36 HLA-DR, 27 HLA-DQ, 9 HLA-DP, and 8 mouse MHC-II molecules.
    Main publication:

    • Improved methods for predicting peptide binding affinity to MHC class II molecules.
      Jensen KK, Andreatta M, Marcatili P, Buus S, Greenbaum JA, Yan Z, Sette A, Peters B, Nielsen M.
      Immunology. 2018 Jan 6. doi: 10.1111/imm.12889.
      PubMed: 29315598
    3.1 (online since December 2014). New in this version:
    • Improved binding core identification by realigning individual networks in the ensemble.
    • Introduced a reliability measure on the predicted binding core (Core_Rel column).
    • Graphical representation of the binding core register and of possible multiple cores.
    Main publication:

    • Accurate pan-specific prediction of peptide-MHC class II binding affinity with improved binding core identification
      Andreatta M, Karosiene E, Rasmussen M, Stryhn A, Buus S, and Nielsen M
      Immunogenetics (2015)
      PubMed: 26416257
    3.0 (online since June 2013). New in this version:
    • The user can make predictions for all DR, DP and DQ molecules with known protein sequence. Likewise can the user upload full length MHC class II alpha and beta chain and have the server predict MHC restricted peptides from any given protein of interest
    2.1 (online since 6 June 2011). New in this version:
    • User can upload full length MHC class II beta chain and have the server predict MHC restricted peptides from any given protein of interest.
    2.0 (online since 17 Nov 2010). New in this version:
    • New concurent algorithm used to train the network.
    1.1 (online since 15 April 2010). New in this version:
    • %-rank measure include for each prediction value. The %-rank score give the rank of the prediction score to a distribution of prediction scores from 200.000 natural random 15mer peptides.
    1.0 Original version (online version until April 15 2010):

    Main publication:

    • Quantitative predictions of peptide binding to any HLA-DR molecule of known sequence: NetMHCIIpan.
      Nielsen M, et al. (2008) PLoS Comput Biol. Jul 4;4(7):e1000107. View the abstract, the full text version at PLoS Compu: Full text.

    Software Downloads


    If you need help regarding technical issues (e.g. errors or missing results) contact Technical Support. Please include the name of the service and version (e.g. NetPhos-4.0). If the error occurs after the job has started running, please include the JOB ID (the long code that you see while the job is running).

    If you have scientific questions (e.g. how the method works or how to interpret results), contact Correspondence.

    Correspondence: Technical Support: