From 548dc186373581da2dd88fa97c4d840ee6fb6992 Mon Sep 17 00:00:00 2001 From: Max Wang Date: Wed, 24 Jul 2024 15:52:47 -0400 Subject: [PATCH 1/2] Normalize the qgraph before lookup begins --- src/service_aggregator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/service_aggregator.py b/src/service_aggregator.py index 55b5079..45826af 100644 --- a/src/service_aggregator.py +++ b/src/service_aggregator.py @@ -718,7 +718,7 @@ async def lookup(message, params, guid, infer=False, caller="ARAGORN", answer_qn :param caller: :return: """ - + message = await normalize_qgraph_ids(message) if caller == "ARAGORN": return await aragorn_lookup(message, params, guid, infer, answer_qnode, bypass_cache) elif caller == "ROBOKOP": @@ -833,7 +833,7 @@ async def normalize_qgraph_ids(m): for qid, qnode in qnodes.items(): if ("ids" in qnode) and (qnode["ids"] is not None): qnode_ids.update(qnode["ids"]) - nnp = { "curies": list(qnode_ids), "conflate": True } + nnp = { "curies": list(qnode_ids), "conflate": True, "drug_chemical_conflate": True } async with httpx.AsyncClient(timeout=httpx.Timeout(timeout=120)) as client: nnresult = await client.post( url, @@ -851,8 +851,6 @@ async def normalize_qgraph_ids(m): async def robokop_lookup(message, params, guid, infer, question_qnode, answer_qnode) -> (dict, int): - # For robokop, gotta normalize - message = await normalize_qgraph_ids(message) if not infer: kg_url = os.environ.get("ROBOKOPKG_URL", "https://automat.renci.org/robokopkg/") return await subservice_post("robokopkg", f"{kg_url}query", message, guid) From fef706e016997d6170e683190cf01578bb1dc4d8 Mon Sep 17 00:00:00 2001 From: Max Wang Date: Wed, 24 Jul 2024 15:53:15 -0400 Subject: [PATCH 2/2] Bump patch version --- openapi-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi-config.yaml b/openapi-config.yaml index 7a02c26..57b9c3b 100644 --- a/openapi-config.yaml +++ b/openapi-config.yaml @@ -11,7 +11,7 @@ servers: # url: http://127.0.0.1:5000 termsOfService: http://robokop.renci.org:7055/tos?service_long=ARAGORN&provider_long=RENCI title: ARAGORN -version: 2.8.1 +version: 2.8.2 tags: - name: translator - name: ARA