Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Dec 4, 2024
1 parent 59fed2f commit 49140a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/pyobo/sources/nlm_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def _process_journal(element) -> Term:
for synonym in element.findall("Alias"):
term.append_synonym(synonym.text)
for issn, _issn_type in issns:
# TODO include ISSN type, this is important
# to determine a "canonical" one
term.append_xref(Reference(prefix="issn", identifier=issn))
if start_year := element.findtext("StartYear"):
term.annotate_integer(START_YEAR, start_year)
Expand Down
4 changes: 2 additions & 2 deletions src/pyobo/struct/struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ def _emit_relations(
for typedef, reference in self.iterate_relations():
_typedef_warn(prefix=ontology_prefix, predicate=typedef, typedefs=typedefs)
predicate_reference = self._reference(typedef, ontology_prefix)
s = f"relationship: {predicate_reference} {reference.preferred_curie}"
s = f"relationship: {predicate_reference} {self._reference(reference, ontology_prefix)}"
if typedef.name or reference.name:
s += " !"
if typedef.name:
Expand All @@ -596,7 +596,7 @@ def _emit_object_properties(
_typedef_warn(prefix=ontology_prefix, predicate=predicate, typedefs=typedefs)
predicate_curie = self._reference(predicate, ontology_prefix)
for value in sorted(values):
yv = f"{predicate_curie} {value.preferred_curie}"
yv = f"{predicate_curie} {self._reference(value, ontology_prefix)}"
if predicate.name and value.name:
yv += f" ! {predicate.name} {value.name}"
yield yv
Expand Down

0 comments on commit 49140a7

Please sign in to comment.