Skip to content

Commit

Permalink
Replace RTXFeedback with ResponseCache.
Browse files Browse the repository at this point in the history
  • Loading branch information
edeutsch committed Nov 13, 2024
1 parent 88f7315 commit a68158b
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions code/ARAX/ARAXQuery/ARAX_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/")
Expand Down
8 changes: 4 additions & 4 deletions code/ARAX/ARAXQuery/ARAX_filter_kg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,17 +1525,17 @@ 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
# message_dict = araxdb.getMessage(14) # pleuropneumonia -> phenotypic_feature # work computer
# 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
Expand Down
8 changes: 4 additions & 4 deletions code/ARAX/ARAXQuery/ARAX_filter_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -942,17 +942,17 @@ 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
# message_dict = araxdb.getMessage(14) # pleuropneumonia -> phenotypic_feature # work computer
# 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
Expand Down
8 changes: 4 additions & 4 deletions code/ARAX/ARAXQuery/ARAX_overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions code/ARAX/ARAXQuery/ARAX_ranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions code/ARAX/ARAXQuery/knowledge_graph_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions code/ARAX/ARAXQuery/query_graph_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions code/ARAX/Testing/test4_results_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a68158b

Please sign in to comment.