wangke16 / MSMC-IM

A tool for estimating time-dependent migration rates based on cross-/within-population coalescent rates from MSMC
16 stars 2 forks source link

Error scipy's optimize.py: invalid value encountered in double scalars #8

Closed paikusuma closed 2 years ago

paikusuma commented 2 years ago

Hi!

I tried to run the MSMC_IM using the output of msmc-tools's combineCrossCoal.py from a pair of human pops (attached: combined_cross_pop1_pop2.msmc2.final.txt). However, it has been giving me these errors:

/usr/local/lib/python3.8/dist-packages/scipy/optimize/optimize.py:2149: RuntimeWarning: invalid value encountered in double_scalars
 tmp2 = (x - v) * (fx - fw)
/usr/local/lib/python3.8/dist-packages/scipy/optimize/optimize.py:2555: RuntimeWarning: invalid value encountered in double_scalars
 w = xb - ((xb - xc) * tmp2 - (xb - xa) * tmp1) / denom

The errors occur in all pairs of pops I have run, although these runs still produce results in the end, however I am not sure whether I should worry about these errors (which might affect the robustness of the results (?)) or I can ignore them.

Thank you for your thoughts!

Best +Pai

paikusuma commented 2 years ago

... whoops, apparently it's been raised before in #1 sorry, I close this now.