-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
2,458 additions
and
61 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
"To use the Graphein submodule graphein.protein.visualisation, you need to install: pytorch3d \n", | ||
"To do so, use the following command: conda install -c pytorch3d pytorch3d\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #7fbfbf; text-decoration-color: #7fbfbf\">[08/02/22 12:11:29] </span><span style=\"color: #800000; text-decoration-color: #800000\">WARNING </span> To use the Graphein submodule <a href=\"file:///home/cam/mambaforge/lib/python3.9/site-packages/graphein/protein/meshes.py\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">meshes.py</span></a><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">:</span><a href=\"file:///home/cam/mambaforge/lib/python3.9/site-packages/graphein/protein/meshes.py#29\"><span style=\"color: #7f7f7f; text-decoration-color: #7f7f7f\">29</span></a>\n", | ||
" graphein.protein.meshes, you need to install: \n", | ||
" pytorch3d \n", | ||
" To do so, use the following command: conda install \n", | ||
" -c pytorch3d pytorch3d \n", | ||
"</pre>\n" | ||
], | ||
"text/plain": [ | ||
"\u001b[2;36m[08/02/22 12:11:29]\u001b[0m\u001b[2;36m \u001b[0m\u001b[31mWARNING \u001b[0m To use the Graphein submodule \u001b]8;id=645620;file:///home/cam/mambaforge/lib/python3.9/site-packages/graphein/protein/meshes.py\u001b\\\u001b[2mmeshes.py\u001b[0m\u001b]8;;\u001b\\\u001b[2m:\u001b[0m\u001b]8;id=336006;file:///home/cam/mambaforge/lib/python3.9/site-packages/graphein/protein/meshes.py#29\u001b\\\u001b[2m29\u001b[0m\u001b]8;;\u001b\\\n", | ||
" graphein.protein.meshes, you need to install: \n", | ||
" pytorch3d \n", | ||
" To do so, use the following command: conda install \n", | ||
" -c pytorch3d pytorch3d \n" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"from graphein.protein.config import ProteinGraphConfig\n", | ||
"\n", | ||
"config = ProteinGraphConfig()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "9889db684b504c10b7e76c5a34eab4e3", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [ | ||
"Output()" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
}, | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"></pre>\n" | ||
], | ||
"text/plain": [] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
}, | ||
{ | ||
"data": { | ||
"text/html": [ | ||
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">\n", | ||
"</pre>\n" | ||
], | ||
"text/plain": [ | ||
"\n" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"from graphein.protein.graphs import construct_graph\n", | ||
"\n", | ||
"g = construct_graph(config=config, pdb_code=\"3eiy\")" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 6, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"ename": "KeyError", | ||
"evalue": "'rsa'", | ||
"output_type": "error", | ||
"traceback": [ | ||
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", | ||
"\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", | ||
"\u001b[1;32m/mnt/home2nd/pomegranate/pomegranate/interactive.ipynb Cell 3\u001b[0m in \u001b[0;36m<cell line: 9>\u001b[0;34m()\u001b[0m\n\u001b[1;32m <a href='vscode-notebook-cell:/mnt/home2nd/pomegranate/pomegranate/interactive.ipynb#ch0000002?line=7'>8</a>\u001b[0m avg_rsa \u001b[39m=\u001b[39m \u001b[39m0\u001b[39m\n\u001b[1;32m <a href='vscode-notebook-cell:/mnt/home2nd/pomegranate/pomegranate/interactive.ipynb#ch0000002?line=8'>9</a>\u001b[0m \u001b[39mfor\u001b[39;00m k, n \u001b[39min\u001b[39;00m g\u001b[39m.\u001b[39mnodes(data\u001b[39m=\u001b[39m\u001b[39mTrue\u001b[39;00m):\n\u001b[0;32m---> <a href='vscode-notebook-cell:/mnt/home2nd/pomegranate/pomegranate/interactive.ipynb#ch0000002?line=10'>11</a>\u001b[0m \u001b[39mprint\u001b[39m(n[\u001b[39m'\u001b[39;49m\u001b[39mrsa\u001b[39;49m\u001b[39m'\u001b[39;49m])\n", | ||
"\u001b[0;31mKeyError\u001b[0m: 'rsa'" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"from graphein.protein.subgraphs import extract_subgraph_from_point\n", | ||
"#from protein.phosphosite import get_protein_subgraph_radius\n", | ||
"\n", | ||
"site = list(g.nodes())[10]\n", | ||
"\n", | ||
"#g = get_protein_subgraph_radius(g=g, site=site, r=r)\n", | ||
"\n", | ||
"avg_rsa = 0\n", | ||
"for k, n in g.nodes(data=True):\n", | ||
" \n", | ||
" print(n['meiler'])\n" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3.9.7 ('base')", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"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.9.13" | ||
}, | ||
"orig_nbformat": 4, | ||
"vscode": { | ||
"interpreter": { | ||
"hash": "dba50d74266ba8c3f81eac460edffb71d253875af3f2e47df42dacc524c6cffc" | ||
} | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.