Skip to content

Commit

Permalink
Merge pull request #238 from volkamerlab/livecoms-review
Browse files Browse the repository at this point in the history
Base branch for T23-28 revisions
  • Loading branch information
dominiquesydow authored Jun 6, 2022
2 parents e2e7ae7 + c379f90 commit d436f5f
Show file tree
Hide file tree
Showing 17 changed files with 1,480 additions and 653 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ It will help measure the impact of the TeachOpenCADD platform and future funding
- Web services clients:
[`pypdb`](https://github.com/williamgilpin/pypdb),
[`chembl_webresource_client`](https://github.com/chembl/chembl_webresource_client),
[`requests`](https://docs.python-requests.org/en/master/),
[`requests`](https://requests.readthedocs.io/en/latest/),
[`bravado`](https://bravado.readthedocs.io/en/stable/),
[`beautifulsoup4`](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)
- Utilities:
Expand Down
1 change: 1 addition & 0 deletions devtools/test_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
- pdbfixer
- tqdm
- lxml
- kissim
## CI tests
# Workaround for https://github.com/computationalmodelling/nbval/issues/153
- pytest 5.*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
kinase,kinase_klifs,uniprot_id,group
RET,RET,P07949,TK
BRAF,BRAF,P15056,TKL
SRC,SRC,P12931,TK
S6K,p70S6K,P23443,AGC
MKNK1,MNK1,Q9BUB5,CAMK
TTK,TTK,P33981,Other
PDK,PDK1,O15530,AGC
PAK3,PAK3,O75914,STE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
variable,default_value,description
DEMO,1,"Run the notebooks exactly as displayed online (default: 1) or set to 0 and run your own kinase set (as defined in `kinase_selection.csv`)"
N_STRUCTURES_PER_KINASE,-1,"Run structure-based notebooks on all structures per kinase (default: -1) or a subset of structures (replace -1 with e.g. 3)"
N_CORES,1,"Run T025 on one (default: 1) or more cores"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
147 changes: 120 additions & 27 deletions teachopencadd/talktorials/T023_what_is_a_kinase/talktorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The KLIFS database ([<i>Nucleic Acid Res.</i> (2020), <b>49(D1)</b>, D562-D569](https://doi.org/10.1093/nar/gkaa895), [<i>J. Med. Chem.</i> (2014), <b>57(2)</b>, 249-277](https://doi.org/10.1021/jm400378w)) fetches all kinase structures deposited in the structural database PDB ([<i>Acta Cryst.</i> (2002), <b>D58</b>, 899-907](https://doi.org/10.1107/S0907444902003451), [<i>Structure</i> (2012), <b>20(3)</b>, 391-396](https://doi.org/10.1016/j.str.2012.01.010)) and processes them as follows: All multi-chain structures in the PDB are split into monomers and aligned to each other with a special focus on a pre-defined binding site of $85$ residues (Figure 1). For example, this means that the conserved gatekeeper (GK) residue at KLIFS position $45$ can be easily queried for any of the over $10,000$ monomeric kinase structures in KLIFS. \n",
"The KLIFS database ([<i>Nucleic Acid Res.</i> (2020), <b>49(D1)</b>, D562-D569](https://doi.org/10.1093/nar/gkaa895), [<i>J. Med. Chem.</i> (2014), <b>57(2)</b>, 249-277](https://doi.org/10.1021/jm400378w)) fetches all kinase structures deposited in the structural database PDB ([<i>Acta Cryst.</i> (2002), <b>D58</b>, 899-907](https://doi.org/10.1107/S0907444902003451), [<i>Structure</i> (2012), <b>20(3)</b>, 391-396](https://doi.org/10.1016/j.str.2012.01.010)) and processes them as follows: All multi-chain structures in the PDB are split into monomers and aligned to each other with a special focus on a pre-defined binding site of $85$ residues (Figure 3). For example, this means that the conserved gatekeeper (GK) residue at KLIFS position $45$ can be easily queried for any of the over $10,000$ monomeric kinase structures in KLIFS. \n",
"\n",
"![KLIFS binding site](https://klifs.net/images/faq/colors.png)\n",
"\n",
"*Figure 1:* \n",
"*Figure 3:* \n",
"Kinase binding site residues as defined by KLIFS.\n",
"Figure and description taken from: [<i>J. Med. Chem.</i> (2014), <b>57(2)</b>, 249-277](https://doi.org/10.1021/jm400378w)."
]
Expand Down Expand Up @@ -202,16 +202,16 @@
"#### Bioactivity data\n",
"\n",
"[ChEMBL](https://www.ebi.ac.uk/chembl/) is a well-known bioactivity database, which releases updated versions every now and then.\n",
"In September 2021, there are over two million compounds and $14,000$ targets that are stored. In ChEMBL29, there are over $160,000$ measurements on kinases (see Figure 3).\n",
"In September 2021, there are over two million compounds and $14,000$ targets that are stored. In ChEMBL29, there are over $160,000$ measurements on kinases (see Figure 4).\n",
"\n",
"- `kinodata` GitHub repository: https://github.com/openkinome/kinodata\n",
"- `kinodata` ChEMBL29 release: https://github.com/openkinome/kinodata/releases/tag/v0.3 (`activities-chembl29_v0.3.zip`)\n",
"\n",
"As with other data types, the coverage of bioactivity data is highly unbalanced among the human kinases, depending on how much research is spent on certain kinases (Figure 3).\n",
"As with other data types, the coverage of bioactivity data is highly unbalanced among the human kinases, depending on how much research is spent on certain kinases.\n",
"\n",
"![Manning tree with number of ChEMBL activities per kinase (KinMap)](images/kinmap_n_activities_per_kinase.png)\n",
"\n",
"*Figure 3:* \n",
"*Figure 4:* \n",
"Number of ChEMBL29 bioactivities per kinase mapped onto the Manning kinome tree using KinMap. Check the appendix on how to generate this KinMap tree.\n",
"<!---\n",
"We are using KLIFS kinase names; some are not recognized by KinMap and were simply dropped!\n",
Expand Down Expand Up @@ -247,11 +247,11 @@
"\n",
"As described before, kinases are highly conserved, especially in their binding site. This high similarity is a challenge in drug design because ligands may form similar binding modes not only with their designated target (on-target) but also with other targets (off-targets). Such promiscuous binding can cause mild to severe side effects.\n",
"\n",
"Predicting these side effects is non-trivial since some off-targets are not obvious. For example, the EGFR inhibitor Erlotinib shows affinities to other kinases in the highly sequentially-similar TK kinase group. However, it also strongly affects the off-targets GAK, LOK, and SLK, which are in more remote kinase groups (Figure 4). \n",
"Predicting these side effects is non-trivial since some off-targets are not obvious. For example, the EGFR inhibitor Erlotinib shows affinities to other kinases in the highly sequentially-similar TK kinase group. However, it also strongly affects the off-targets GAK, LOK, and SLK, which are in more remote kinase groups (Figure 5). \n",
"\n",
"![Erlotinib profiling data from Karaman dataset (KinMap)](images/kinmap_erlotinib_karaman.png)\n",
"\n",
"*Figure 4:* \n",
"*Figure 5:* \n",
"Profiling data for EGFR inhibitor Erlobinib from the Karaman _et al._ dataset ([<i>Nature Biotechnology</i> (2008), <b>26</b>, 127-132](https://doi.org/10.1038/nbt1358)) mapped onto the Manning kinome tree using [KinMap](http://www.kinhub.org/kinmap/). Check the appendix of this notebook on how to generate this figure."
]
},
Expand Down Expand Up @@ -326,7 +326,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"We have collected information about these nine kinases in the CSV file `kinase_selection.csv`:\n",
"We have collected information about these nine kinases in the CSV file `T023_what_is_a_kinase/data/kinase_selection.csv`:\n",
"\n",
"- `kinase`: Kinase name as used in [<i>Molecules</i> (2021), <b>26(3)</b>, 629](https://www.mdpi.com/1420-3049/26/3/629)\n",
"- `kinase_klifs`: Kinase name as used in the KLIFS database\n",
Expand All @@ -335,13 +335,6 @@
"- `full_kinase_name`: Full kinase name as used in [<i>Molecules</i> (2021), <b>26(3)</b>, 629](https://www.mdpi.com/1420-3049/26/3/629)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"_Note_: You can run the kinase similarity __Talktorials T024-T028__ with your own set of kinases. To do so, please update the CSV file with your kinases; the only mandatory columns are `kinase_klifs` and `uniprot_id`."
]
},
{
"cell_type": "code",
"execution_count": 3,
Expand Down Expand Up @@ -494,6 +487,98 @@
"We will load this dataset in all downstream talktorials to assess kinase similarity from different perspectives."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"_Note_: You can run the kinase similarity __Talktorials T024-T028__ with your own set of kinases. To do so, please update the following files:\n",
"\n",
"- Update the `T023_what_is_a_kinase/data/kinase_selection.csv` file with your kinases; the only mandatory columns are `kinase_klifs` and `uniprot_id`.\n",
"- Update the `T023_what_is_a_kinase/data/pipeline_configs.csv` file with your configurations:\n",
" - Set \"DEMO\" to 0.\n",
" - Choose the number of structures per kinases to be used in T025 (KiSSim) and T026 (IFP). If \"N_STRUCTURES_PER_KINASE\" is set to -1, all structures are used; if set to a number (X), the best X structures are being used for the encoding and comparison (w.r.t. resolution and KLIFS quality score). The latter makes sense for a test run of your data (running the T025 on all structures is time-consuming).\n",
" - If you run the notebooks on all structures (see \"N_STRUCTURES_PER_KINASE\"), we recommend to increase the number of cores to be used in T025 (KiSSim) by redefining \"N_CORES\".\n",
" \n",
"Let's take a look at the currently set configurations:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>variable</th>\n",
" <th>default_value</th>\n",
" <th>description</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>DEMO</td>\n",
" <td>1</td>\n",
" <td>Run the notebooks exactly as displayed online (default: 1) or set to 0 and run your own kinase set (as defined in `kinase_selection.csv`)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>N_STRUCTURES_PER_KINASE</td>\n",
" <td>-1</td>\n",
" <td>Run structure-based notebooks on all structures per kinase (default: -1) or a subset of structures (replace -1 with e.g. 3)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>N_CORES</td>\n",
" <td>1</td>\n",
" <td>Run T025 on one (default: 1) or more cores</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" variable default_value \\\n",
"0 DEMO 1 \n",
"1 N_STRUCTURES_PER_KINASE -1 \n",
"2 N_CORES 1 \n",
"\n",
" description \n",
"0 Run the notebooks exactly as displayed online (default: 1) or set to 0 and run your own kinase set (as defined in `kinase_selection.csv`) \n",
"1 Run structure-based notebooks on all structures per kinase (default: -1) or a subset of structures (replace -1 with e.g. 3) \n",
"2 Run T025 on one (default: 1) or more cores "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.options.display.max_colwidth = None\n",
"configs = pd.read_csv(DATA / \"pipeline_configs.csv\")\n",
"configs"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -510,12 +595,16 @@
"There are some KinMap trees shown in this notebook. The code below generates the KinMap CSV files to be uploaded to KinMap:\n",
"http://www.kinhub.org/kinmap.\n",
"\n",
"_Note_: PNG downloads do not seem to work anymore, thus download as SVG and convert to PNG in your terminal (Linux) via `convert -density 25 my_kinmap_figure.svg my_kinmap_figure.png` (SVG cannot be included in Jupyter notebooks out-of-the-box)."
"_Note_:\n",
"1. PNG downloads do not seem to work anymore, thus download as SVG and convert to PNG in your terminal (Linux) via `convert -density 25 my_kinmap_figure.svg my_kinmap_figure.png` (SVG cannot be included in Jupyter notebooks out-of-the-box).\n",
"2. If SVG download doesn't render the figure properly, open your favorite text editor and copy paste this into the SVG file: `xmlns:xlink=\"http://www.w3.org/1999/xlink\"`, resulting in something similar to this in the first few lines:\n",
"\n",
"`<svg id=\"svgCopy\" viewBox=\"0 0 1591 1959\" preserveAspectRatio=\"xMinYMin meet\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"\"><desc>Created with Snap</desc><defs></defs><g`\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -561,7 +650,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -596,7 +685,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand All @@ -605,7 +694,7 @@
"('CDK2', 426)"
]
},
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -634,7 +723,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -678,7 +767,11 @@
"- Select \"Data type\": Karaman et al., 2018\n",
"- Select \"Karaman et al., 2018\": Erlotinib\n",
"- Click \"Add source\"\n",
"- Click \"Apply\""
"- In **settings**, select \"RoyalBlue\" in **Fill**\n",
"- Click \"Apply\"\n",
"- Click on the speech bubble on the top right of the kinome tree to disable annotations.\n",
"\n",
"_Note_: the name of the on/off-targets (EGFR, GAK, LOK, SLK) have been added manually."
]
},
{
Expand All @@ -692,15 +785,15 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "8951db9308d84e54adceabdb750d2439",
"model_id": "27a4173bf7504c9a9f529823f56ec466",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -739,7 +832,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -748,7 +841,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {
"tags": [
"nbsphinx-thumbnail"
Expand All @@ -762,7 +855,7 @@
"<IPython.core.display.Image object>"
]
},
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Two similarity measures are implemented:

1. Sequence identity, i.e., the similarity which is based on character-wise discrepancy.
2. Sequence similarity, i.e., the similarity which is based on a substitution matrix, thus, reflecting similarities between amino acids.

_Note_: We focus on similarities between orthosteric kinase binding sites; similarities to allosteric binding sites are not covered.


### Contents in *Theory*
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d436f5f

Please sign in to comment.