Skip to content

It is not clear if node_at_vector_offset/node_vector_offset are supposed to be 0-based, 1-based, or a mix. #41

@adamnovak

Description

@adamnovak

The vg Sampler samples from the sequence using a 1-based offset:

https://github.com/vgteam/vg/blob/e558c3cc27984415ba3de7c3d941827c39f17376/src/sampler.cpp#L59-L62

However, this isn't documented in the VectorizableHandleGraph interface, so it is likely that implementers will produce and expect 0-based offsets.

It looks like the VectorizableOverlay from libbdsg produces 0-based offsets, but expects 1-based offsets, which is just wild:

https://github.com/vgteam/libbdsg/blob/e073c2aee77e73ec41310bf3191af322fe8faa7e/src/vectorizable_overlays.cpp#L88-L96

We should choose all 0-based or all 1-based (probably all 0-based), document it, and change all the clients and implementations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions