diff --git a/code/kg2/multi_ont_to_json_kg.py b/code/kg2/multi_ont_to_json_kg.py index 69871c48c..84ed55d80 100755 --- a/code/kg2/multi_ont_to_json_kg.py +++ b/code/kg2/multi_ont_to_json_kg.py @@ -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 @@ -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.'):