frostyfan109 / tranql

A Translator Query Language
https://researchsoftwareinstitute.github.io/data-translator/apps/tranql
MIT License
0 stars 1 forks source link

Workflow 5 doesn't work with answer viewer? #114

Closed frostyfan109 closed 5 years ago

frostyfan109 commented 5 years ago

Other queries do, but workflow 5 doesn't.

frostyfan109 commented 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'
frostyfan109 commented 5 years ago

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
frostyfan109 commented 5 years ago

~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'
frostyfan109 commented 5 years ago

It seems to work when a predicate is present.

frostyfan109 commented 5 years ago

This query worked as well:

SELECT chemical_substance->gene
  FROM '/graph/gamma/quick'
 WHERE chemical_substance='CHEMBL:CHEMBL3'
frostyfan109 commented 5 years ago

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.

frostyfan109 commented 5 years ago

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.

frostyfan109 commented 5 years ago

(Hopefully) Confirmed Cause:

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.

frostyfan109 commented 5 years ago

This was the cause. It has now been fixed in merge_results.