Exercise:AllergenicityPrediction: Difference between revisions

From 22145
Jump to navigation Jump to search
(Created page with "Exercise written by Carolina Barra Quaglia == Introduction == Immunopeptidomics experiments can identify thousands of peptides presented on the cell surface by MHC molecules. However, because an individual can express several different HLA alleles, it is often not immediately clear which HLA molecule is responsible for presenting each peptide. In addition, immunopeptidomics datasets may contain co-purified peptides that are not true MHC ligands. In this exercise, we w...")
 
No edit summary
Line 33: Line 33:
== Data Collection: Get the Data and Filter It ==
== Data Collection: Get the Data and Filter It ==


Every good bioinformatics exercise starts with some data collection.
Instructions


Start by going to the [https://www.iedb.org IEDB home page] to perform your query.
PART A


Go to the [https://www.iedb.org IEDB] and search the database for '''assays''' with '''MHC ligands''' in particular we want "mass spectrometry assays" in '''humans''' with '''rheumatoid arthritis'''.
Climate change is forcing people to find new protein sources. Seaweed is an ubiquitous algae growing everywhere, so some researchers from DTU food, thought it could be interesting to create a new food product with high protein content using the following species.


There is growing evidence that MHC class II has a role in presenting self-peptides to induce autoimmunity, so we are going to focus only on MHC class II.
It is your job to determine if there are any potential allergens on brown algae that could present a problem for consumers (Phaeophyceae (taxid:2870), in particular in Ectocarpus siliculosus)


*'''Q1: How many epitopes do you find with the initial filter?'''
1. A) What would be your first approach to determine if the algae contains potential allergens? B) Where would you look for experimental evidence? C) How would you envision predicting in-silico allergy if no allergenicity predictor would been developed yet? Which predictions could you use as a proxy?
2. ALK has developed a treatment for allergy immunotherapy against mites by inducing tolerance to specific common antigens, being one of the most common antigens (Der p 1). It has been observed that after prolonged subcutaneous injections or oral treatment, 72% of the patients do not exhibit allergy symptoms towards dust. In addition, people having other allergies such as allergy to ananas or papaya are not observed anymore. Can you explain why? Hint: https://blast.ncbi.nlm.nih.gov/Blast.cgi
3. Do you think the immunotherapy treatment can also be useful to reduce allergies against brown algae? Justify your answer


*'''Q2: Do you agree with calling these peptides epitopes? Why?'''
PART B
Now we are going to develop an allergenicity predictor using random forest


Now refine your search by including only '''mass-spectrometry assays''' on '''HLA-DR restriction alleles'''. From the '''References''' tab, select the publication from the ''Journal of Proteome Research'' from 2017 by Wang et al.
Follow the code in google colab. Here you will find some hints on how to use google colab: https://colab.research.google.com/notebooks/basic_features_overview.ipynb#scrollTo=WUtu4316QSHL


*'''Q3: How many eluted ligands did they find in this study?'''


Under the '''Assays''' tab, select '''MHC ligand assays''' and export these results.
https://colab.research.google.com/drive/1vNR_jJeJrMdVoGcTL3iPCKKsXqPi62he?usp=sharing


Open the exported file using Excel or your preferred program and inspect the different columns. We are interested in the epitope modification column ('''Modifications''').


Note that there are two peptide sequences that contain post-translational modifications.
Note the different steps involved in the creation of the predictor.


*'''Q4: What kind of post-translational modifications are present?'''
1. Data collection and filtering (Data upload)
2. Clustering
3. Train and test data split
4. Training
5. Evaluation


These modified peptides look very interesting. However, the MHC Motif Deconvolution software cannot currently deal with them, so exclude them from the dataset.
Report the performance of your model.


In addition, inspect the column containing the '''MHC Types present in the host'''.
PART C
Now it is your turn to improve the allergenicity prediction. Optimize the code to improve performance. Here you are allowed to use chatGPT and other language models so give your best hit, and try to beat the earliest performance. There are many things that can be improved such as changing the random forest for other machine learning architectures, add a regularization term to avoid overfitting, you can do some pre-processing of the data or be more creative and find other ways to improve allergenicity prediction. This is a potential project to continue in the mini research project of the second part of the group, and original projects are always evaluated extra-positively!


