Closed maximusunc closed 2 months ago
I ran this locally and there were no knowledge_graph.edges and one knowledge_graph.node in the response. I suspected this was due to some merging problem, but that is exactly how the knowledge_graph looked from MoleProChembl. All other KPs returned no knowledge_graph data. There were no message.results. I did, however, change the code to make message.results a Some(vec![]) instead of a None by default.
This is being sent to the WFR to target MolePro:
{"workflow":[{"id":"lookup","runner_parameters":{"allowlist":["infores:molepro"]}},{"id":"score"}],"message":{"query_graph":{"edges":{"e00":{"predicates":["biolink:in_clinical_trials_for"],"subject":"n00","object":"n01"}},"nodes":{"n00":{"categories":["biolink:ChemicalEntity"]},"n01":{"ids":["MONDO:0007982"],"categories":["biolink:DiseaseOrPhenotypicFeature"]}}}}}
And this is the Response per this issue:
{ "workflow": [ { "id": "lookup", "runner_parameters": { "allowlist": [ "infores:molepro" ] } }, { "id": "score", "runner_parameters": {} } ], "message": { "query_graph": { "edges": { "e00": { "predicates": [ "biolink:in_clinical_trials_for" ], "subject": "n00", "object": "n01", "attribute_constraints": [], "qualifier_constraints": [] } }, "nodes": { "n00": { "categories": [ "biolink:ChemicalEntity" ], "set_interpretation": "BATCH", "constraints": [] }, "n01": { "ids": [ "MONDO:0007982" ], "categories": [ "biolink:DiseaseOrPhenotypicFeature" ], "set_interpretation": "BATCH", "constraints": [] } } }, "knowledge_graph": { "edges": {}, "nodes": { "MONDO:0007982": { "name": "metaphyseal chondrodysplasia, Jansen type", "categories": [ "biolink:BiologicalEntity", "biolink:Disease", "biolink:DiseaseOrPhenotypicFeature", "biolink:NamedThing", "biolink:ThingWithTaxon" ], "attributes": [ { "attribute_type_id": "biolink:has_numeric_value", "original_attribute_name": "information_content", "value": 100.0, "value_type_id": "EDAM:data_0006" }, { "attribute_type_id": "biolink:same_as", "original_attribute_name": "equivalent_identifiers", "value": [ "MONDO:0007982", "DOID:0080020", "OMIM:156400", "orphanet:33067", "UMLS:C0265295", "MESH:C537564", "NCIT:C131868", "SNOMEDCT:24629003" ], "value_type_id": "EDAM:data_0006" } ], "is_set": null } } } }, "logs": [] }
When I send this query directly to Molepro, it does only include the one knowledge graph node (which is a little unusual, but that node is the node that was asked for, so not really an issue), and they do return an empty results list. So the issue is looking like it's coming from either WFR or CQS. The fix by @jdr0887 mentioned above should take care of this in CQS, but I'll also look to see what's going on in WFR.
There is an issue/nuance in WFR where the empty results are being returned as None. This is valid TRAPI and not a validation issue (though just unexpected and we're going to change it to be an empty list), but the CQS should still return an empty results
list regardless as well.
Closing since this is resolved.
Given the following query:
It finishes very quickly, has a single knowledge_graph node, no knowledge_graph edges, and results are missing.