Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dhimmel/disease-ontology
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0
Choose a base ref
...
head repository: dhimmel/disease-ontology
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: gh-pages
Choose a head ref
  • 5 commits
  • 5 files changed
  • 1 contributor

Commits on Feb 4, 2016

  1. Add Zenodo DOI Badge

    dhimmel committed Feb 4, 2016
    Copy the full SHA
    5cb93c3 View commit details

Commits on Mar 23, 2016

  1. Copy the full SHA
    94e3eb0 View commit details
  2. Copy the full SHA
    bb2b282 View commit details
  3. Copy the full SHA
    75050ea View commit details

Commits on Sep 9, 2016

  1. Copy the full SHA
    052ffcc View commit details
Showing with 6,732 additions and 133 deletions.
  1. +65 −24 DO-xrefs.ipynb
  2. +3 −0 README.md
  3. +6,575 −0 data/description.tsv
  4. +57 −57 data/slim-terms.tsv
  5. +32 −52 slim.ipynb
89 changes: 65 additions & 24 deletions DO-xrefs.ipynb
Original file line number Diff line number Diff line change
@@ -10,21 +10,14 @@
"source": [
"import os\n",
"import csv\n",
"import re\n",
"\n",
"import networkx\n",
"import pandas\n",
"\n",
"import do_tools"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 2,
@@ -47,16 +40,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {
"collapsed": false
},
@@ -69,12 +53,68 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": []
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>disease_id</th>\n",
" <th>name</th>\n",
" <th>description</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>1509</th>\n",
" <td>DOID:0001816</td>\n",
" <td>angiosarcoma</td>\n",
" <td>A malignant vascular tumor that results_in rap...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3043</th>\n",
" <td>DOID:0002116</td>\n",
" <td>pterygium</td>\n",
" <td></td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" disease_id name \\\n",
"1509 DOID:0001816 angiosarcoma \n",
"3043 DOID:0002116 pterygium \n",
"\n",
" description \n",
"1509 A malignant vascular tumor that results_in rap... \n",
"3043 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Create a table of descriptions\n",
"pattern = re.compile(r'^\"(.*?)\"')\n",
"rows = list()\n",
"for term in dox:\n",
" match = pattern.search(term.definition)\n",
" description = match.group(1) if match else ''\n",
" rows.append((term.id, term.name, description))\n",
"description_df = pandas.DataFrame(rows, columns = ['disease_id', 'name', 'description']).sort_values('disease_id')\n",
"description_df.to_csv('data/description.tsv', sep='\\t', index=False)\n",
"description_df.head(2)"
]
},
{
"cell_type": "code",
@@ -210,8 +250,9 @@
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python [default]",
"language": "python",
"name": "python3"
},
@@ -225,7 +266,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.4.0"
"version": "3.5.2"
}
},
"nbformat": 4,
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# User-friendly extensions to the Disease Ontology

[![DOI 10.5281/zenodo.45584](https://zenodo.org/badge/doi/10.5281/zenodo.45584.svg)](https://doi.org/10.5281/zenodo.45584)


This repository creates user-friendly extensions to the [Disease Ontology](http://disease-ontology.org "Disease Ontology Homepage") (DO) [[1](https://doi.org/10.1093/nar/gkr972 "Disease Ontology: a backbone for disease semantic integration")]. Simple TSV files are extracted from the OBO-formatted ontology including datasets for term names, cross-references, and subsumption relationships. Additionally, a slim term set is extracted, which we use for our [drug repurposing research](https://doi.org/10.15363/thinklab.4, "Thinklab · Repurposing drugs on a hetnet").

## Notebooks
Loading