msprime icon indicating copy to clipboard operation
msprime copied to clipboard

Save information about sweep in SweepGenicSelection model

Open jeromekelleher opened this issue 6 months ago • 6 comments

A few different people have been asking about how we keep more information about sweeps in the SweepGenicSelection. It's not entirely clear to me how we do this, but here are some basic options:

  1. Write a mutation representing the advantageous allele to the mutations table (but, what node is it at? Seems tricky to do in practise given that it's all stochastic)
  2. Add some unary nodes to mark the beginning and the end of the sweep. That is, when we move a lineages into label 1 here we create a node to track this event and add an edge, and when we move lineages back into label 0 here we add another edge.

Option 2 seems like the only viable approach to me, and fits in reasonably well with the additional_nodes APIs that are just about to drop in v 1.3. So, I guess we'd add a NodeType.LABEL_MIGRANT or something to keep track of this?

jeromekelleher avatar Dec 13 '23 10:12 jeromekelleher