{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# TDC 103: Datasets Part 2 - Biologics\n",
"\n",
"[Kexin](https://twitter.com/KexinHuang5)\n",
"\n",
"In this tutorial, we will continue the dataset exploration and now walk through various biologics datasets provided in TDC!\n",
"\n",
"We assume you have familiarize yourself with the installations, data loaders, and data functions. If not, please visit [TDC 101 Data Loaders](https://github.com/mims-harvard/TDC/blob/master/tutorials/TDC_101_Data_Loader.ipynb) and [TDC 102 Data Functions](https://github.com/mims-harvard/TDC/blob/master/tutorials/TDC_102_Data_Functions.ipynb) first!\n",
"\n",
"TDC has 10 biologics datasets in the first release. We will go with the order of discovery and development stage. \n",
"\n",
"### Target Discovery\n",
"\n",
"For target discovery, gene disease associtation prediction that we discussed in the last tutotorial also applies here. In addition to that, we include miRNA-Target Interaction (MTI) prediction dataset. miRNAs (microRNAs) are small non-coding RNAs that control expression of target genes at the post-transcriptional level. It was shown by recent research that they play important roles in disease pathology and celluar processes. miRNA therapeutics refer to insert miRNA into cells whereas sometimes miRNA is also regarded as biomarker for other drug products to target upon. miRNA-target interaction is thus very important because it can identify which miRNA can regulate the target of interest. In TDC, we include the miRTarBase database, which was collected by manually surveying literature and are later validated experimentally. TDC also provides miRNA mature sequence and target amino acid sequence as the features for miRNA and target gene. You can obtain it via:\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"100%|██████████| 338M/338M [00:17<00:00, 19.8MiB/s] \n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" miRNA_ID | \n",
" miRNA | \n",
" Target_ID | \n",
" Target | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" ath-miR398c-3p | \n",
" UGUGUUCUCAGGUCACCCCUG | \n",
" 817365 | \n",
" MAATNTILAFSSPSRLLIPPSSNPSTLRSSFRGVSLNNNNLHRLQS... | \n",
" 1 | \n",
"
\n",
" \n",
" | 1 | \n",
" ath-miR398b-3p | \n",
" UGUGUUCUCAGGUCACCCCUG | \n",
" 817365 | \n",
" MAATNTILAFSSPSRLLIPPSSNPSTLRSSFRGVSLNNNNLHRLQS... | \n",
" 1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" miRNA_ID miRNA Target_ID \\\n",
"0 ath-miR398c-3p UGUGUUCUCAGGUCACCCCUG 817365 \n",
"1 ath-miR398b-3p UGUGUUCUCAGGUCACCCCUG 817365 \n",
"\n",
" Target Y \n",
"0 MAATNTILAFSSPSRLLIPPSSNPSTLRSSFRGVSLNNNNLHRLQS... 1 \n",
"1 MAATNTILAFSSPSRLLIPPSSNPSTLRSSFRGVSLNNNNLHRLQS... 1 "
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.multi_pred import MTI\n",
"data = MTI(name = 'miRTarBase')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Activity Screening\n",
"\n",
"We include four therapeutics tasks to predict the activity of biologics. Immunotherapy is an important diagram of therapeutics. It has gained lots of interests in the recent years because of its promise in treating various cancers and less side effects than small molecule compounds. One big part of immunotherapy is Monoclonal antibody therapy. Antibody binds to antigens and once it binds to antigens, together they serve as a target marker for the humans immune system to attack those marked cells/proteins. In TDC, we include three tasks in predicting the binding of antibody and antigen. The first is paratope prediction, where we want to predict the binding region in antibody. TDC includes a processed dataset from Parapred, which curates a dataset from SAbDab. The dataset contains both heavy and light chain sequence of the antibody and each data point has the chain sequence and the positions index in the chain that correspond to the binding regions."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"100%|██████████| 150k/150k [00:00<00:00, 855kiB/s] \n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Antibody_ID | \n",
" Antibody | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 2hh0_H | \n",
" LEQSGAELVKPGASVKLSCTASGFNIEDSYIHWVKQRPEQGLEWIG... | \n",
" [49, 80, 81, 82, 101] | \n",
"
\n",
" \n",
" | 1 | \n",
" 1u8q_B | \n",
" ITLKESGPPLVKPTQTLTLTCSFSGFSLSDFGVGVGWIRQPPGKAL... | \n",
" [30, 31, 53, 83, 84, 85, 104, 105, 106, 107, 1... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Antibody_ID Antibody \\\n",
"0 2hh0_H LEQSGAELVKPGASVKLSCTASGFNIEDSYIHWVKQRPEQGLEWIG... \n",
"1 1u8q_B ITLKESGPPLVKPTQTLTLTCSFSGFSLSDFGVGVGWIRQPPGKAL... \n",
"\n",
" Y \n",
"0 [49, 80, 81, 82, 101] \n",
"1 [30, 31, 53, 83, 84, 85, 104, 105, 106, 107, 1... "
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.single_pred import Paratope\n",
"data = Paratope(name = 'SAbDab_Liberis')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Similarly, we can also predict the active binding region in the antigen. TDC uses a dataset from Bepipred, which curates a dataset from IEDB. It collects B-cell epitopes and non-epitope amino acids determined from crystal structures. To load, type: "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"100%|██████████| 2.18M/2.18M [00:00<00:00, 4.12MiB/s]\n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Antigen_ID | \n",
" Antigen | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" Protein 1 | \n",
" MASQKRPSQRHGSKYLATASTMDHARHGFLPRHRDTGILDSIGRFF... | \n",
" [109, 110, 111, 112, 113, 114, 115, 116, 117, ... | \n",
"
\n",
" \n",
" | 1 | \n",
" Protein 2 | \n",
" MSDLTDIQEDITRHEQQLIVARQKLKDAERAVEVDPDDVNKNTLQA... | \n",
" [312, 313, 314, 315, 316, 317, 318, 319, 320, ... | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Antigen_ID Antigen \\\n",
"0 Protein 1 MASQKRPSQRHGSKYLATASTMDHARHGFLPRHRDTGILDSIGRFF... \n",
"1 Protein 2 MSDLTDIQEDITRHEQQLIVARQKLKDAERAVEVDPDDVNKNTLQA... \n",
"\n",
" Y \n",
"0 [109, 110, 111, 112, 113, 114, 115, 116, 117, ... \n",
"1 [312, 313, 314, 315, 316, 317, 318, 319, 320, ... "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.single_pred import Epitope\n",
"data = Epitope(name = 'IEDB_Jespersen')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"While the previous two tasks are antigen/antibody agnostic and focus on identifying the active regions, we can also directly predict antigen-antibody binding affinities. TDC processes a dataset from SAbDab, where we only uses protein/peptide antigens:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"100%|██████████| 330k/330k [00:00<00:00, 1.02MiB/s]\n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Antibody_ID | \n",
" Antibody | \n",
" Antigen_ID | \n",
" Antigen | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 1hh6 | \n",
" ['QDQLQQSGAELVRPGASVKLSCKALGYIFTDYEIHWVKQTPVHG... | \n",
" pep-4 | \n",
" DATPEDLGARL | \n",
" 1.000000e-07 | \n",
"
\n",
" \n",
" | 1 | \n",
" 4i2x | \n",
" ['EVKLQQSGPELVKPGASVKISCKASGYSFTSYYIHWVKQRPGQG... | \n",
" signal-regulatory protein gamma | \n",
" EEELQMIQPEKLLLVTVGKTATLHCTVTSLLPVGPVLWFRGVGPGR... | \n",
" 1.200000e-06 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Antibody_ID Antibody \\\n",
"0 1hh6 ['QDQLQQSGAELVRPGASVKLSCKALGYIFTDYEIHWVKQTPVHG... \n",
"1 4i2x ['EVKLQQSGPELVKPGASVKISCKASGYSFTSYYIHWVKQRPGQG... \n",
"\n",
" Antigen_ID \\\n",
"0 pep-4 \n",
"1 signal-regulatory protein gamma \n",
"\n",
" Antigen Y \n",
"0 DATPEDLGARL 1.000000e-07 \n",
"1 EEELQMIQPEKLLLVTVGKTATLHCTVTSLLPVGPVLWFRGVGPGR... 1.200000e-06 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.multi_pred import AntibodyAff\n",
"data = AntibodyAff(name = 'Protein_SAbDab')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that in practice, as proteins are usually in 3D, an ideal data input is the 3D structure information. However, as obtaining 3D structure is itself expensive for new data points, we here include the accessible sequences information. We plan to add 3D dataset in the future release. \n",
"\n",
"In addition to binding affinity, an antibody has also to have good properties to be able to be developed. Immunogenicity, instability, self-association, high viscosity, polyspecificity, or poor expression can all preclude an antibody from becoming a therapeutic. This can be formulated as an antibody developability prediction problem. TDC includes two datasets for that. In the first one, a small dataset is provided by Therapeutic Antibody Profiler where they propose five metrics in measuring the developability of an antibody: CDR length, patches of surface hydrophobicity (PSH), patches of positive charge (PPC), patches of negative charge (PNC), structural Fv charge symmetry parameter (SFvCSP). For example, to retrieve the values of CDR Length, you can type: "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Found local copy...\n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Antibody_ID | \n",
" Antibody | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" Abagovomab | \n",
" ['QVKLQESGAELARPGASVKLSCKASGYTFTNYWMQWVKQRPGQG... | \n",
" 46 | \n",
"
\n",
" \n",
" | 1 | \n",
" Abituzumab | \n",
" ['QVQLQQSGGELAKPGASVKVSCKASGYTFSSFWMHWVRQAPGQG... | \n",
" 45 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Antibody_ID Antibody Y\n",
"0 Abagovomab ['QVKLQESGAELARPGASVKLSCKASGYTFTNYWMQWVKQRPGQG... 46\n",
"1 Abituzumab ['QVQLQQSGGELAKPGASVKVSCKASGYTFSSFWMHWVRQAPGQG... 45"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.single_pred import Develop\n",
"data = Develop(name = 'TAP', label_name = 'CDR Length')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"All the label names can also accessed via:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['CDR_Length', 'PSH', 'PPC', 'PNC', 'SFvCSP']"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.utils import retrieve_label_name_list\n",
"retrieve_label_name_list('TAP')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The label name also supports fuzzy search, so don't worry about typing few characters wrong! \n",
"\n",
"TDC also includes another large developability dataset from Chen et al., where they process from the SAbDab dataset. The binary developability label is generated via the BIOVIA's pipeline. It contains 2,409 antibodies: "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"100%|██████████| 601k/601k [00:00<00:00, 1.48MiB/s]\n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Antibody_ID | \n",
" Antibody | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 12e8 | \n",
" ['EVQLQQSGAEVVRSGASVKLSCTASGFNIKDYYIHWVKQRPEKG... | \n",
" 0 | \n",
"
\n",
" \n",
" | 1 | \n",
" 15c8 | \n",
" ['EVQLQQSGAELVKPGASVKLSCTASGFNIKDTYMHWVKQKPEQG... | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Antibody_ID Antibody Y\n",
"0 12e8 ['EVQLQQSGAEVVRSGASVKLSCTASGFNIKDYYIHWVKQRPEKG... 0\n",
"1 15c8 ['EVQLQQSGAELVKPGASVKLSCTASGFNIKDTYMHWVKQKPEQG... 0"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.single_pred import Develop\n",
"data = Develop(name = 'SAbDab_Chen')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Last but not least, TDC also includes two Peptide-MHC binding datasets. Similar to the mechanism of Monoclonal antibody therapy, major histocompatibility complex (MHC) can bind to peptides and display them at the cell surface where human immune system (T-cell) can recognize them and eliminate them. There are various categories of MHC (MHC I, II, III) due to various structural differences. Thus, it is important to predict MHC and peptide binding affinity. In TDC, we include two datasets. The first is from NetMHCpan for MHC class I binding. They collected it from IEDB and IMGT/HLA database. You can retrieve them via:"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"100%|██████████| 15.1M/15.1M [00:01<00:00, 11.2MiB/s]\n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Peptide_ID | \n",
" Peptide | \n",
" MHC_ID | \n",
" MHC | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 0 | \n",
" ARWLASTPL | \n",
" BoLA-D18.4 | \n",
" YYSEYREISENVYESNLYIAYSDYTWEYLNYRWY | \n",
" 0.589395 | \n",
"
\n",
" \n",
" | 1 | \n",
" 1 | \n",
" ASYAAAAAY | \n",
" BoLA-D18.4 | \n",
" YYSEYREISENVYESNLYIAYSDYTWEYLNYRWY | \n",
" 0.496594 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Peptide_ID Peptide MHC_ID MHC \\\n",
"0 0 ARWLASTPL BoLA-D18.4 YYSEYREISENVYESNLYIAYSDYTWEYLNYRWY \n",
"1 1 ASYAAAAAY BoLA-D18.4 YYSEYREISENVYESNLYIAYSDYTWEYLNYRWY \n",
"\n",
" Y \n",
"0 0.589395 \n",
"1 0.496594 "
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.multi_pred import PeptideMHC\n",
"data = PeptideMHC(name = 'MHC1_IEDB-IMGT_Nielsen')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The second dataset is from MHC class II, which originates from NetMHCIIpan collected also from IEDB database. To retrieve this dataset, type:"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Downloading...\n",
"100%|██████████| 11.8M/11.8M [00:01<00:00, 9.86MiB/s]\n",
"Loading...\n",
"Done!\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" Peptide_ID | \n",
" Peptide | \n",
" MHC_ID | \n",
" MHC | \n",
" Y | \n",
"
\n",
" \n",
" \n",
" \n",
" | 0 | \n",
" 0 | \n",
" PKYVKQNTLKLAT | \n",
" HLA-DPA10103-DPB10201 | \n",
" YAFFMFSGGAILNTLFGQFEYFDIEEVRMHLGMT | \n",
" 0.000000 | \n",
"
\n",
" \n",
" | 1 | \n",
" 1 | \n",
" DSDVGEFRAVTELG | \n",
" HLA-DPA10103-DPB10201 | \n",
" YAFFMFSGGAILNTLFGQFEYFDIEEVRMHLGMT | \n",
" 0.047212 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" Peptide_ID Peptide MHC_ID \\\n",
"0 0 PKYVKQNTLKLAT HLA-DPA10103-DPB10201 \n",
"1 1 DSDVGEFRAVTELG HLA-DPA10103-DPB10201 \n",
"\n",
" MHC Y \n",
"0 YAFFMFSGGAILNTLFGQFEYFDIEEVRMHLGMT 0.000000 \n",
"1 YAFFMFSGGAILNTLFGQFEYFDIEEVRMHLGMT 0.047212 "
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from tdc.multi_pred import PeptideMHC\n",
"data = PeptideMHC(name = 'MHC2_IEDB_Jensen')\n",
"data.get_data().head(2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"That's it for this tutorial! TDC is in the very initial stage, we only cover tip of an iceberg of all the biologics datasets. Thus, we are actively looking for contributions from domain scientists and ML researchers for new tasks and new datasets. Please [contact us](mailto:kexinhuang@hsph.harvard.edu) if you are interested in contributing!\n",
"\n",
"In the next set of tutorials, we are going to cover the following topics:\n",
"\n",
"* [TDC 104 ML Model Examples with DeepPurpose](https://github.com/mims-harvard/TDC/blob/master/tutorials/TDC_104_ML_Model_DeepPurpose.ipynb)\n",
"\n",
"* [TDC 105 Molecular Oracles](https://github.com/mims-harvard/TDC/blob/master/tutorials/TDC_105_Oracles.ipynb)\n",
"\n",
"See you there!"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:DeepPurpose]",
"language": "python",
"name": "conda-env-DeepPurpose-py"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}