Skip to content

Handle missing data in two-locus statistics #2831

Closed as not planned
Closed as not planned

Description

@lkirk

As mentioned here by @petrelharp during the review of #2805, we'd like a better treatment of missing data. As implemented, we compute $w_{AB}$, $w_{Ab}$, $w_{aB}$, but use the total number of samples in the tree sequence as $n$. If there's missing data, $n$ will not be correct. We should implement $n$ as $n=w_{AB}+w_{Ab}+w_{aB}+w_{ab}$ so that we can properly account for missing data. This means that $n$ will be the minimum number of samples intersecting with the sample set at the left locus and the right locus.

This will require a bit of restructuring because we will either need to intersect all samples with the samples of the current valid tree on the left and right or we'll want to seed the algorithm that propagates sample bit arrays across alleles.

Activity

  1. added this to Pairwise stats and removed this from Pairwise statson Aug 30, 2023
  2. jeromekelleher commented on Aug 30, 2023

    @jeromekelleher
    Member

    We also don't really handle missing data in the standard tree stats API, so I'd be happy to kick this (tricky) can down the road.

  3. added
    future
    on Jun 12, 2025
  4. benjeffery commented on Jun 12, 2025

    @benjeffery
    Member

    Closing for inactivity and labelling "future", please re-open if you plan to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    futurestatistics

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions