biothings / biothings_explorer

TRAPI service for BioThings Explorer
https://explorer.biothings.io
Apache License 2.0
8 stars 9 forks source link

Pathfinder: Implement node-category constraints #830

Closed tokebe closed 1 month ago

tokebe commented 1 month ago

_Parent Issue: https://github.com/biothings/biothings_explorer/issues/794_

Pathfinder currently supports a specific query format (see #794) but requires that the intermediate node be of category biolink:NamedThing. This needs to be changed such that the query graph unpinned node can be given a different category. The expected behavior when this occurs:

The easiest way to implement this is to somehow filter or fill out the templates BTE uses. We could add an attribute to the templateGroups where all pathfinder-type groups specify a list of intermediate node categories they contain. There may be better ways to go about this (pinging @colleenXu for discussion)

As for only binding only intermediate nodes of the given category, when making final results in pathfinder.ts, we can skip any result where the current intermediate node is not equal to or a descendant of the expected category (making use of biolink utilities).

tokebe commented 1 month ago

Note that work is blocked until we've decided on an approach for how best to handle pinned categories with respect to our templates.

tokebe commented 1 month ago

Superseded by #832