Skip to content

Commit

Permalink
Merge pull request #234 from TranslatorSRI/remove-entity
Browse files Browse the repository at this point in the history
Remove `biolink:Entity` from nodes created by NodeNorm. Closes #173.
  • Loading branch information
gaurav authored Dec 7, 2023
2 parents 73360e3 + 8a22494 commit 34aee97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions node_normalizer/normalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,12 @@ async def create_node(canonical_id, equivalent_ids, types, info_contents, includ
if include_descriptions and "d" in eqid and len(eqid["d"]):
eq_item["description"] = eqid["d"][0]
node["equivalent_identifiers"].append(eq_item)

# We need to remove `biolink:Entity` from the types returned.
# (See explanation at https://github.com/TranslatorSRI/NodeNormalization/issues/173)
if 'biolink:Entity' in types[canonical_id]:
types[canonical_id].remove('biolink:Entity')

node['type'] = types[canonical_id]

# add the info content to the node if we got one
Expand Down

0 comments on commit 34aee97

Please sign in to comment.