diff --git a/code/ARAX/ARAXQuery/ARAX_filter.py b/code/ARAX/ARAXQuery/ARAX_filter.py index e718a9779..98ace21a1 100644 --- a/code/ARAX/ARAXQuery/ARAX_filter.py +++ b/code/ARAX/ARAXQuery/ARAX_filter.py @@ -167,10 +167,10 @@ def main(): actions = result.data['actions'] #### Read message #2 from the database. This should be the acetaminophen proteins query result message - sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() - message_dict = araxdb.getMessage(2) + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() + message_dict = response_cache.get_response(314204) #### The stored message comes back as a dict. Transform it to objects sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../OpenAPI/python-flask-server/") diff --git a/code/ARAX/ARAXQuery/ARAX_filter_kg.py b/code/ARAX/ARAXQuery/ARAX_filter_kg.py index 6abfc45e7..0aef1585e 100644 --- a/code/ARAX/ARAXQuery/ARAX_filter_kg.py +++ b/code/ARAX/ARAXQuery/ARAX_filter_kg.py @@ -1525,9 +1525,9 @@ def main(): actions = result.data['actions'] #### Read message #2 from the database. This should be the acetaminophen proteins query result message - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() #message_dict = araxdb.getMessage(2) # acetaminophen2proteins graph # message_dict = araxdb.getMessage(13) # ibuprofen -> proteins -> disease # work computer @@ -1535,7 +1535,7 @@ def main(): # message_dict = araxdb.getMessage(16) # atherosclerosis -> phenotypic_feature # work computer # message_dict = araxdb.getMessage(5) # atherosclerosis -> phenotypic_feature # home computer # message_dict = araxdb.getMessage(10) - message_dict = araxdb.getMessage(40) + message_dict = response_cache.get_response(314204) #### The stored message comes back as a dict. Transform it to objects from ARAX_messenger import ARAXMessenger diff --git a/code/ARAX/ARAXQuery/ARAX_filter_results.py b/code/ARAX/ARAXQuery/ARAX_filter_results.py index 97469f40a..0c3778982 100644 --- a/code/ARAX/ARAXQuery/ARAX_filter_results.py +++ b/code/ARAX/ARAXQuery/ARAX_filter_results.py @@ -942,9 +942,9 @@ def main(): actions = result.data['actions'] #### Read message #2 from the database. This should be the acetaminophen proteins query result message - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() #message_dict = araxdb.getMessage(2) # acetaminophen2proteins graph # message_dict = araxdb.getMessage(13) # ibuprofen -> proteins -> disease # work computer @@ -952,7 +952,7 @@ def main(): # message_dict = araxdb.getMessage(16) # atherosclerosis -> phenotypic_feature # work computer # message_dict = araxdb.getMessage(5) # atherosclerosis -> phenotypic_feature # home computer # message_dict = araxdb.getMessage(10) - message_dict = araxdb.getMessage(40) + message_dict = response_cache.get_response(314204) #### The stored message comes back as a dict. Transform it to objects from ARAX_messenger import ARAXMessenger diff --git a/code/ARAX/ARAXQuery/ARAX_overlay.py b/code/ARAX/ARAXQuery/ARAX_overlay.py index f7954a8b0..702de3d36 100644 --- a/code/ARAX/ARAXQuery/ARAX_overlay.py +++ b/code/ARAX/ARAXQuery/ARAX_overlay.py @@ -1038,9 +1038,9 @@ def main(): actions = result.data['actions'] #### Read message #2 from the database. This should be the acetaminophen proteins query result message - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() # message_dict = araxdb.getMessage(2) # acetaminophen2proteins graph # message_dict = araxdb.getMessage(13) # ibuprofen -> proteins -> disease # work computer @@ -1050,7 +1050,7 @@ def main(): # message_dict = araxdb.getMessage(10) # message_dict = araxdb.getMessage(36) # test COHD obs/exp, via ARAX_query.py 16 # message_dict = araxdb.getMessage(39) # ngd virtual edge test - message_dict = araxdb.getMessage(1) + message_dict = response_cache.get_response(314204) #### The stored message comes back as a dict. Transform it to objects from ARAX_messenger import ARAXMessenger diff --git a/code/ARAX/ARAXQuery/ARAX_ranker.py b/code/ARAX/ARAXQuery/ARAX_ranker.py index 1a8c7d6a3..ac04e6e43 100644 --- a/code/ARAX/ARAXQuery/ARAX_ranker.py +++ b/code/ARAX/ARAXQuery/ARAX_ranker.py @@ -849,10 +849,10 @@ def main(): # For local messages due to local changes in code not rolled out to production: if params.local: - sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() - message_dict = araxdb.getMessage(294) # local version of 2709 but with updates to COHD + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() + message_dict = response_cache.get_response(314204) # message_dict = araxdb.getMessage(297) # message_dict = araxdb.getMessage(298) # message_dict = araxdb.getMessage(299) # observed_expected_ratio different disease diff --git a/code/ARAX/ARAXQuery/knowledge_graph_info.py b/code/ARAX/ARAXQuery/knowledge_graph_info.py index d2871fb6b..8ef18352b 100644 --- a/code/ARAX/ARAXQuery/knowledge_graph_info.py +++ b/code/ARAX/ARAXQuery/knowledge_graph_info.py @@ -186,10 +186,10 @@ def main(): actions = result.data['actions'] #### Read message #2 from the database. This should be the acetaminophen proteins query result message - sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() - message_dict = araxdb.getMessage(2) + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() + message_dict = response_cache.get_response(314204) #### The stored message comes back as a dict. Transform it to objects from ARAX_messenger import ARAXMessenger diff --git a/code/ARAX/ARAXQuery/query_graph_info.py b/code/ARAX/ARAXQuery/query_graph_info.py index cb9b7f3a7..9a04449cc 100644 --- a/code/ARAX/ARAXQuery/query_graph_info.py +++ b/code/ARAX/ARAXQuery/query_graph_info.py @@ -534,10 +534,10 @@ def main(): actions = result.data['actions'] #### Read message #2 from the database. This should be the acetaminophen proteins query result message - sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() - message_dict = araxdb.getMessage(2) + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() + message_dict = response_cache.get_response(314204) #### The stored message comes back as a dict. Transform it to objects from ARAX_messenger import ARAXMessenger diff --git a/code/ARAX/Testing/test4_results_inference.py b/code/ARAX/Testing/test4_results_inference.py index df4e34bf0..2c943d56e 100644 --- a/code/ARAX/Testing/test4_results_inference.py +++ b/code/ARAX/Testing/test4_results_inference.py @@ -19,10 +19,10 @@ def main(): response = Response() #### Read message #2 from the database. This should be the acetaminophen proteins query result message - sys.path.append(os.path.dirname(os.path.abspath(__file__))+"/../../UI/Feedback") - from RTXFeedback import RTXFeedback - araxdb = RTXFeedback() - message_dict = araxdb.getMessage(2) + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../ResponseCache") + from response_cache import ResponseCache + response_cache = ResponseCache() + message_dict = response_cache.get_response(314204) #### The stored message comes back as a dict. Transform it to objects messenger = ARAXMessenger()