pyobo 0.10.11__py3-none-any.whl → 0.10.12__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyobo/api/names.py +27 -6
- pyobo/api/utils.py +5 -0
- pyobo/cli/lookup.py +2 -2
- pyobo/constants.py +31 -1
- pyobo/gilda_utils.py +21 -0
- pyobo/identifier_utils.py +22 -5
- pyobo/reader.py +1 -1
- pyobo/sources/__init__.py +2 -0
- pyobo/sources/antibodyregistry.py +2 -2
- pyobo/sources/biogrid.py +3 -3
- pyobo/sources/credit.py +68 -0
- pyobo/sources/geonames.py +27 -9
- pyobo/sources/hgnc.py +2 -2
- pyobo/sources/mesh.py +3 -3
- pyobo/sources/msigdb.py +1 -1
- pyobo/sources/npass.py +1 -1
- pyobo/sources/pubchem.py +3 -3
- pyobo/sources/rgd.py +1 -1
- pyobo/sources/rhea.py +2 -2
- pyobo/sources/ror.py +67 -21
- pyobo/sources/uniprot/uniprot.py +2 -2
- pyobo/struct/struct.py +4 -3
- pyobo/struct/typedef.py +10 -0
- pyobo/utils/path.py +2 -1
- pyobo/version.py +1 -1
- pyobo/xrefdb/sources/__init__.py +6 -3
- pyobo/xrefdb/sources/chembl.py +5 -5
- pyobo/xrefdb/sources/pubchem.py +3 -2
- pyobo/xrefdb/sources/wikidata.py +8 -1
- {pyobo-0.10.11.dist-info → pyobo-0.10.12.dist-info}/METADATA +23 -23
- {pyobo-0.10.11.dist-info → pyobo-0.10.12.dist-info}/RECORD +35 -35
- {pyobo-0.10.11.dist-info → pyobo-0.10.12.dist-info}/WHEEL +1 -1
- pyobo/xrefdb/bengo.py +0 -44
- {pyobo-0.10.11.dist-info → pyobo-0.10.12.dist-info}/LICENSE +0 -0
- {pyobo-0.10.11.dist-info → pyobo-0.10.12.dist-info}/entry_points.txt +0 -0
- {pyobo-0.10.11.dist-info → pyobo-0.10.12.dist-info}/top_level.txt +0 -0
pyobo/xrefdb/bengo.py
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
|
|
3
|
-
"""Pipeline for building a large ontology graph."""
|
|
4
|
-
|
|
5
|
-
import logging
|
|
6
|
-
|
|
7
|
-
import bioregistry
|
|
8
|
-
import networkx as nx
|
|
9
|
-
from tqdm.auto import tqdm
|
|
10
|
-
|
|
11
|
-
from pyobo import get_hierarchy
|
|
12
|
-
from pyobo.getters import SKIP
|
|
13
|
-
from pyobo.resource_utils import ensure_inspector_javert_df
|
|
14
|
-
|
|
15
|
-
logger = logging.getLogger(__name__)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
def bens_magical_ontology(use_tqdm: bool = True) -> nx.DiGraph:
|
|
19
|
-
"""Make a super graph containing is_a, part_of, and xref relationships."""
|
|
20
|
-
rv = nx.DiGraph()
|
|
21
|
-
|
|
22
|
-
df = ensure_inspector_javert_df()
|
|
23
|
-
for source_ns, source_id, target_ns, target_id, provenance in df.values:
|
|
24
|
-
rv.add_edge(
|
|
25
|
-
f"{source_ns}:{source_id}",
|
|
26
|
-
f"{target_ns}:{target_id}",
|
|
27
|
-
relation="xref",
|
|
28
|
-
provenance=provenance,
|
|
29
|
-
)
|
|
30
|
-
|
|
31
|
-
logger.info("getting hierarchies")
|
|
32
|
-
it = tqdm(sorted(bioregistry.read_registry()), desc="Entries", disable=not use_tqdm)
|
|
33
|
-
for prefix in it:
|
|
34
|
-
if bioregistry.is_deprecated(prefix) or prefix in SKIP:
|
|
35
|
-
continue
|
|
36
|
-
if use_tqdm:
|
|
37
|
-
it.set_postfix({"prefix": prefix})
|
|
38
|
-
|
|
39
|
-
hierarchy = get_hierarchy(prefix, include_has_member=True, include_part_of=True)
|
|
40
|
-
rv.add_edges_from(hierarchy.edges(data=True))
|
|
41
|
-
|
|
42
|
-
# TODO include translates_to, transcribes_to, and has_variant
|
|
43
|
-
|
|
44
|
-
return rv
|
|
File without changes
|
|
File without changes
|
|
File without changes
|