Skip to content

Commit

Permalink
Reuse constant
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Nov 29, 2023
1 parent b89b68a commit 6c09ed3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sssom/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
OBJECT_LABEL,
OBJECT_SOURCE,
OBJECT_SOURCE_ID,
OBO_HAS_DB_XREF_URI,
OWL_EQUIV_CLASS_URI,
PREDICATE_ID,
RDF_TYPE,
Expand Down Expand Up @@ -68,8 +69,6 @@

logging = _logging.getLogger(__name__)

DBXREF_URI = "http://www.geneontology.org/formats/oboInOwl#hasDbXref"

# * *******************************************************
# Parsers (from file)

Expand Down Expand Up @@ -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", []):
Expand Down

0 comments on commit 6c09ed3

Please sign in to comment.