-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phase 1: aux-graph/result.analyses refactor for basic querying #603
Comments
Other references:
|
Some added notes:
|
Updated a note and the slides for provenance refactor (for "new" edges) |
Notes from today's group meeting:
|
While it would always be good to have more testing, after several rounds of fixing bugs with nodes / "multiple aux-graphs" / "multiple results" / "multiple edges related to subclassing"... the basic behavior seems fixed. We also haven't heard of issues related to our implementation of this (TRAPI validation / UI team / Translator Testing efforts). So...closing this and we can reopen / make a new issue if problems and bugs arise. |
READ FIRST:
Overview
TRAPI 1.4 includes major refactoring of the Response structure. This issue covers the desired behavior for basic querying (non-creative-mode).
General requirements
query_graph
cannot be modified,result.node_bindings
must only include QNodes fromquery_graph
. From this line in the migration guideresult.edge_bindings
andresult.score
auxiliary_graphs
(are basically groups of edges) andresult.analyses
result.analyses.edge_bindings
must only include QEdges fromquery_graph
. From this line in the migration guideTRAPI spec references
Relevant scenarios
There are 2 scenarios for a result, depending on whether its Result Nodes match exactly with the original QNodes (aka no QNode ID/node-expansion involved) or not.
I use this query in my examples below
Two-hop Predict similar to a creative-mode
treats
template. Takes me about ~2 min to run in my local.My "technical implementation" musings
Before results-assembly, ID/node-expansion behavior changes?
subclass_of
edges for each descendant ID that's used in KP Edges...biolink:subclass_of
[ "resource_id": "infores:biothings-explorer", "resource_role": "primary_knowledge_source" ]
Other musings:
result.score
->result.analyses.score
result.analyses.support_graphs
because we don't add "supporting nodes and edges" for our scoringresult.analyses
object'sedge_bindings
or anauxiliary_graphs
object'sedges
...no ID/node-expansion was involved
In this situation, for the
result.analyses
array, make an object where:edge_bindings
property holds the oldresult.edge_bindings
contentscore
property holds the oldresult.score
contentresource_id
property isinfores:biothings-explorer
a current result
notice the
node_bindings
: the n0 ID is the same as the bound Node ID (so no ID-expansion was done)new result
ID/node-expansion was involved
READ THIS FIRST:
Desired behavior is described with these slides: https://docs.google.com/presentation/d/1OzwQ6yBKOmluvmcOZU7FFf8n7YNrKr21wRz-FHha79s/edit#slide=id.g22b562e9c67_0_163
My "technical implementation" musings
We want a grouping of edges (KP Edges +
subclass_of
edges for the descendant IDs) that corresponds to 1 QEdge (that involves the expanded QNode) + represents only 1 "MetaPath" (so the KP Edges should probably have the same predicate and their end that doesn't correspond to an expanded QNode should only have 1 ID/entity bound to it)auxiliary_graph
section). Ideally, the auxiliary_graph section is a unique set of edge groups{"edges": [ ... ] }
. The edge IDs for the group go into that listattribute_type_id
isbiolink:support_graphs
and the value is an array of strings. Each string is a key for the auxiliary-graph corresponding to this group of edges[ "resource_id": "infores:biothings-explorer", "resource_role": "primary_knowledge_source" ]
. Should be okay because this edge only exists on the BTE level...Then we use these new edges to create the "result":
node_bindings
use the new edges (so the descendant IDs are NOT used here)result.analyses object
is made, similar to the first scenario:edge_bindings
use the new edgesscore
andresource_id
are the same as the first scenarioThe text was updated successfully, but these errors were encountered: