Skip to content

Document ordering of segments in SegmentList #1682

Closed

Description

@jeromekelleher

It's not clear what order the segments in an IBD segment list are returned in. We should document this - I guess provide a method called "sort" which sorts then?

See also #1681

Activity

  1. gtsambos commented on Sep 10, 2021

    @gtsambos
    Member

    I don't think they are necessarily going to be returned in any order. The order in which they are added to the list depends on the edges that 'connect' the two segments to their common ancestor way up in the tree somewhere. So the list of ancestral nodes in the segments should be non-decreasing, but there's no ordering on the L/R coordinates and we don't expect there to be. Is this a problem for anything downstream, or is it just annoying?

  2. jeromekelleher commented on Sep 10, 2021

    @jeromekelleher
    MemberAuthor

    It depends on what they're used for I think. It would be easy to assume that they are in sorted order through (I did, without thinking too much about it) so we just need to be sure we document it. Probably adding a sort method will help, e.g., when comparing two segment lists for equality.

  3. added this to the Python 0.4.0 milestone on Oct 15, 2021
  4. added a commit that references this issue on Nov 10, 2021
    813c714
  5. added 5 commits that reference this issue on Dec 2, 2021
    4722dd0
    72bc913
    c76843c
    95a1dfd
    68913e1
  6. added a commit that references this issue on Mar 22, 2024
    a12ef78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions