Skip to content

Rename find_ibd to ibd_segments and IbdResult to IbdSegments #1708

Closed

Description

@jeromekelleher

As we're going through the IBD API and making room for it to do more general things (e.g. #1663), I think it makes sense to be more concrete about what the current find_ibd method does: it returns the IBD segments. We can build other methods later that return some statistics about the IBD segments (computed on the fly, efficiently), as outlined in #1639 (see the comments for more stats), and we want to leave room in the name space for that. By renaming find_ibd to ibd_segments we are making one method that does a specific thing, so that we can later develop others. This means we don't have to pile loads of functionality into find_ibd, or make its return type super complicated.

Likewise, the current IbdResult object that we return is a bit vague. I think it would be better to call it an IbdSegments class, which is a mapping from pairs of nodes to IbdSegmentList objects, which in turn contain IbdSegments (This is partially done in #1707).

Any thoughts @gtsambos?

Activity

  1. added this to the Python 0.3.8 milestone on Sep 16, 2021
  2. gtsambos commented on Sep 17, 2021

    @gtsambos
    Member

    This sounds fine to me! I think the reason why I initially called this find_ibd was to follow the pattern of the other similar algorithms in tskit, which use verbs (simplify, link_ancestors). But now that our vision for this function has broadened a bit into calculating statistics etc, that consideration is less important now.

  3. added 4 commits that reference this issue on Sep 17, 2021
    e27e4a1
    1d13ab1
    7788d78
    f283f02
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