Skip to content

Alignments C API #3319

Closed
Closed

Description

@benjeffery

#3317 Added missingness support for alignments via a pure-Python implementation. Implement a C API for this and use it. Something like
tsk_tree_sequence_alignments(tsk_tree_sequence_t *self, const char *ref_seq, tsk_size_t ref_seq_length, tsk_id_t *nodes, double* left, double *right, char **alignments)? Although we don't have any existing C API that returns what could be a huge chunk of memory like this. We could consider an iterator like the variants API, decoding a sensible amount of nodes at a time for efficiency.

Activity

  1. added this to the Python 1.0 milestone on Nov 11, 2025
  2. jeromekelleher commented on Nov 11, 2025

    @jeromekelleher
    Member

    Iterator seems unnecessary to me. User can easily spilt over the input sets of nodes, right?

    One thing we should do that's different to existing APIs is not require that the nodes are unique. Turns out there's lots of good reasons for duplicate nodes and its a faff working around it.

    Left and right are just single input numbers, so don't need to be pointers?

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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions