From 03b9b4586a0a7880a7e81e4a2a1cd9b33083d766 Mon Sep 17 00:00:00 2001 From: Kevin Vizhalil Date: Thu, 10 Aug 2023 16:38:48 -0400 Subject: [PATCH] filtering semmeddb only when run in ARAX --- code/ARAX/ARAXQuery/ARAX_expander.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/ARAX/ARAXQuery/ARAX_expander.py b/code/ARAX/ARAXQuery/ARAX_expander.py index 5f1ed5541..f3e1f2a98 100644 --- a/code/ARAX/ARAXQuery/ARAX_expander.py +++ b/code/ARAX/ARAXQuery/ARAX_expander.py @@ -697,8 +697,9 @@ def apply(self, response, input_parameters, mode: str = "ARAX"): # Map canonical curies back to the input curies in the QG (where applicable) #1622 self._map_back_to_input_curies(message.knowledge_graph, query_graph, log) - eu.remove_semmeddb_edges_and_nodes_with_low_publications(message.knowledge_graph, response) - overarching_kg = eu.convert_standard_kg_to_qg_organized_kg(message.knowledge_graph) + if mode != "RTXKG2": + eu.remove_semmeddb_edges_and_nodes_with_low_publications(message.knowledge_graph, response) + overarching_kg = eu.convert_standard_kg_to_qg_organized_kg(message.knowledge_graph) # Return the response and done kg = message.knowledge_graph log.info(f"After Expand, the KG has {len(kg.nodes)} nodes and {len(kg.edges)} edges "