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

Extra high migration rates #3

Closed grillino closed 3 years ago

grillino commented 4 years ago

Dear Wang Ke, thanks a lot for developing this fantastic tool! I ran into a problem while running msmc-im on some of our data. I attach the input file I am using (from msmc-ccr), and the output from msmc-im. The inferred migration rate is usually lower than 10^-4 on my data, but at certain time segments it shoots up to almost 100 (99.xxx, see 8th non-header line of the output). Of course the cumulative density function has a very steep increase up to nearly 1 in a single time segment. Could you tell me if I am doing something wrong and why you think this happens?

input.combined.txt

output.MSMC_IM.estimates.txt

Best, Andrea

wangke16 commented 4 years ago

Dear Andrea, In msmc-im, we constrain the inferred migration rate to be between 0 and 100, and put on regularisation (-beta) to avoid over-fitting. I have seen in simulation that the estimated m(t) shoots up to the maximum when the regularisation value is too small. The current default beta values are designed for human. maybe you could adjust the regularisation value in your case?

Hope this helps, Ke

grillino commented 4 years ago

Dear Ke, thanks for the swift answer! I have been using <--beta 1e-6>. Would you have a suggestion on what values to try? I understand I should try it higher? Does it depend on levels of variation or on what else? Thanks a lot again, Andrea

wangke16 commented 4 years ago

Dear Andrea, I guess you are using the old version of msmc-im. The latest version has default setting of <-beta 1e-8,1e-6> , where 1e-8 is for migration rate and 1e-6 is for effective population size. These values are chosen based on exploratory simulations. Please try the latest version of msmc-im first, and try higher value if you still get extremely high migration rate with the lastest version. Ke