-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Consider the following TRAPI one-hop query graph in JSON format,
{
"edges": {
"e1": {
"predicates": [
"biolink:related_to"
],
"subject": "n0",
"object": "n1"
}
},
"nodes": {
"n0": {
"ids": [
"MONDO:0001384"
],
"categories": [
"biolink:Disease"
],
"is_set": false,
"name": "myopia"
},
"n1": {
"categories": [
"biolink:Gene"
],
"is_set": false
}
}
}
which I've saved locally as file mwe5.json. When I POST that query graph to Automat-monarchinitiative's production endpoint,
curl -X POST -H 'Content-Type: application/json' -d @mwe5.json https://automat.transltr.io/monarch-kg/query | jq '.' > monarch.json
the JSON response that comes back from the endpoint seems to be missing node bindings (i.e., node bindings to the query graph) for some nodes, like MONDO:0014411, that are referenced in edges in the response's knowledge graph. For example, in this edge (JSON excerpt follows):
"edges": {
"uuid:63243a1a-400a-11ef-89e7-6fe0be41fbbf": {
"subject": "HGNC:20502",
"predicate": "biolink:causes",
"object": "MONDO:0014411",
"sources": [
{
"resource_id": "infores:omim",
"resource_role": "primary_knowledge_source"
},
{
"resource_id": "infores:monarchinitiative",
"resource_role": "aggregator_knowledge_source",
"upstream_resource_ids": [
"infores:omim"
]
},
{
"resource_id": "infores:medgen",
"resource_role": "aggregator_knowledge_source",
"upstream_resource_ids": [
"infores:monarchinitiative"
]
},
{
"resource_id": "infores:automat-monarchinitiative",
"resource_role": "aggregator_knowledge_source",
"upstream_resource_ids": [
"infores:medgen"
]
}
],
So as you can see in that edge, MONDO:0014411 is referenced as the object of the edge, but it is not bound to any node in the query graph, per the list of bound nodes in the same response (excerpted below):
It looks like this node (MONDO:0014411) is in the response KG, and is referenced in edges, but it is not bound to any query node. Is that allowed per the TRAPI spec? Is it allowed because MONDO:0014411 is referenced in an auxiliary graph, namely, the auxiliary graph with these two edges?
