Calculating posterior over all loci

80 views
Skip to first unread message

Eric Crandall

unread,
Jan 27, 2022, 8:47:01 PM1/27/22
to migrate-support
While I appreciate the migrate PDF and bayesfile output of posterior distributions, I prefer to do my own statistics and figures from the bayesallfile. I have now (finally!) completed my first multi locus migrate-n run, with 109 haplotypes. Results seem to have converged well, but I would like to better understand how you calculate the posterior across loci, assuming constant mutation rate across loci.

Peter Beerli

unread,
Jan 27, 2022, 10:49:08 PM1/27/22
to migrate...@googlegroups.com
Eric,
check out Beerli and Palczewski 2010:
migrate takes each posterior histogram for each locus, smooth them, then uses log and adds up these logs,
this has the problem that the posterior per locus are prior*likelihood, so naively the summing the log*posterior will overvaluing the prior,
After our 2010 paper we correct for that (essentially removing the effect of nloci-1 priors) but still needs to account for potential interactions and multiply with a constant (again see 2010 and Palczewski 2014, a book chapter in:

@book{chen2014bayesian,
date-added = {2014-09-13 23:08:01 +0000},
date-modified = {2014-09-13 23:08:33 +0000},
editor = {Chen, Ming-Hui and Kuo, Lynn and Lewis, Paul O},
publisher = {CRC Press},
title = {Bayesian Phylogenetics: Methods, Algorithms, and Applications},
year = {2014}}


@article{beerli:2010,
author = {Beerli, P and Palczewski, M},
doi = {10.1534/genetics.109.112532},
journal = {Genetics},
pages = {313--326},
pmid = {15375243860730196870related:hjPUbdTWX9UJ},
rating = {0},
title = {Unified Framework to Evaluate Panmixia and Migration Direction Among Multiple Sampling Locations},
volume = {185},
year = {2010},
}

This all makes it rather difficult to do the statistics ‘by hand’ I fear
best,
Peter


On Jan 27, 2022, at 8:47 PM, Eric Crandall <eric.d....@gmail.com> wrote:

While I appreciate the migrate PDF and bayesfile output of posterior distributions, I prefer to do my own statistics and figures from the bayesallfile. I have now (finally!) completed my first multi locus migrate-n run, with 109 haplotypes. Results seem to have converged well, but I would like to better understand how you calculate the posterior across loci, assuming constant mutation rate across loci.

--
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/1e4c4ff5-07fd-41c4-aa52-4cbc625b523fn%40googlegroups.com.

Eric Crandall

unread,
Jan 31, 2022, 11:46:22 PM1/31/22
to migrate-support
I definitely know those papers, but not sure I can follow the math well enough to do those calculations myself. Is it something where you could have migrate read through the bayesallfile at the end of the run and create a new all-locus posterior? You could call it bayesalllocusfile :-)

Cheers,
Eric

Himal Shrestha

unread,
Sep 12, 2022, 9:51:45 AM9/12/22
to migrate-support
Is there any update on this question? I have accessed the posterior parameters sampled for each locus with the bayesall option. However, I need the posterior estimates for all loci combined, and I am having difficulty calculating those. Any help would be appreciated.

Thanks,
Himal

Reply all
Reply to author
Forward
0 new messages