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

Add hetionet duplication and value added notebooks #102

Merged
merged 16 commits into from
Nov 4, 2022
Prev Previous commit
Next Next commit
Lint
cthoyt committed Oct 31, 2022
commit ec888325c4e8dff671f7b362683fc304f7999a6b
37 changes: 21 additions & 16 deletions notebooks/curation-benefit.ipynb
Original file line number Diff line number Diff line change
@@ -15,30 +15,35 @@
"metadata": {},
"outputs": [],
"source": [
"import pystow\n",
"import json\n",
"import sys\n",
"import time\n",
"from collections import Counter, defaultdict\n",
"from dataclasses import dataclass\n",
"from functools import lru_cache\n",
"from textwrap import dedent\n",
"\n",
"import bioontologies\n",
"import bioregistry\n",
"from tqdm.auto import tqdm\n",
"import matplotlib.pyplot as plt\n",
"import bioversions\n",
"from matplotlib_venn import venn2\n",
"from dataclasses import dataclass\n",
"import json\n",
"from textwrap import dedent\n",
"from functools import lru_cache\n",
"import biomappings\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
"import pyobo\n",
"from tabulate import tabulate\n",
"import pystow\n",
"from IPython.display import HTML\n",
"import time\n",
"import pandas as pd\n",
"import sys\n",
"from collections import defaultdict, Counter\n",
"from matplotlib_venn import venn2\n",
"from tabulate import tabulate\n",
"from tqdm.auto import tqdm\n",
"\n",
"import biomappings\n",
"from biomappings.paper_analysis import (\n",
" Result, get_graph, get_primary_mappings, index_mappings, EVALUATION, \n",
" get_obo_mappings,\n",
" EVALUATION,\n",
" Result,\n",
" get_graph,\n",
" get_non_obo_mappings,\n",
" get_obo_mappings,\n",
" get_primary_mappings,\n",
" index_mappings,\n",
")"
]
},
16 changes: 9 additions & 7 deletions notebooks/hetionet-pathway-duplication.ipynb
Original file line number Diff line number Diff line change
@@ -15,18 +15,20 @@
"metadata": {},
"outputs": [],
"source": [
"import itertools as itt\n",
"import json\n",
"import sys\n",
"import time\n",
"import pandas as pd\n",
"from collections import Counter, defaultdict\n",
"\n",
"import bioregistry\n",
"import itertools as itt\n",
"import json\n",
"import networkx as nx\n",
"import pandas as pd\n",
"import pystow\n",
"from tqdm.auto import tqdm\n",
"from collections import Counter, defaultdict\n",
"from pyobo.gilda_utils import get_grounder\n",
"from biomappings.graph import get_true_graph\n",
"import networkx as nx"
"from tqdm.auto import tqdm\n",
"\n",
"from biomappings.graph import get_true_graph"
]
},
{
25 changes: 13 additions & 12 deletions src/biomappings/paper_analysis.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
"""Code for the paper analysis."""

import bioontologies
import json
import matplotlib.pyplot as plt
import pandas as pd
import pickle
import sys
import time
from IPython.display import HTML
from bioontologies.obograph import _parse_uri_or_curie_or_str
from collections import Counter, defaultdict, defaultdict
from dataclasses import dataclass, dataclass
from functools import lru_cache, lru_cache
from matplotlib_venn import venn2
from collections import Counter, defaultdict
from dataclasses import dataclass
from functools import lru_cache
from pathlib import Path
from tabulate import tabulate, tabulate
from textwrap import dedent
from tqdm.auto import tqdm, tqdm

import biomappings
import bioontologies
import bioregistry
import bioversions
import matplotlib.pyplot as plt
import pandas as pd
import pyobo
import pystow
from bioontologies.obograph import _parse_uri_or_curie_or_str
from bioregistry import manager
from IPython.display import HTML
from matplotlib_venn import venn2
from tabulate import tabulate
from tqdm.auto import tqdm

import biomappings

__all__ = [
"Result",
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -68,10 +68,12 @@ description = Run the pyroma tool to check the package friendliness of the proje
deps =
black[jupyter]
isort
nbqa
skip_install = true
commands =
black src/ scripts/ tests/ notebooks/
isort src/ scripts/ tests/ notebooks/
nbqa isort notebooks/
description = Run linters

[testenv:flake8]