Skip to content

Commit

Permalink
last changes for CR version WWW2019
Browse files Browse the repository at this point in the history
  • Loading branch information
lisette-espin committed Mar 14, 2019
1 parent 6ceee72 commit 80e3a89
Show file tree
Hide file tree
Showing 9 changed files with 3,231 additions and 5,475 deletions.
1,824 changes: 146 additions & 1,678 deletions 2. BioPortal (valid).ipynb

Large diffs are not rendered by default.

2,947 changes: 1,156 additions & 1,791 deletions 3. BioPortal (khop-matrices-lcc).ipynb

Large diffs are not rendered by default.

80 changes: 71 additions & 9 deletions 4. BioPortal (distance-matrices-lcc).ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -52,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -104,7 +104,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -156,11 +156,65 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"metadata": {
"scrolled": false
"scrolled": true
},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"loading submissions...\n",
"2019-02-15 19:47:43\t/bigdata/lespin/datasets/bioportal/submissions.json loaded!\n",
"2019-02-15 19:47:43\t- 642 ontologies\n",
"2019-02-15 19:47:43\t- 13 years\n",
"loading ontologies...\n",
"generating distance matrices for 12 ontologies...\n",
"LCC_LOINC_2015_9HOP.npz\n",
"LCC_LOINC_2015_1HOP.npz\n",
"LCC_LOINC_2015_4HOP.npz\n",
"LCC_LOINC_2015_5HOP.npz\n",
"LCC_LOINC_2015_2HOP.npz\n",
"LCC_LOINC_2015_7HOP.npz\n",
"LCC_LOINC_2015_3HOP.npz\n",
"LCC_LOINC_2015_8HOP.npz\n",
"LCC_LOINC_2015_12HOP.npz\n",
"LCC_LOINC_2015_10HOP.npz\n",
"LCC_LOINC_2015_11HOP.npz\n",
"LCC_LOINC_2015_6HOP.npz\n",
"LCC_LOINC_2015_13HOP.npz\n",
"file:LCC_LOINC_2015_9HOP.npz, k:9\n",
"2019-02-15 19:47:44\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_9HOP.npz loaded!\n",
"file:LCC_LOINC_2015_1HOP.npz, k:1\n",
"2019-02-15 19:47:45\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_1HOP.npz loaded!\n",
"file:LCC_LOINC_2015_4HOP.npz, k:4\n",
"2019-02-15 19:49:46\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_4HOP.npz loaded!\n",
"file:LCC_LOINC_2015_5HOP.npz, k:5\n",
"2019-02-15 19:51:53\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_5HOP.npz loaded!\n",
"file:LCC_LOINC_2015_2HOP.npz, k:2\n",
"2019-02-15 19:53:42\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_2HOP.npz loaded!\n",
"file:LCC_LOINC_2015_7HOP.npz, k:7\n",
"2019-02-15 19:56:32\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_7HOP.npz loaded!\n",
"file:LCC_LOINC_2015_3HOP.npz, k:3\n",
"2019-02-15 19:59:38\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_3HOP.npz loaded!\n",
"file:LCC_LOINC_2015_8HOP.npz, k:8\n",
"2019-02-15 20:03:05\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_8HOP.npz loaded!\n",
"file:LCC_LOINC_2015_12HOP.npz, k:12\n",
"2019-02-15 20:06:05\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_12HOP.npz loaded!\n",
"file:LCC_LOINC_2015_10HOP.npz, k:10\n",
"2019-02-15 20:09:03\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_10HOP.npz loaded!\n",
"file:LCC_LOINC_2015_11HOP.npz, k:11\n",
"2019-02-15 20:11:42\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_11HOP.npz loaded!\n",
"file:LCC_LOINC_2015_6HOP.npz, k:6\n",
"2019-02-15 20:17:42\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_6HOP.npz loaded!\n",
"file:LCC_LOINC_2015_13HOP.npz, k:13\n",
"2019-02-15 20:26:11\t/bigdata/lespin/bioportal/ontologies/hops/LCC_LOINC_2015_13HOP.npz loaded!\n",
"2019-02-15 22:56:05\t/bigdata/lespin/bioportal/ontologies/distances/LCC_LOINC_2015_HOPs.npz saved!\n",
"max khop (max-diameter): 13\n"
]
}
],
"source": [
"print('loading submissions...')\n",
"submissions_dict = get_submissions(SUBMISSIONS_FN)\n",
Expand All @@ -175,15 +229,23 @@
"for index,row in tmp.sort_values(\"E'\", ascending=True).iterrows():\n",
" onto_name = row['ontology']\n",
" \n",
" if onto_name in ['LOINC','SNOMEDCT']:\n",
" if onto_name not in ['LOINC']:\n",
" continue\n",
"\n",
" submission = submissions_dict[onto_name][YEAR]\n",
" onto = Ontology(name=onto_name, year=YEAR, submission_id=submission['submissionId'], root_folder=ONTOLOGY_ROOT)\n",
" m = onto.create_distance_matrix(path=ONTOLOGY_DISTANCE_OUTPUT, hopspath=ONTOLOGY_HOPS_OUTPUT, lcc=True)\n",
" print(\"max khop (max-diameter): {}\".format(m.max())) \n",
" del(m)\n",
" break\n"
" del(m)\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"del(onto)"
]
},
{
Expand Down
Loading

0 comments on commit 80e3a89

Please sign in to comment.