suihuanglab / improving-agent

An Autonomous Reasoning Agent in the NCATS Biomedical Translator Network that uses EHR and multi-omic cohorts to rank results from user queries
MIT License
2 stars 4 forks source link

Support for directed edges #43

Open brettasmi opened 3 years ago

brettasmi commented 3 years ago

Surfaced here: https://github.com/NCATSTranslator/minihackathons/issues/41

In an earlier time when we wanted to expose as many results as possible, we wrote our query logic to make all edges undirected. This usually wasn't an issue given a predicate and two different node types, however this query shows an issue in which the edge direction is important for two nodes of the same type.

Supporting this requires some additional query logic to be written in the TRAPI to Cypher translation. Alternatively, we could leave that logic alone and filter results that don't match the intended edge direction. The former case would be cleaner and more computationally efficient, but could lead to issues where Biolink modeling does not agree with SPOKE modeling. The latter may be the simpler, though less efficient approach.