Skip to content

Multipopulation two-site statistics #2832

Closed

Description

@lkirk

We'd like to implement two-population versions of the statistics we've implemented thus far: $D^{2}$, $r$, $r^{2}$, and $D^{2}$ unbiased.

This means that we'll strictly require two sample sets, comparing the A locus from sample set 1 and the B locus from sample set 2.

There is a lot of prior art and the way we've structured two-locus statistics, this should be relatively straightforward.

Are there any other stats we want to implement @apragsdale?

Activity

  1. added this to Pairwise stats and removed this from Pairwise statson Aug 30, 2023
  2. lkirk commented on May 28, 2025

    @lkirk
    ContributorAuthor

    We've decided to restrict multi-population statistics to two sample sets (two-way LD statistics). The reason being that we would need to implement a lot of logic for various index permutations (especially for pi2, which is a 4-way statistic). See this implementation of pi2 statistics for an example. Given that these might not have broad utility, we decided to provide a general stats API that will allow users to implement new LD statistics in python, so that they can compute new statistics easily.

    Down the road, if we want 3+ way two-locus statistics, it should be relatively easy to add them in. We'll have the low-level k-way API implemented to support general statistics, so it should be a matter of adding in new LD stats and dispatching them as 3+ way stats.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions