Population growth up to present (gen. 0)

6 views
Skip to first unread message

Jared Grummer

unread,
Feb 5, 2025, 4:19:15 PMFeb 5
to msprime-users
Hello!

I'm trying to generate a model where the population went through a bottleneck from gens. (ago) 200,000-30,000, but then expanded from 20,000 gens. ago until the present. My problem is that when you initialize a population at time = 0 with add_population(), you have to give it an initial_size value. However, I want the value at present time/gen. 0 to be whatever the result is since expanding began 20,000 gens. ago. This is what I currently have:

demography = msprime.Demography()
demographic_events=[
demography.add_population(name="All", initial_size = 500), #Size at t=0, recent
#Historic bottleneck, followed by growth
demography.add_population_parameters_change(time=0, population="All", growth_rate=0.01), #population growth from 20k years ago to present
demography.add_population_parameters_change(time=20000, population="All", growth_rate=0.0),
demography.add_instantaneous_bottleneck(time=30000, population="All", strength=170000), #bottleneck of 170k years/gens
demography.add_population_parameters_change(time=200000, population="All", initial_size=100000)
]

So is there a way to have the current size at gen. 0 just be the result of the expansion and not specified by the user with the "initial_size" argument?

Also, tangentially, I believe all population size references are in Ne units, not Nc, except for the sample numbers that refer to either monoploid genomes or individuals?

Thanks!
Jared

Jared Grummer

unread,
Feb 10, 2025, 3:28:14 PMFeb 10
to msprime-users
Hi Peter,

Thanks a lot for the response! I have calculated the growth rate to get the population size to ~what it "should" be in the present, but that growth rate is also for a population that is coming out of a previous bottleneck, so I'm not sure what the pop. size starts at in the past, to give it the right growth rate to get to the currently estimated Ne. But, that's no one's problem but mine!

All of my units are in generations and Ne, so hopefully we're getting at the right number of individuals!

Thanks again,
Jared

Hello, Jared. Briefly, I think the answer to your question is "no" - in other words, you need to work out what that modern-day size would be separately, and then specify it. It would be convenient to have either forwards- or backwards-time model specification in some cases, but there isn't.

And:
> Also, tangentially, I believe all population size references are in Ne units, not Nc, except for the sample numbers that refer to either monoploid genomes or individuals?

It is possible to think about things in this way, if you are familiar with coalescent theory.. I prefer to instead use more interpretable units: if you set all population sizes in units of 'individuals' and times in units of 'generations', then it's easier (for me) to keep things straight. It's true that msprime is a coalescent model, so is simulating back through a WF population (or something like it), for which Ne=Nc (if by "Nc" you mean the census size, anyhow).

happy coalescing,
--peter
Reply all
Reply to author
Forward
0 new messages