Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kinase similarity demo mode #239

Merged
merged 17 commits into from
Jun 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- "master"
- "maintenance/.+"
- "livecoms-review"
pull_request:
branches:
- "master"
- "maintenance/.+"
- "livecoms-review"
schedule:
# Run a cron job once weekly on Monday
- cron: "0 3 * * 1"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
branches:
- "master"
- "maintenance/.+"
- "livecoms-review"
pull_request:
branches:
- "master"
- "maintenance/.+"
- "livecoms-review"
schedule:
# Run a cron job once weekly on Monday
- cron: "0 3 * * 1"
Expand Down
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"
121 changes: 103 additions & 18 deletions teachopencadd/talktorials/T023_what_is_a_kinase/talktorial.ipynb
Original file line number Diff line number Diff line change
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 @@ -519,7 +604,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -565,7 +650,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -600,7 +685,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand All @@ -609,7 +694,7 @@
"('CDK2', 426)"
]
},
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -638,7 +723,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -700,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 @@ -747,7 +832,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -756,7 +841,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {
"tags": [
"nbsphinx-thumbnail"
Expand All @@ -770,7 +855,7 @@
"<IPython.core.display.Image object>"
]
},
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand Down