The current implementation of update_mutations will see the first mutation's mcount as zero and remove the position from the lookup table. If the mutation rate is high enough, this position may be used again, violating an infinite-sites assumption.
The fact that this bug has been undetected until now implies that any effect it has on simulations' final states is extremely subtle. You'd need a lot of combinations of rare things happening, and for the combo to happen many times, to have a big effect.
Have to decide whether to fix this in update_mutations or in process_gametes. The latter is likely preferable, as the former is optional from a modeling perspective.
A rare bug can be triggered in the following way:
i
.i
.The current implementation of
update_mutations
will see the first mutation'smcount
as zero and remove the position from the lookup table. If the mutation rate is high enough, this position may be used again, violating an infinite-sites assumption.The fact that this bug has been undetected until now implies that any effect it has on simulations' final states is extremely subtle. You'd need a lot of combinations of rare things happening, and for the combo to happen many times, to have a big effect.
Have to decide whether to fix this in
update_mutations
or inprocess_gametes
. The latter is likely preferable, as the former is optional from a modeling perspective.