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:
BTE will find paths that must have the given category (or descendant categories) as at least one intermediate node
BTE's results will only bind intermediate nodes of the given category (or descendants)
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).
_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).