Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkyu committed Dec 12, 2018
1 parent 66c088a commit 6d0a2a2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 40 deletions.
46 changes: 24 additions & 22 deletions examples/Load_example_datasets.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:13:33.867529Z",
"start_time": "2018-12-07T22:13:31.695579Z"
"end_time": "2018-12-12T05:29:58.013625Z",
"start_time": "2018-12-12T05:29:55.240592Z"
},
"collapsed": true
},
Expand All @@ -35,8 +35,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:13:34.393635Z",
"start_time": "2018-12-07T22:13:33.871676Z"
"end_time": "2018-12-12T05:29:58.583155Z",
"start_time": "2018-12-12T05:29:58.028215Z"
}
},
"outputs": [
Expand Down Expand Up @@ -168,8 +168,8 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:13:34.412176Z",
"start_time": "2018-12-07T22:13:34.406100Z"
"end_time": "2018-12-12T05:29:58.593682Z",
"start_time": "2018-12-12T05:29:58.586896Z"
}
},
"outputs": [
Expand Down Expand Up @@ -212,21 +212,22 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:26:29.148505Z",
"start_time": "2018-12-07T22:19:52.545655Z"
"end_time": "2018-12-12T05:36:19.723336Z",
"start_time": "2018-12-12T05:30:08.161164Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"NDEx download time (sec): 241.07130336761475\n",
"Read HTTP response as JSON simplejson time (sec): 357.84295129776\n",
"loop time (sec): 38.50523900985718\n"
"NDEx download and CX parse time (sec): 356.6890811920166\n",
"Dim: (19009, 19009)\n",
"Bytes: 2890736648\n",
"Iterate through CX and construct array time (sec): 14.676801204681396\n"
]
},
{
Expand Down Expand Up @@ -424,16 +425,17 @@
"[5 rows x 19009 columns]"
]
},
"execution_count": 9,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"## Download human gene-gene similarity network from NDEx\n",
"## -- WARNING: This network is very large (19,009-by-19,009 matrix).\n",
"## -- Downloading will take ~10 min for a fast internet connection.\n",
"## -- *** Requires about 7 Gb to download and process **\n",
"## -- *** Requires ~6 GB of RAM to download and process ***\n",
"## -- *** ~4 GB of data is downloaded from NDEx, which takes ~10 min for a fast internet connection ***\n",
"## -- This requires the simplejson package (see previous cell)\n",
"sim, sim_names = ddot.ndex_to_sim_matrix(\n",
" ndex_url=ddot.HUMAN_GENE_SIMILARITIES_URL,\n",
" input_fmt='cx_matrix',\n",
Expand All @@ -454,7 +456,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:14:40.737455Z",
Expand Down Expand Up @@ -489,7 +491,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:14:41.246109Z",
Expand Down Expand Up @@ -522,7 +524,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:14:41.280898Z",
Expand Down Expand Up @@ -652,7 +654,7 @@
"hydronephrosis http://hiview.ucsd.edu/1b21bc44-f775-11e8-aaa6... "
]
},
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -666,7 +668,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:14:41.288988Z",
Expand All @@ -690,9 +692,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:ddot_py36]",
"display_name": "Python [default]",
"language": "python",
"name": "conda-env-ddot_py36-py"
"name": "python2"
},
"language_info": {
"codemirror_mode": {
Expand Down
39 changes: 21 additions & 18 deletions examples/Make_disease_gene_ontologies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:13:48.133355Z",
"start_time": "2018-12-07T22:13:46.824805Z"
"end_time": "2018-12-12T05:52:04.023604Z",
"start_time": "2018-12-12T05:52:01.870305Z"
},
"collapsed": true,
"nbpresent": {
Expand Down Expand Up @@ -70,8 +70,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:13:48.141114Z",
"start_time": "2018-12-07T22:13:48.137290Z"
"end_time": "2018-12-12T05:52:07.274382Z",
"start_time": "2018-12-12T05:52:07.269637Z"
},
"collapsed": true
},
Expand Down Expand Up @@ -108,18 +108,19 @@
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-07T22:24:58.262702Z",
"start_time": "2018-12-07T22:13:50.317288Z"
"end_time": "2018-12-12T05:59:20.520657Z",
"start_time": "2018-12-12T05:52:09.690133Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"NDEx download time (sec): 457.28141617774963\n",
"Read HTTP response as JSON simplejson time (sec): 563.9876594543457\n",
"loop time (sec): 27.282840967178345\n"
"NDEx download and CX parse time (sec): 356.2376916408539\n",
"Dim: (19009, 19009)\n",
"Bytes: 2890736648\n",
"Iterate through CX and construct array time (sec): 14.60573434829712\n"
]
},
{
Expand Down Expand Up @@ -323,12 +324,15 @@
}
],
"source": [
"## Read gene similarity network\n",
"## Download human gene-gene similarity network from NDEx\n",
"## -- WARNING: This network is very large (19,009-by-19,009 matrix).\n",
"## -- *** Requires ~6 GB of RAM to download and process ***\n",
"## -- *** ~4 GB of data is downloaded from NDEx, which takes ~10 min for a fast internet connection ***\n",
"## -- This requires the simplejson package (see previous cell)\n",
"sim, sim_names = ddot.ndex_to_sim_matrix(\n",
" ndex_url=ddot.HUMAN_GENE_SIMILARITIES_URL,\n",
" input_fmt='cx_matrix',\n",
" output_fmt='matrix',\n",
" subset=None)\n",
" output_fmt='matrix')\n",
"sim = pd.DataFrame(sim, columns=sim_names, index=sim_names)\n",
"\n",
"## Rank transform the similarities\n",
Expand Down Expand Up @@ -391,7 +395,6 @@
"# # Retrieve a table of gene-disease associations from the Monarch Initiative (reformatted and stored on NDEx)\n",
"# monarch, _ = ddot.ndex_to_sim_matrix(\n",
"# ddot.config.MONARCH_DISEASE_GENE_SLIM_URL,\n",
"# similarity=None,\n",
"# input_fmt='cx',\n",
"# output_fmt='sparse')\n",
"# print(monarch.head())\n",
Expand Down Expand Up @@ -1801,21 +1804,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:ddot_py36]",
"display_name": "Python [default]",
"language": "python",
"name": "conda-env-ddot_py36-py"
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.5"
"pygments_lexer": "ipython2",
"version": "2.7.13"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down

0 comments on commit 6d0a2a2

Please sign in to comment.