Skip to content

Commit fc5b79a

Browse files
authored
Merge pull request #86 from biopragmatics/uberon_mesh
Add UBERON-MeSH mappings
2 parents fdaa51c + 462fd1a commit fc5b79a

File tree

4 files changed

+242
-0
lines changed

4 files changed

+242
-0
lines changed
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""Generate mappings using Gilda from UBERON to MeSH."""
2+
3+
import gilda
4+
import obonet
5+
from indra.databases import mesh_client
6+
7+
from biomappings.resources import PredictionTuple, append_prediction_tuples
8+
9+
g = obonet.read_obo("/Users/ben/src/uberon/src/ontology/uberon-edit.obo")
10+
11+
mappings = {}
12+
for node, data in g.nodes(data=True):
13+
if not node.startswith("UBERON"):
14+
continue
15+
mesh_refs = [xref for xref in data.get("xref", []) if xref.startswith("MESH")]
16+
if mesh_refs:
17+
continue
18+
matches = gilda.ground(data["name"])
19+
if matches and matches[0].term.db == "MESH":
20+
mappings[node] = matches[0].term.id
21+
22+
print("Found %d UBERON->MESH mappings." % len(mappings))
23+
24+
predictions = []
25+
for uberon_id, mesh_id in mappings.items():
26+
pred = PredictionTuple(
27+
source_prefix="uberon",
28+
source_id=uberon_id,
29+
source_name=g.nodes[uberon_id]["name"],
30+
relation="skos:exactMatch",
31+
target_prefix="mesh",
32+
target_identifier=mesh_id,
33+
target_name=mesh_client.get_mesh_name(mesh_id),
34+
type="lexical",
35+
confidence=0.9,
36+
source="generate_uberon_mesh_mappings.py",
37+
)
38+
predictions.append(pred)
39+
40+
append_prediction_tuples(predictions, deduplicate=True, sort=True)

src/biomappings/resources/incorrect.tsv

+3
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,9 @@ reactome R-XTR-8877627 Vitamin E skos:exactMatch chebi CHEBI:46430 (-)-alpha-toc
938938
reactome R-XTR-8877627 Vitamin E skos:exactMatch mesh D014810 Vitamin E manually_reviewed orcid:0000-0003-4423-4370
939939
reactome R-XTR-9664873 Pexophagy speciesSpecific go GO:0030242 autophagy of peroxisome manually_reviewed orcid:0000-0003-4423-4370
940940
reactome R-XTR-983189 Kinesins speciesSpecific fplx Kinesin Kinesin manually_reviewed orcid:0000-0003-4423-4370
941+
uberon UBERON:0000104 life cycle skos:exactMatch mesh D008018 Life Cycle Stages manually_reviewed orcid:0000-0001-9439-5346
942+
uberon UBERON:0022469 primary olfactory cortex skos:exactMatch mesh D066194 Olfactory Cortex manually_reviewed orcid:0000-0001-9439-5346
943+
uberon UBERON:2001977 pad skos:exactMatch mesh D058729 Peripheral Arterial Disease manually_reviewed orcid:0000-0001-9439-5346
941944
umls C0006142 Malignant neoplasm of breast skos:exactMatch mesh D001943 Breast Neoplasms manual orcid:0000-0002-6601-2165
942945
wikipathways WP1060 Matrix Metalloproteinases speciesSpecific fplx MMP MMP manually_reviewed orcid:0000-0003-4423-4370
943946
wikipathways WP1176 Matrix Metalloproteinases speciesSpecific fplx MMP MMP manually_reviewed orcid:0000-0003-4423-4370

0 commit comments

Comments
 (0)