diff --git a/src/rules/MCQ.json b/src/rules/MCQ.json index 22ba191..10f65b4 100644 --- a/src/rules/MCQ.json +++ b/src/rules/MCQ.json @@ -31,14 +31,15 @@ }, "edges": { "edge_0": { - "subject": "g", + "subject": "b", "object": "$source", "predicates": [ - "biolink:has_phenotype" + "biolink:has_phenotype", + "biolink:correlated_with" ] }, "edge_1": { - "subject": "g", + "subject": "b", "object": "$target", "predicates": [ "biolink:genetically_associated_with" @@ -79,14 +80,14 @@ }, "edges": { "edge_0": { - "subject": "g", + "subject": "b", "object": "$source", "predicates": [ "biolink:contributes_to" ] }, "edge_1": { - "subject": "g", + "subject": "b", "object": "$target", "predicates": [ "biolink:affects" diff --git a/src/service_aggregator.py b/src/service_aggregator.py index 45826af..54fccfc 100644 --- a/src/service_aggregator.py +++ b/src/service_aggregator.py @@ -926,9 +926,17 @@ def expand_query(input_message, params, guid): query = json.loads(qs) if source_input: del query["query_graph"]["nodes"][target]["ids"] + query["query_graph"]["nodes"][target].pop("member_ids", None) + if mcq: + query["query_graph"]["nodes"][source]["member_ids"] = member_ids else: del query["query_graph"]["nodes"][source]["ids"] + query["query_graph"]["nodes"][source].pop("member_ids", None) + if mcq: + query["query_graph"]["nodes"][target]["member_ids"] = member_ids message = {"message": query, "parameters": input_message.get("parameters") or {}} + if mcq: + message["message"]["knowledge_graph"] = deepcopy(input_message["message"]["knowledge_graph"]) if "log_level" in input_message: message["log_level"] = input_message["log_level"] messages.append(message)