Closed frostyfan109 closed 5 years ago
Okay, nevermind, this query gives me an empty screen:
SELECT chemical_substance->disease
FROM '/graph/gamma/quick'
WHERE chemical_substance='CHEMBL:CHEMBL3'
But this query works properly with the object viewer:
-- What proteins are targetted by the metabolite KEGG:C00017?
set metabolite = "KEGG:C00017"
select metabolite->protein
from "/graph/rtx"
where metabolite=$metabolite
~It may be a problem with Robokop queries?~ It works with this Robokop query:
select chemical_substance-[interacts_with]->gene
from '/graph/gamma/quick'
where chemical_substance='CHEMBL:CHEMBL3'
It seems to work when a predicate is present.
This query worked as well:
SELECT chemical_substance->gene
FROM '/graph/gamma/quick'
WHERE chemical_substance='CHEMBL:CHEMBL3'
It may be that Robokop can return nodes that have multiple types, and some may not be in the query. For example, with the chemical_substance->disease query, it returns some nodes with the types disease
and genetic_condition
.
This probably isn't it: the query "SELECT chemical_substance-[treats]->disease FROM '/graph/gamma/quick' WHERE chemical_substance='CHEMBL:CHEMBL3'" works but has multityped nodes just like the above one.
After further investigation, I've narrowed the bad apple to something within the contributes_to edges. This query does not work:
SELECT chemical_substance-[contributes_to]->disease
FROM '/graph/gamma/quick'
WHERE chemical_substance='CHEMBL:CHEMBL3'
The following predicates work:
Note: The faulty query also contains the literature_co-occurrence edge.
Edit: This is the offending node: MONDO:0005049. It is not inside the knowledge graph which crashes Robokop.
The reason that this is happening is because if a node is merged but its id remains the same in the knowledge_map, Robokop crashes.
This was the cause. It has now been fixed in merge_results
.
Other queries do, but workflow 5 doesn't.