libbdsg icon indicating copy to clipboard operation
libbdsg copied to clipboard

Example of using bdsg.bdsg.PositionOverlay

Open RenzoTale88 opened this issue 4 years ago • 1 comments

Hello, sorry for opening many issues. I'm trying to work out the problem explained here. In that topic, I've been suggested to use bdsg.bdsg.PositionOverlay() to perform efficient lookup. I'm struggling to understand how to use it though, would it be possible to provide some detailing/example of those? Thank you in advance Andrea

RenzoTale88 avatar Jan 19 '21 08:01 RenzoTale88

No worries. The PositionOverlay takes some other graph as an argument to its constructor like overlay = bdsg.bdsg.PositionOverlay(graph). From then on overlay can access graph elements from graph using both graph's existing methods (things like overlay.get_handle()), and also the additional methods from the PathPositionHandleGraph interface (things like overlay.get_path_length() and overlay.get_step_at_position()).

jeizenga avatar Jan 19 '21 17:01 jeizenga