You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Document ordering of segments in SegmentList #1682
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?
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?
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.
Activity
gtsambos commentedon Sep 10, 2021
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?
jeromekelleher commentedon Sep 10, 2021
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
sortmethod will help, e.g., when comparing two segment lists for equality.Documentation for IBD segments
Documentation for IBD segments
Documentation for IBD segments
Documentation for IBD segments
Documentation for IBD segments
Documentation for IBD segments
Documentation for IBD segments