Skip to content

Commit

Permalink
Fix missing kgraph nodes issue
Browse files Browse the repository at this point in the history
  • Loading branch information
maximusunc committed Jun 26, 2024
1 parent 45a52ad commit a60168d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ async def filter_kgraph_orphans(message,params,guid):
for analysis in result.get('analyses',[]):
for auxgraph in analysis.get('support_graphs',[]):
auxgraphs.add(auxgraph)
# 4. Support graphs from edges in 2
# 4. Nodes and Support graphs from edges in 2
for edge in edges:
edge_obj = message.get('message',{}).get('knowledge_graph',{}).get('edges',{}).get(edge)
if edge is not None:
nodes.update([edge_obj["subject"], edge_obj["object"]])
for attribute in message.get('message',{}).get('knowledge_graph',{}).get('edges',{}).get(edge,{}).get('attributes',{}):
if attribute.get('attribute_type_id',None) == 'biolink:support_graphs':
auxgraphs.update(attribute.get('value',[]))
Expand Down

0 comments on commit a60168d

Please sign in to comment.