Hello Ryan,
I ran 1D demographic models for a population which we suspect has undergone population contraction at a known time T in the past; T was thus fixed in the model (and theta inferred). I optimized four possible models: neutral, growth, two-epochs and bottlegrowth.
After the optimization, out of 4 models ranked by log likelihood (growth -43614 > bottleneck + growth
-79543 > two-epochs -98970 > neutral -45699816), the best model by far is the model with
growth, with a lot of difference in log likelihood between models (i.e.
well differentiated). However, the growth parameter inferred nu
(ratio of contemporary to ancient effective population size), is very
small (0.00003). Am I understanding well that this translates into a contraction of the effective
population size at the known time T ? It's a bit surprising that
the best model isn't the two epochs then.
Here are the final plots for each model:
Growth
Bottlegrowth

Two-epochs
Neutral
And here is the growth function that I used:
def growth(params, ns, pts):
"""
Exponential growth beginning some time ago.
Tg is a fixed parameter and theta is inferred with the other parameters using multinom = False during optimization
params = (nu,theta)
ns = (n1,)
nu: Ratio of contemporary to ancient population size
Tg: Time in the past at which growth began (in units of 2*Na
generations)
n1: Number of samples in resulting Spectrum
pts: Number of grid points to use in integration.
"""
nu,theta = params
xx = dadi.Numerics.default_grid(pts)
phi = dadi.PhiManip.phi_1D(xx, theta0=theta)
Tg = (168*2.64e-09*319822866)/theta
nu_func = lambda t: np.exp(np.log(nu) * t/Tg)
phi = dadi.Integration.one_pop(phi, xx, T = Tg, nu = nu_func, theta0 = theta)
fs = dadi.Spectrum.from_phi(phi, ns, (xx,))
return fs
These results were obtained with ns = 400 (large size because of pool-seq) and a minimum grid size of 510.
Thank you for your help,
Best wishes,
Mathilde Salamon