vgteam / libhandlegraph

Library for the Handle Graph abstraction
MIT License
20 stars 3 forks source link

Position of path step relative to the supporting node #93

Closed cgroza closed 1 year ago

cgroza commented 1 year ago

Hi,

Reading the handlegraph API, I see there is away to get the position of step handles along the path handles. Is there a way to calculate the position of the step handle relative to the node handle of this step? I only see that it is possible to retrieve the node handle of step handles, but no their position?

My thanks

jeizenga commented 1 year ago

The position queries are separated out into an additional interface: the PathPositionHandleGraph. The main reason is that position queries require additional data structures that typically have higher asymptotic complexity, so it can be helpful to have those data structures be "optional". We've also developed graph overlays in libbdsg (here and here) that add position queries onto an underlying path handle graph. Two of them are static, and one dynamic.