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

Open

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.

Activity

  1. adamnovak commented on Jan 7, 2020

    @adamnovak
    MemberAuthor

    Similarly, our vg Packer code expects edge_index to never return 0 for an edge that exists but this isn't guaranteed by the interface.

  2. added a commit that references this issue on Jan 7, 2020
  3. glennhickey commented on Jan 7, 2020

    @glennhickey
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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