dwinter / dfe

Fitting, simulating and generally exploring the distribution of fitness effects from MA studies
0 stars 0 forks source link

Error catching for distribution fitting functions #2

Open dwinter opened 10 years ago

dwinter commented 10 years ago

The fit_ma_* functions still throw errors. Especially with whacky starting values or mutation sizes that would required very largue mutation rate. This is a pain when the functions are used in apply family functions as part of simulations because an error will kill the whole 'loop' and take any earlier results with it.

Short term solution is to have these functions check for errors and restart a variable number of times before giving up and returning an non-result object. Longer term, it may make sense to try an pick better starting values based on the data