Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

started Anole demographic model not complete yet #901

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/parameter_tables/AnoCar/Anole_5B19.csv
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions stdpopsim/catalog/AnoCar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Catalog definitions for AnoCar (Ensembl ID='anolis_carolinensis')
"""
from . import species # noqa: F401
from . import demographic_models # noqa: F401
75 changes: 75 additions & 0 deletions stdpopsim/catalog/AnoCar/demographic_models.py
Original file line number Diff line number Diff line change
@@ -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)