*'''Q5: Which alleles are expressed in each of the patients used for this assay?'''
(Hint: If you are not very familiar with programming you can optimise the given code and asking chatgpt) Here you can find some documentation from sci-kit learn and examples: https://scikit-learn.org/stable/index.html
BAD LUCK! It seems that IEDB missed the annotation of the specific alleles for each peptide, we can only read "HL-DR" on MHC restriction. This is insufficient for our purpose, so we will need to traceback the original data from the original publication. Find it. look for table 1 and supplementary table 2 in the original paper. Luckily your friend ChatGPT can do the tedious work by reading table 1 to find the hla alleles for each patient and making a list of which peptides on the IEDB belong to each of the patients. There are 5 Rheumatoid Arthritis patients, so you should expect five files with peptides. Try to do this prompt with your favourite LLM-friend.'''


Now have the grasped of how much effort takes to create a curated database. You can also observe that databases contain errors, and missing data, like in this case for the IEDB. If you still didn't manage to ask the relevant question to your LLM sparring partner.. no worries, you can download all 5 files from DTU Learn in a zip file called Datasets_for_antigen_processing.zip
In the hand in, share your code, and report the new performance.
 
You should now have both the peptide dataset and the HLA typing information required to use MHCMotifDecon. If this is not the case, read the previous paragraph and download the data.
 
== MHCMotifDecon ==
 
Go to the [https://services.healthtech.dtu.dk/services/MHCMotifDecon-1.2/ MHCMotifDecon server] and select '''MHC class II''' as the input type.
 
In this section we will analyse all five RA patients in the same run. Upload the provided peptide file in the main input field. Each line contains the '''peptide sequence followed by the patient ID''', separated by a tab:
 
PEPTIDESEQUENCE    RA1
PEPTIDESEQUENCE    RA2
 
The server refers to the patient ID as the '''Cell_line_ID'''. This identifier allows MHCMotifDecon to keep peptides from the different patients separate during the analysis.
 
Because we are analysing multiple patients, use the section '''"If input data is for multiple cell lines"''' to upload the provided HLA allele file. The format is:
 
RA1    DRB1_0402,DRB1_1104
RA2    DRB1_0101,DRB1_0401
 
Make sure that the patient IDs in the HLA file (RA1, RA2, etc.) are exactly the same as those in the peptide file. Multiple HLA alleles for the same patient are separated by commas without spaces.
 
'''Note:''' MHCMotifDecon uses a specific notation for HLA alleles. For example:
 
HLA-DRB1*01:01 → DRB1_0101
 
Under '''Additional configuration''', keep the default MHC class II peptide-length range ('''12–21 amino acids''') and the default '''%Rank threshold''' for the first analysis. Select '''Include peptide count histogram''' so that the number of peptides assigned to each HLA molecule can be easily compared.
 
Press '''Submit'''. When the analysis is complete, inspect the motif deconvolution plots and peptide-count results for each patient. Peptides predicted not to bind sufficiently strongly to any of the HLA molecules supplied for that patient are assigned to the '''Trash''' cluster.
 
If you are ''really''' struggling to get the peptides in the right format to make MHC Motif Deconvolution work.. you can get to the output shortcut here and answer the questions (this temporary link will not work more than a few hours for the exercise, so remember to download the output):
https://services.healthtech.dtu.dk/cgi-bin/webface2.cgi?jobid=6AB2CF75000C1FD0C658852D&wait=20
 
*'''Q6: How many peptides were assigned to each of the alleles, and how many were assigned to the trash cluster?'''
 
*'''Q7: Can you see any differences between the trash-cluster peptides and the peptides assigned to a specific allele? Explain.'''
 
Go back to the previous submission and modify the '''%rank threshold''' to 2%.
 
*'''Q8: What is the effect of changing the %rank threshold?'''
 
We know that '''HLA-DRB1''' is not the only HLA-DR protein expressed by humans. HLA-DRB3, HLA-DRB4, and HLA-DRB5 are located in close proximity to HLA-DRB1 on the chromosome and are often expressed together.
 
In particular, cell lines expressing '''HLA-DRB1*04:01''' are strongly associated with the expression of a second allele called '''HLA-DRB4*01:01'''.
 
If you want to learn more about this topic, search for '''HLA-DR linkage disequilibrium'''.
 
To predict which alleles are in linkage disequilibrium with your HLA-DRB1 alleles, you can use the following server. Make sure that you input the patients information on the right format by looking at the test example.
 
[https://services.healthtech.dtu.dk/services/HLAAssoc-1.0/ HLAAssoc]
 
 
Having this information, now go back to MHC Motif Decon and extend the HLA typing of the patients.
 
If everything goes bananas and you are completely lost, dont panic! Here is the output of HLAAssoc:
 
https://services.healthtech.dtu.dk/cgi-bin/webface2.cgi?jobid=6AB2D62B000C48502E9E90B0&wait=20
 
 
Run MHCMotifDecon again with this additional alleles.
 
*'''Q9: How many peptides are now associated with HLA-DRB3,4 and 5? Where did these peptides come from?'''
 
https://services.healthtech.dtu.dk/cgi-bin/webface2.cgi?jobid=6AB2D94E000C4F404E837EBC&wait=20
 
== GibbsCluster ==
 
We will now analyse the same ligand dataset using an unsupervised approach.
 
Go to the [https://services.healthtech.dtu.dk/service.php?GibbsCluster-2.0 GibbsCluster server].
 
Enter the submission page and paste the list of ligands into the input window.
 
Because GibbsCluster uses '''unsupervised learning''', you do not need to specify the HLA alleles present in the sample.
 
Select the '''MHC class II''' parameters.
 
Change:
 
'''Number of iterations per sequence per temperature step''' = 100
 
and select:
 
'''Preference for hydrophobic AAs at P1'''
 
Click '''Submit'''.
 
To save you some time I have performed two searches:
In the first one all the peptides from the different patients have been combined:
https://services.healthtech.dtu.dk/cgi-bin/webface2.cgi?jobid=6AB2E38A000C5E087D058D4B&wait=20
 
In the second one only the peptides from patient RA 2 have been included:
https://services.healthtech.dtu.dk/cgi-bin/webface2.cgi?jobid=6AB2E615000C60D27CDD1E9F&wait=20
 
*'''Q10: Does the number of clusters found by GibbsCluster correspond to the number of HLA alleles in your sample?'''
 
*'''Q11: Can you identify other differences between the GibbsCluster solution and the MHCMotifDecon solution?'''
 
== Conclusion ==
 
You should now have experience with two different approaches for analysing complex immunopeptidomics datasets:
 
* '''MHCMotifDecon''' – supervised motif deconvolution using known HLA alleles and MHC-binding predictions.
* '''GibbsCluster''' – unsupervised clustering of peptide sequences without prior knowledge of the HLA alleles.
 
Consider how prior knowledge of the HLA type influences the interpretation of an immunopeptidomics dataset and how the results from the two approaches differ.
 
'''Done!'''

Revision as of 18:40, 29 September 2026

Exercise written by Carolina Barra Quaglia

Introduction

Immunopeptidomics experiments can identify thousands of peptides presented on the cell surface by MHC molecules. However, because an individual can express several different HLA alleles, it is often not immediately clear which HLA molecule is responsible for presenting each peptide. In addition, immunopeptidomics datasets may contain co-purified peptides that are not true MHC ligands.

In this exercise, we will work with an immunopeptidomics dataset from patients with rheumatoid arthritis (RA). We will first use the Immune Epitope Database (IEDB) to identify and retrieve the experimental peptide dataset and the corresponding HLA typing information.

We will then use MHCMotifDecon to assign the detected peptides to their most likely HLA restriction element and investigate how different analysis parameters and assumptions about the HLA genotype affect the deconvolution.

Finally, we will analyse the same peptide dataset with GibbsCluster, an unsupervised peptide clustering method, and compare the resulting motifs and clusters with those obtained using MHCMotifDecon.

Learning Objectives

After completing this exercise, you should be able to:

  • Retrieve and filter an immunopeptidomics dataset from the IEDB.
  • Identify relevant experimental information, including peptide modifications and the HLA alleles expressed in the sample.
  • Explain the purpose of MHC motif deconvolution in the analysis of immunopeptidomics data.
  • Use MHCMotifDecon to assign peptides to likely HLA restriction elements.
  • Evaluate how the %rank threshold and the choice of HLA alleles influence the deconvolution results.
  • Recognize the importance of considering additional HLA-DR molecules, such as HLA-DRB3, HLA-DRB4, and HLA-DRB5, when interpreting HLA-DR immunopeptidomics data.
  • Use GibbsCluster to perform unsupervised clustering of MHC class II peptide ligands.
  • Compare supervised and unsupervised approaches for identifying peptide-binding motifs in complex immunopeptidomics datasets.

Current Challenges

Immunopeptidomics is currently used in several biomedical applications, including neo-epitope discovery in oncology, protein-drug immunogenicity assessment, as well as next-generation vaccine development. Immunopeptidome data are highly complex given by natural complexity of proteomics data, and particularly for immunopeptidomics, due to the expression of multiple HLA alleles on the cell membrane and the presence of co-immunoprecipitated contaminants, which is an inherent drawback of the immunopeptidomic workflow.

To resolve this problem, we can use either MHCMotifDecon or GibbsCluster. MHCMotifDecon benefits from state-of-the-art MHC class I and class II predictions, NetMHCpan and NetMHCIIpan, respectively, to accurately deconvolute immunopeptidome datasets and assign individual ligands to the most likely MHC-restriction element while discarding co-purified contaminants. If we have HLA typing this is a great tool, on the other hand in absence of HLA alleles, GibbsCluster can assess what are the different specificities in a immunopeptidomics sample.


Data Collection: Get the Data and Filter It

Instructions

PART A

Climate change is forcing people to find new protein sources. Seaweed is an ubiquitous algae growing everywhere, so some researchers from DTU food, thought it could be interesting to create a new food product with high protein content using the following species.

It is your job to determine if there are any potential allergens on brown algae that could present a problem for consumers (Phaeophyceae (taxid:2870), in particular in Ectocarpus siliculosus)

1. A) What would be your first approach to determine if the algae contains potential allergens? B) Where would you look for experimental evidence? C) How would you envision predicting in-silico allergy if no allergenicity predictor would been developed yet? Which predictions could you use as a proxy? 2. ALK has developed a treatment for allergy immunotherapy against mites by inducing tolerance to specific common antigens, being one of the most common antigens (Der p 1). It has been observed that after prolonged subcutaneous injections or oral treatment, 72% of the patients do not exhibit allergy symptoms towards dust. In addition, people having other allergies such as allergy to ananas or papaya are not observed anymore. Can you explain why? Hint: https://blast.ncbi.nlm.nih.gov/Blast.cgi 3. Do you think the immunotherapy treatment can also be useful to reduce allergies against brown algae? Justify your answer

PART B Now we are going to develop an allergenicity predictor using random forest

Follow the code in google colab. Here you will find some hints on how to use google colab: https://colab.research.google.com/notebooks/basic_features_overview.ipynb#scrollTo=WUtu4316QSHL


https://colab.research.google.com/drive/1vNR_jJeJrMdVoGcTL3iPCKKsXqPi62he?usp=sharing


Note the different steps involved in the creation of the predictor.

1. Data collection and filtering (Data upload) 2. Clustering 3. Train and test data split 4. Training 5. Evaluation

Report the performance of your model.

PART C Now it is your turn to improve the allergenicity prediction. Optimize the code to improve performance. Here you are allowed to use chatGPT and other language models so give your best hit, and try to beat the earliest performance. There are many things that can be improved such as changing the random forest for other machine learning architectures, add a regularization term to avoid overfitting, you can do some pre-processing of the data or be more creative and find other ways to improve allergenicity prediction. This is a potential project to continue in the mini research project of the second part of the group, and original projects are always evaluated extra-positively!

(Hint: If you are not very familiar with programming you can optimise the given code and asking chatgpt) Here you can find some documentation from sci-kit learn and examples: https://scikit-learn.org/stable/index.html

In the hand in, share your code, and report the new performance.