Skip to content

AFS folding (polarised=False) #2972

Description

@sunyatin

Dear all,

I was checking variable implementations of the (joint) allele frequency spectrum folding and went through the polarisation subsection in msprime. I am not sure I clearly understood the procedure implemented in ts.allele_frequency_spectrum(..., polarised=False), so all my apologies if I misinterpreted something...

Consider for instance a simple two-population AFS, $\xi$ (with haploid sample sizes $n_0 = n_1$), I thought I understood that any site with derived allele counts $i$ and $j$ where $i+j=(n_0+n_1)/2$ would add a half-count in both $\xi(i,j)$ and $\xi(n_0-i,n_1-j)$. However, looking into the spectrum, it seems that all cells checking the condition of ambiguous allele minority do not equal their reverse (which I expect would be the case if indeed the said sites were following the implementation described previously).

Am I misunderstanding the msprime implementation of folding?

Many thanks for your lights!

All the best,

Rémi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions