Skip to content

Commit

Permalink
ensuring synonyms and curies are lists
Browse files Browse the repository at this point in the history
  • Loading branch information
kvnthomas98 committed Oct 7, 2024
1 parent 3baa844 commit 4aeb888
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/ARAX/ARAXQuery/Filter_KG/remove_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ def _is_general_concept(self, node):
if not node['attributes']:
return False
for attribute in node['attributes']:
if attribute['attribute_type_id'] == 'biolink:xref':
if attribute['attribute_type_id'] == 'biolink:xref' and isinstance(attribute.get('value', []),list):
curies.update(map(str.lower, attribute.get('value', [])))
if attribute['attribute_type_id'] == 'biolink:synonym':
if attribute['attribute_type_id'] == 'biolink:synonym' and isinstance(attribute.get('value', []),list):
synonyms.update(map(str.lower, attribute.get('value', [])))
if node['name']:
synonyms.add(node['name'].lower())
Expand Down

0 comments on commit 4aeb888

Please sign in to comment.