-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2591c7c
commit 6d3e934
Showing
3 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Population size,"2,940,000",Ancestral pop. size | ||
Population size,"1,570,000",Mallard pop. size | ||
Population size,"1,370,000",Black duck pop. size | ||
Migration rate (x10^-6 per gen.),0.84,Black-Mallard migration rate | ||
Migration rate (x10^-6 per gen.),1.10,Mallard-Black migration rate | ||
Epoch Time (gen.),"158076",Mallard/Black split time | ||
Generation time (yrs.),4,Generation time | ||
Mutation rate (subst/gen),4.83e-9,Mutation rate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import msprime | ||
|
||
import stdpopsim | ||
|
||
_species = stdpopsim.get_species("AnaPla") | ||
|
||
|
||
def _mallard_black_split(): | ||
id = "MallardBlackDuck_2L19" | ||
description = "North American Mallard/Black Duck split" | ||
long_description = """ | ||
This is a model fit to contemporary samples of wild North American | ||
mallard and black duck, using the "split-migration" model of dadi. | ||
See Figure 6 of Lavretsky et al 2019. | ||
""" | ||
T = 632305 / 4 # in generations | ||
N_BlackDuck = 1.57e6 | ||
N_Mallard = 1.37e6 | ||
N_Anc = N_BlackDuck + N_Mallard | ||
# the migration rate is given in forwards time relative to the ancestral | ||
# population size | ||
m_bm = (2.82 / N_Anc) * N_Mallard / N_BlackDuck | ||
m_mb = (2.82 / N_Anc) * N_BlackDuck / N_Mallard | ||
|
||
model = msprime.Demography() | ||
model.add_population( | ||
initial_size=N_Mallard, | ||
name="Mallard", | ||
description="Wild North American mallards", | ||
) | ||
model.add_population( | ||
initial_size=N_BlackDuck, | ||
name="Black_duck", | ||
description="Wild black ducks", | ||
) | ||
model.add_population( | ||
initial_size=N_Anc, | ||
name="Ancestral", | ||
description="Ancestral population", | ||
) | ||
model.set_migration_rate(rate=m_bm, source="Black_duck", dest="Mallard") | ||
model.set_migration_rate(rate=m_mb, source="Mallard", dest="Black_duck") | ||
|
||
model.add_population_split( | ||
time=T, derived=["Mallard", "Black_duck"], ancestral="Ancestral" | ||
) | ||
|
||
return stdpopsim.DemographicModel( | ||
id=id, | ||
description=description, | ||
long_description=long_description, | ||
citations=[ | ||
stdpopsim.Citation( | ||
author="Lavretsky et al.", | ||
year=2019, | ||
doi="https://doi.org/10.1111/mec.15343", | ||
reasons={stdpopsim.CiteReason.DEM_MODEL}, | ||
) | ||
], | ||
generation_time=4, | ||
model=model, | ||
# mutation_rate=4.83e-9, | ||
) | ||
|
||
|
||
_species.add_demographic_model(_mallard_black_split()) |