Skip to content

Commit

Permalink
#1261
Browse files Browse the repository at this point in the history
  • Loading branch information
kvarforl committed May 17, 2021
1 parent 85c62af commit a9bac83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions code/kg2/multi_ont_to_json_kg.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
REGEX_YEAR_MONTH = re.compile('[12][90][0-9]{2}_([0-9]{1,2})')
REGEX_PUBLICATIONS = re.compile(r'((?:(?:PMID)|(?:ISBN)):\d+)')
REGEX_XREF_END_DESCRIP = re.compile(r'.*\[([^\]]+)\]$')
REGEX_OBSOLETE = re.compile("^obsolete|\(obsolete||obsolete$", re.IGNORECASE)

IRI_OBO_XREF = kg2_util.IRI_OBO_FORMAT_XREF
CURIE_OBO_XREF = kg2_util.CURIE_ID_OBO_FORMAT_XREF
Expand Down Expand Up @@ -813,6 +814,8 @@ def biolink_depth_getter(category: str):
if node_name.lower().startswith('obsolete:') or \
(node_curie_id.startswith(kg2_util.CURIE_PREFIX_GO + ':') and node_name.lower().startswith('obsolete ')):
node_deprecated = True
if REGEX_OBSOLETE.match(node_name) is not None:
node_deprecated = True

if node_description is not None:
if node_description.lower().startswith('obsolete:') or node_description.lower().startswith('obsolete.'):
Expand Down

0 comments on commit a9bac83

Please sign in to comment.