Set individual priors for SPLIT and SPLITSTD

142 views
Skip to first unread message

Eric Crandall

unread,
Apr 17, 2022, 2:49:39 PM4/17/22
to migrate-support
I'm trying to set individual priors for the following 9 population divergence model

custom-migration={
*0000d000
0*0000000
0D*000000
00D*00000
000D*0000
0000D*000
00000D*00
000000D*0
0000000D*
}

In other words population 2 gave birth to 3, which gave birth to 4, etc., except that population 6 gave birth to 1.

I would like to set the prior for the SPLIT from 6 to 1 to be very recent (because we hypothesize an anthropogenic introduction). However, I can't seem to do it.

If I set:
bayes-priors= SPLIT * * UNIFORMPRIOR: 0 1000 100
bayes-priors= SPLITSTD * * UNIFORMPRIOR: 0 1000 100
bayes-priors= SPLIT 6 1 UNIFORMPRIOR: 0.000000 1.000000 0.100000 
bayes-priors= SPLITSTD 6 1 UNIFORMPRIOR: 1.000000 0.100000 100.000000 

Then it sets all priors to 0 1000 100, including 6 to 1

If I set individual priors on all SPLIT and SPLITSTD priors:

bayes-priors= SPLIT 6 1 UNIFORMPRIOR: 0.000000 1.000000 0.100000
bayes-priors= SPLIT 2 3 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLIT 3 4 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLIT 4 5 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLIT 5 6 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLIT 6 7 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLIT 7 8 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLIT 8 9 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLITSTD 6 1 UNIFORMPRIOR: 1.000000 0.100000 100.000000
bayes-priors= SPLITSTD 2 3 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLITSTD 3 4 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLITSTD 4 5 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLITSTD 5 6 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLITSTD 6 7 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLITSTD 7 8 UNIFORMPRIOR: 0.000000 1000.000000 100.000000
bayes-priors= SPLITSTD 8 9 UNIFORMPRIOR: 0.000000 1000.000000 100.000000 

Then I get 


```

0> ERROR in file src/priors.c on line 1066

ERROR source is NULL

```


Do individual priors not yet work for population splitting?

Peter Beerli

unread,
Apr 17, 2022, 10:11:23 PM4/17/22
to migrate...@googlegroups.com
Eric,

I did a short test and that also a has a problem, so I will need to investigate (when I worked on the individual priors this was mostly done with 2 populations and not with divergence because the wide prior should be overpowered by the data when the event really had some impact.
but one thing you MUST change, the time units are in genration*mutation so upper bounds of 1 or 1000 seem way too large, I usually use values that are near the upper bounds of Theta. In principle what you try to do should work, but I will need to investigate on that. One more caveat: any model with divergence and migration I would trust much less because there is an interaction between a high migration rate and divergence time.  

Peter
P.S.  I have not forgotten your request on showing the thermodynamic scalar so that you can generate the posterior plots by yourself, but I am not there yet.

--
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/3cf780d6-a526-41c8-8b3f-d1d96e03d31an%40googlegroups.com.

Eric Crandall

unread,
Apr 18, 2022, 10:55:56 AM4/18/22
to migrate-support
Thanks for the heads up. I must have been thinking about per locus values from IM or something. I will use the same windowed exponential priors I use for theta then. 

Incidentally, if I use divergence-distrib=E(xponential) then do I need to have a SPLITSTD prior?

Also, I am confused about whether I can have d or D parameters in the same model that I have * for migration parameters. Could I have the following matrix (with d in the 6th column, 1st row). So its in gene-flow drift equilibrium everywhere, but population 1 is divergent from 6. It kinda doesn't make sense to me to have such a model, but in a previous forum answer you seemed to say it was possible. Migrate will run this model for me, but it never seems to complete...


custom-migration={
*0000d000
0**000000
0***00000
00***0000
000***000
0000***00
00000***0
000000***
0000000**
}



Eric Crandall

unread,
Apr 18, 2022, 10:56:33 AM4/18/22
to migrate-support
And thanks. I'm glad my request is still on your radar!

Peter Beerli

unread,
Apr 18, 2022, 11:31:44 AM4/18/22
to migrate...@googlegroups.com
Eric,
in a model with
{x0d 0x0 0xx} you would have: 3 is ancestor of 1 and 2->3  [this should work but sometimes if the data strongly disagrees with the model it will be difficult to run this, although these models should eventually finish because in migrate’s mcmc there is a finite number of steps, the only problem I can see is that the system inserts too many immigration events that slows down the problem to a crawl.]

if you do a similar model with D
{x0D 0x0 0xx} you would have: 3 is ancestor of 1 and there is ongoing migration from 3->1 and 2->3, essentially this would be very similar to
{x0x 0x0 0xx} 

d = just split
D = split with migration later
x (offdiagonal)  migration (assuming divergence is so far in the past that the samples coalesced via migration before that (goin bakc in time)
in terms of convergence Theta converges faster than migration and both coverge much faster than divergence 
runtime Theta < M < d < D

Peter



Eric

unread,
Feb 23, 2024, 1:08:35 PMFeb 23
to migrate-support
Hey Peter - just wanted to ping you on possibly fixing this. 

We've re-run the analysis and gotten reasonable results with Migrate 5.0.3 but it is still giving us an old divergence on what we are pretty sure is an anthropogenic introduction from Oahu to the northwest Hawaiian islands. I'd like to put a separate prior on that divergence to see what happens :-)

Thanks!

Eric

Peter Beerli

unread,
Mar 15, 2024, 3:00:24 PMMar 15
to migrate...@googlegroups.com
Eric,
I added a fix (hopefully): in the parmfile (I did not check the menu input)
use something like this:

bayes-priors= SPLIT 2 1 GAMMAPRIOR: 0.0 0.1 0.9 1.5

bayes-priors= SPLIT 3 2 GAMMAPRIOR: 0.0 0.5 0.9 2.0

bayes-priors= SPLITSTD * * GAMMAPRIOR: 0.0 0.5 0.9 1.0


the connection matrix for the above would be xd0 0xd 00x
the gamma prior to the split would have different means but the same range and different alphas.
The prior for the standard deviation will be the same for all splits.

Let me know if this works or fails.

Peter






Reply all
Reply to author
Forward
0 new messages