From 6c09ed318d7a4abbc180051497faa024a67fbee2 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Wed, 29 Nov 2023 14:00:30 +0100 Subject: [PATCH] Reuse constant --- src/sssom/parsers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sssom/parsers.py b/src/sssom/parsers.py index 469a1fdc..09bb1047 100644 --- a/src/sssom/parsers.py +++ b/src/sssom/parsers.py @@ -33,6 +33,7 @@ OBJECT_LABEL, OBJECT_SOURCE, OBJECT_SOURCE_ID, + OBO_HAS_DB_XREF_URI, OWL_EQUIV_CLASS_URI, PREDICATE_ID, RDF_TYPE, @@ -68,8 +69,6 @@ logging = _logging.getLogger(__name__) -DBXREF_URI = "http://www.geneontology.org/formats/oboInOwl#hasDbXref" - # * ******************************************************* # Parsers (from file) @@ -591,9 +590,11 @@ def from_obographs( continue node_uri = node["id"] - if DBXREF_URI in mapping_predicates: + if OBO_HAS_DB_XREF_URI in mapping_predicates: for xref in meta.get("xrefs", []): - mdict = _make_mdict(node_uri, DBXREF_URI, xref["val"], converter, labels) + mdict = _make_mdict( + node_uri, OBO_HAS_DB_XREF_URI, xref["val"], converter, labels + ) _add_valid_mapping_to_list(mdict, mlist) for value in meta.get("basicPropertyValues", []):