lineagekit / lineagekit

A python library with genealogy methods
0 stars 0 forks source link

Generate pedigrees #9

Open sgravel opened 1 month ago

sgravel commented 1 month ago

We want a function that generates pedigrees under simple parameterized models (e.g., Wright-Fisher, Wright-Fisher with inbreeding).

shz9 commented 1 month ago

The Pedigree class in Ivan's repo supports Wright-Fisher simulations: https://github.com/ivan-krukov/aligning-genealogies/blob/master/genealogy_aligner/Pedigree.py#L390 There's also an implementation of Wright-Fisher that takes sex into account (i.e. pairs biological males/females, rather than two purely random samples): https://github.com/ivan-krukov/aligning-genealogies/blob/master/genealogy_aligner/Pedigree.py#L462

In Luke's repo, we implemented Wright-Fisher with more complex demographic scenarios, involving migration, mate choice functions, etc. In that implementation, we also supported simulating from pre-existing partial pedigrees, i.e. continuing a certain pedigree into the future.