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
Add SegmentList object in Python, and return this rather than dict encoding #1681
Currently the IbdResult object returns a dictionary {"left": array, "right": array, "node": array} for each IBD pair to encode the segments. This isn't a great design, as it doesn't give any way of putting functionality on these segment lists.
Add a SegmentList object in the Python C API which we return from the lowlevel _get function. This is a front-end for the C segment_list_t struct. Keep a reference to the IbdResult object to ensure the memory accesses are safe.
This can have accessors left, right, array which return the corresponding arrays
Have some other accessors that give stats of the segment list.
The high-level Python interface can also support iteration (I guess implementing the Sequence protocol, or something) which would return a list of (left, right, node) namedtuples.
So, you'd be able to do stuff like
forkey, valueinibd_result.items():
print(key, value.left) # Array of left coordinatesforseginvalue:
print(seg.left, seg.right, seg.node)
Document this in the high-level Python API as the result. (See #1657)
Activity
Create Python IbdSegmentList and IbdSegment
Create Python IbdSegmentList and IbdSegment
Create Python IbdSegmentList and IbdSegment
Create Python IbdSegmentList and IbdSegment