In gramtools/libgramtools/src/search/search.cpp function site_boundary_marker_info() for determining whether a variant site marker marks the beginning or end of the variant site, an alternative could:
Avoid backward search requiring a bwt rank query
At the cost of one more fm index SA query for getting prg position
In gramtools/libgramtools/src/search/search.cpp function site_boundary_marker_info() for determining whether a variant site marker marks the beginning or end of the variant site, an alternative could: