Problem runnin DIVERGE MODELS

80 views
Skip to first unread message

Vanina Castroagudin

unread,
Oct 28, 2021, 6:44:32 PM10/28/21
to migrate-support


Dear Peter and migrate-support users,

I run migrate-4.4.4 using different migration models among populations. When I incorporate the D parameters in the matrix, the program gives me an error in the output saying:

4> ERROR in file src/bayes.c on line 503
ERROR found nan

and it seems that for some reason the program switches from Microsat to sequences ( see consoleLog.txt). How can I solve this problem? What am I doing wrong?

If I change the mutation model to panmitic ( all *), the infile and parmfile run without problems so it doesn't seem to be a typo mistake. 

Thanks in advance,

Vanina

infile
LOG.txt
parmfile_modelB
outfile.txt
consoleLog.txt

Peter Beerli

unread,
Oct 29, 2021, 3:09:39 PM10/29/21
to migrate...@googlegroups.com
Dear Vanina,

thanks for this report, it helped to find an issue that I will fix soon. In the meantime there is a way to work around it

Remedy
the Slice sampling for the divergence parameter is broken; set this:
bayes-proposals= DIVERGENCE METRO Sampler
bayes-proposals= DIVERGENCESTD METRO Sampler
[In general for data that has good acceptance ratios, like yours, slice sampling seems to be more work than Metropolis-Hastings sampling]

and it seems that for some reason the program switches from Microsat to sequences ( see consoleLog.txt). How can I solve this problem? What am I doing wrong?
Yes this is a bug, it is inconsequental for the run because it is only a reporting issue, but still should not happen, it is triggered by the option 
mutation=ESTIMATE  
this option will not work with your type of data, you need dated samples at different time points
set it to
mutation=CONSTANT

Estimating a mutation rate would not work well with your data,
because it is not very informative at all there is very little variation in the data. I wondered also about some of the loci, 
for example the first locus has 13 8.11 heterozygotes, 4 8.12 heterozygotes, 1 8.13 heterozygote and 1 11.11 homozygote, this combination seems tremendously improbable,

If I change the mutation model to panmitic ( all *), the infile and parmfile run without problems so it doesn't seem to be a typo mistake. 
custom-migration={*** *** ***} is NOT a panmictic model, it is the n-island model with 3 population sizes and 6 independent immigration parameter. Custom-migration and population-relabel are tied together if population-relabel = {1, 2, 3} [as in your parmfile] then we have 3 populations.
To run a panmictic model you need to set the option
population-relabel={1 ,1, 1}
with that, any content of the custom-migration options will be not used.

Hope this helps,
Peter



--
You received this message because you are subscribed to the Google Groups "migrate-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to migrate-suppo...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/migrate-support/3938e0a0-877a-4e7c-8637-7d99c6a6606an%40googlegroups.com.
<infile><LOG.txt><parmfile_modelB><outfile.txt><consoleLog.txt>

Reply all
Reply to author
Forward
0 new messages