Skip to content

update ibd matrix based on a relevant subset of ancestors #2

@bguo068

Description

@bguo068

Adjacent trees are highly correlated, with the difference being a few deleted/added edges. From one tree to the next, we only need to update the IBD matrix between pairs of leaves of subtrees rooted at different child nodes of the parent node of a deleted edge.
From the Kelleher et al 2016 paper, fig4, we can sort the edge table by the 'right' coordinate and obtain which edges are deleted. We collect all 'parent' nodes of the delete edges and only update IBD matrix elements due to the changes of these nodes.

This should also work when we are only compare trees at two adjacent sampling points. In this case, we can multiple local trees between the sampling points, we update the IBD matrix related to parents nodes that have changed at any tree iteration between the two sampling points.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions