tskit-dev / msprime

Simulate genealogical trees and genomic sequence data using population genetic models
GNU General Public License v3.0
172 stars 84 forks source link

Keep all nodes in simulation from pedigree #2129

Closed jeromekelleher closed 1 year ago

jeromekelleher commented 1 year ago

We would like to be able to track the passage of all ancestral material through the pedigree ancestors, not just those in which coalescence happens to occur (as well as the bits of segments that don't happen to coalesce when there is a coalescence).

Once we have a figured out how to keep unary nodes across the various models (#2128) I think this will be relatively straightforward, because we've already allocated nodes for every individual in the pedigree and we can reuse the machinery for that/the record_full_arg option.

cc @sgravel

petrelharp commented 1 year ago

So - keep the bits of ancestry for which they are ancestral to actual samples, right? For reference, the analogous thing in SLiM is called "retaining" (instead of "remembering", which implies actually making them samples): https://tskit.dev/pyslim/docs/latest/tutorial.html#retaining-individuals

jeromekelleher commented 1 year ago

Yep, that's it.

jeromekelleher commented 1 year ago

Probably better to implement #2133 first before this, as the pedigree simulation calls into some of the DTWF infrastructure.

GertjanBisschop commented 1 year ago

Can be closed. Implemented in #2176.