harrispopgen / mushi

[mu]tation [s]pectrum [h]istory [i]nference
https://harrispopgen.github.io/mushi/
MIT License
24 stars 5 forks source link

Folded SFS #60

Closed wsdewitt closed 3 years ago

wsdewitt commented 4 years ago

There is some interest in using mushi for data that lack ancestral state calls. Instead of an SFS, input would be a folded SFS.

To model a folded SFS, we can add a matrix left multiplying the L operator (Thm 1). This is a ceil((n-1)/2) X (n-1) matrix that contains 1s in a V shape (other entries zero). It’s a folding operator to add complementary SFS entries to give a folded SFS of minor allele frequencies that are agnostic to ancestral state.

We can just add this with an optional flag for the L operator. We’ll also have to be careful about how the kSFS.n attribute is handled in this case.

wsdewitt commented 3 years ago

resolved in #62