This demo shows how to predict the binding strength of peptides to different Major Histocompatibility Class II (MHC-II) haplotypes.
First load the library:
This demo assumes NetMHCIIpan is installed. Installation cannot be
netmhc2pan, as one needs to request a download link
for version 3.2 at https://services.healthtech.dtu.dk/services/NetMHCIIpan-3.2/.
install_netmhc2pan with the download link:
The installation of
netmhc2pan is checked, with the goal
of producing a helpful error message:
tryCatch( check_netmhc2pan_installation(), error = function(e) print(e) ) #> <simpleError in check_netmhc2pan_installation(): NetMHCIIpan binary not found at #> ~/.local/share/netMHCIIpan-3.2/netMHCIIpan #> #> Tip 1: from R, run 'netmhc2pan::install_netmhc2pan()' #> with a (non-expired) download URL #> Tip 2: request a download URL at the NetMHCIIpan download page at #> #> https://services.healthtech.dtu.dk/services/NetMHCIIpan-3.2/ #> (under the Downloads tab, use version 3.2)>
Now, lets use the sequence of an example protein:
Now, we need to select an MHC-II haplotype. There are many alleles, so first we count the number of haplotypes:
Now, we simply pick the first haplotype:
Now, we can predict how strong our peptide binds to our allele, by obtaining the Inhibitory Concentration 50% (IC50) value in nanomolars (nM), of which lower values indicate stronger binders:
To investigate if whole a protein is immunogenic, we need to obtain the IC50 values for all its cleaved products. As the MHC-II molecules prefers 13 amino acids residues, we can get the IC50 values for each residue as such: