Let's consider that the effective population was of size 10 except between 2000 and 2010 when it was of size 1 (bottleneck model). Ten samples per year are taken at uniform timepoints between 1990 and 2020. We can simulate such a phylogeny using:
library(ape) library(mlesky) set.seed(0) alphaFun=function(x){if (x<2000 || x>2010) 10 else 1} sampleDates=seq(1990,2020,0.1) t=simCoal(sampleDates,alphaFun) plotBoth(t,alphaFun)
We now infer the past population size given the phylogeny:
fit=mlskygrid(t,res=NULL,tau=NULL,tau_lower = 1,tau_upper = 10000,ncpu=2) plot(fit)
Parametric bootstrap:
par <- parboot(fit) plot(par)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.