Skip to content

Commit

Permalink
Merge pull request #257 from ranking-agent/member_ids
Browse files Browse the repository at this point in the history
added member_id kg to rule message
  • Loading branch information
cbizon authored Aug 21, 2024
2 parents 8ac5f31 + 2c4b631 commit 267661f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/rules/MCQ.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions src/service_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 267661f

Please sign in to comment.