ARAX spitting out error with input after running for a while
Will get example from @dkoslicki and post it here
DSL query:
# PCD
add_qnode(ids=MONDO:0016575, key=n0)
#Connected to proteins
add_qnode(categories=biolink:Protein, key=n1)
add_qedge(subject=n0, object=n1, key=e0)
expand(edge_key=e0)
overlay(action=fisher_exact_test,subject_qnode_key=n0,virtual_relation_label=F1,object_qnode_key=n1,filter_type=top_n,value=50)
overlay(action=compute_ngd, virtual_relation_label=N1, subject_qnode_key=n0, object_qnode_key=n1)
resultify()
filter_results(action=limit_number_of_results, max_results=100)
#And drugs associated with those proteins
#add_qnode(categories=biolink:ChemicalEntity, key=n2)
#add_qedge(subject=n1, object=n2, key=e1)
#expand(edge_key=e1)
#overlay(action=compute_ngd, virtual_relation_label=N1, subject_qnode_key=n0, object_qnode_key=n1)
#overlay(action=compute_ngd, virtual_relation_label=N2, subject_qnode_key=n1, object_qnode_key=n2)
#overlay(action=compute_ngd, virtual_relation_label=N3, subject_qnode_key=n0, object_qnode_key=n2)
#overlay(action=predict_drug_treats_disease,virtual_relation_label=DTD1,subject_qnode_key=n0,object_qnode_key=n2,slow_mode=false)
#resultify()
#filter_results(action=limit_number_of_results, max_results=100)
It spits out the following error underneath the progress bar:
Subject node with qnode key n0 was set to None in Query Graph. Please specify the node type
This is fixed by adding in a category in the PCD add_qnode command like so:
add_qnode(ids=MONDO:0016575, key=n0,categories=[biolink:Disease])
What is odd to me is that this error seems to happen after the expand step has already finished.
Not sure if this is a add_qnode issue, a UI issue, or a ARAX query issue.
I think we need to revisit the whole "can we validate ARAXi queries before running them". This can be addressed with a simple: "If FET is called between nodes n1 and n2, be sure nodes n1 and n2 have their categories specified."
However, for this one, it may be as simple as @chunyuma adding code into FET so that if the qnode category is not specified, the FET code pulls it on the fly from the info in the KG (since expand has already populated those nodes, so the categories are already specified)
It spits out the following error underneath the progress bar:
Subject node with qnode key n0 was set to None in Query Graph. Please specify the node type
I think this issue has been resolved by the fix in #1394.
close it as it has been completed