From 9f959e23b9ea53d38a9cbd1a94bd9c0de309512a Mon Sep 17 00:00:00 2001 From: vcaudill Date: Fri, 9 Apr 2021 16:11:49 -0700 Subject: [PATCH] started Anole demographic model not complete yet --- docs/parameter_tables/AnoCar/Anole_5B19.csv | 6 ++ stdpopsim/catalog/AnoCar/__init__.py | 1 + .../catalog/AnoCar/demographic_models.py | 75 +++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 docs/parameter_tables/AnoCar/Anole_5B19.csv create mode 100644 stdpopsim/catalog/AnoCar/demographic_models.py diff --git a/docs/parameter_tables/AnoCar/Anole_5B19.csv b/docs/parameter_tables/AnoCar/Anole_5B19.csv new file mode 100644 index 000000000..070293ac1 --- /dev/null +++ b/docs/parameter_tables/AnoCar/Anole_5B19.csv @@ -0,0 +1,6 @@ +Population size,"6,755,470",Eastern Florda (EF) pop. size +Migration rate, 2.36E-07,GA-EF migration rate +Migration rate, 1.93E-07,EF-GA migration rate +Epoch Time (gen.),"2023869",GA/EF split time +Generation time (yrs.),1.5,Generation time +Mutation rate (subst/1yr),2.1e-10,Mutation rate diff --git a/stdpopsim/catalog/AnoCar/__init__.py b/stdpopsim/catalog/AnoCar/__init__.py index 30cbab0fd..302ca5e48 100644 --- a/stdpopsim/catalog/AnoCar/__init__.py +++ b/stdpopsim/catalog/AnoCar/__init__.py @@ -2,3 +2,4 @@ Catalog definitions for AnoCar (Ensembl ID='anolis_carolinensis') """ from . import species # noqa: F401 +from . import demographic_models # noqa: F401 diff --git a/stdpopsim/catalog/AnoCar/demographic_models.py b/stdpopsim/catalog/AnoCar/demographic_models.py new file mode 100644 index 000000000..2a126bd1a --- /dev/null +++ b/stdpopsim/catalog/AnoCar/demographic_models.py @@ -0,0 +1,75 @@ +import msprime + +import stdpopsim + +_species = stdpopsim.get_species("AnoCar") + + +def _GA_vs_EF_IMex(): + id = "Anoli_5B19" + description = "Anoli GA-EK split" + long_description = """ + This is a model fit to whole genomes of Anolis carolinesis + using five populations and fitting a model of + isolation with constant migration and no interruption + of gene flow. + See Figure 3 and table 2 Bourgeois et al 2019. + """ + T = 1 # in generations + N_GulfAtlantic = 364329 + N_EasternFlorida = 6755470 + N_Anc = 2156641 + # the migration rate + m_ge = 2.36e-07 + m_eg = 1.93e-07 + # Tsc, time during which stable populations stay connected + # Tscg, time since population size change (with gene flow) + # Tsc = 61217 + # Tscg = 1962652 + # after inital split initial populations have a population + # size of N_GulfAtlantic_a and N_EasternFlorida_a + # N_GulfAtlantic_a = 5971380 + # N_EasternFlorida_a = 2137291 + + model = msprime.Demography() + model.add_population( + initial_size=N_GulfAtlantic, + name="Gulf_Atlantic", + description="Anoles from Gulf Atlantic", + ) + model.add_population( + initial_size=N_EasternFlorida, + name="Eastern_Florida", + description="Anoles from Eastern Florida", + ) + model.add_population( + initial_size=N_Anc, + name="Ancestral", + description="Ancestral population", + ) + model.set_migration_rate(rate=m_ge, source="Gulf_Atlantic", dest="Eastern_Florida") + model.set_migration_rate(rate=m_eg, source="Eastern_Florida", dest="Gulf_Atlantic") + + model.add_population_split( + time=T, derived=["Gulf_Atlantic", "Eastern_Florida"], ancestral="Ancestral" + ) + + return stdpopsim.DemographicModel( + id=id, + description=description, + long_description=long_description, + citations=[ + stdpopsim.Citation( + author="Bourgeois et al.", + year=2019, + doi="https://doi.org/10.1093/gbe/evz110", + reasons={stdpopsim.CiteReason.DEM_MODEL}, + ) + ], + generation_time=1.5, + model=model, + # mutation_rate=2.1e-10, + ) + + +_species.add_demographic_model(_GA_vs_EF_IMex)