-
Notifications
You must be signed in to change notification settings - Fork 0
Description
The way commit 4e87c16 handles the situation about how to check if a mutation is possible is not satisfactory.
If only two alleles exist, it has anyways to switch to the other one, expect is the probability to switch to it is zero.
Today, Elisa point to me some input file (too complicated to be reproduced here) where the simulation was very slow. Tracking things down, it turns out that the automatically build array for mutation frequency had the values 0.99999999... and 0.000000001... This might be seen as a bug though it was actually following a known path.
Yet, when an allele was stuck in the first position, it had a hard time finding a way to go to the second allele.
It would probably make much more sense to just check if only two alleles exist, and switch to the other one if p > 0. Since this is a sensible part of the code, I will see if I have time to change it and do some intensive testing, or if I leave it like this. Results are anyways correct, it is just much much slower (a factor of about 100 in the case of Elisa).