Closed amykglen closed 4 years ago
Interesting: noticed that if I specify a type for n00
in the DSL, by changing this line:
"add_qnode(curie=DOID:14330, id=n00)",
to this:
"add_qnode(curie=DOID:14330, id=n00, type=disease)",
the test passes.
so it seems Overlay is reliant on qnodes having types? and the recent change made to add_qnode
so that it no longer automatically adds a type to qnodes with a curie explains why this test that worked previously is now failing.
@amykglen, I think the recent change made to add_qnode
that causes it fail. This is the same to FET. So I let the script throw an error and remind the users to add a type if they forget it.
Yup, that would be the problem. The drug_treats_disease specifically looks for disease nodes, so will error out if no disease nodes are in the QG.
Ok, I've fixed this, all tests passing, and merged to master. @amykglen @chunyuma What I decided to do is:
ARAX_overlay.py
check if the parameters provided have the right QG node typespredict_drug_treats_disease.py
) at run time determine if the corresponding KG nodes have the proper type (and then decorate/add edges/properties if they do have the proper type, and do nothing if they don't have the proper type).That way you don't need to specifically specify the node type in the QG, but after the expand
, the code checks the node types at that point.
Noticed that test_issue680 in
test_ARAX_resultify.py
is failing in themaster
branch today, with an error coming from Overlay:Supplied value n00 is not permitted. In action {'predict_drug_treats_disease'}, allowable values to target_qnode_id are: []
This test was working last week (at least as of Thursday June 11), and the test itself hasn't changed since then. Not sure what's up.
I checked to make sure the knowledge graph actually contains nodes for each qnode_id, and all seems ok in that regard: