Skip to content

Commit

Permalink
Added Papio Anubis genome, recombination map, and demographic model
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhbelsare committed May 10, 2022
1 parent 2d9d9ed commit 75347ae
Show file tree
Hide file tree
Showing 7 changed files with 523 additions and 1 deletion.
5 changes: 5 additions & 0 deletions stdpopsim/catalog/PapAnu/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""
Catalog definitions for PapAnu (Ensembl ID='papio_anubis')
"""
from . import species # noqa: F401
from . import demographic_models # noqa: F401
264 changes: 264 additions & 0 deletions stdpopsim/catalog/PapAnu/demographic_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
import msprime
import numpy as np
import stdpopsim

_species = stdpopsim.get_species("PapAnu")


def _pap_anu():
# the size during the interval times[k] to times[k+1] = sizes[k]
times = np.array(
[
0.0000,
122.4133,
131.8160,
141.9409,
152.8436,
164.5836,
177.2255,
190.8383,
205.4968,
221.2812,
238.2781,
256.5804,
276.2886,
297.5106,
320.3627,
344.9701,
371.4676,
400.0004,
430.7248,
463.8092,
499.4349,
537.7970,
579.1057,
623.5874,
671.4857,
723.0632,
778.6024,
838.4076,
902.8066,
972.1520,
1046.8240,
1127.2316,
1213.8153,
1307.0497,
1407.4455,
1515.5528,
1631.9639,
1757.3167,
1892.2979,
2037.6472,
2194.1609,
2362.6966,
2544.1776,
2739.5984,
2950.0297,
3176.6244,
3420.6241,
3683.3656,
3966.2886,
4270.9432,
4598.9986,
4952.2522,
5332.6396,
5742.2450,
6183.3125,
6658.2589,
7169.6864,
7720.3971,
8313.4085,
8951.9696,
9639.5793,
10380.0050,
11177.3035,
12035.8432,
12960.3283,
13955.8240,
15027.7847,
16182.0838,
17425.0457,
18763.4807,
20204.7223,
21756.6671,
23427.8183,
25227.3323,
27165.0688,
29251.6447,
31498.4925,
33917.9230,
36523.1924,
39328.5751,
42349.4420,
45602.3447,
49105.1060,
52876.9180,
56938.4466,
61311.9452,
66021.3766,
71092.5441,
76553.2330,
82433.3628,
88765.1513,
95583.2907,
102925.1382,
110830.9203,
119343.9533,
128510.8808,
138381.9292,
149011.1826,
160456.8795,
172781.7318,
186053.2682,
]
)
sizes = np.array(
[
335505.4808,
335505.4808,
335505.4808,
335505.4808,
335505.4808,
335505.4808,
335505.4808,
335505.4808,
335505.4808,
120758.1302,
120758.1302,
120758.1302,
120758.1302,
120758.1302,
120758.1302,
120758.1302,
120758.1302,
120758.1302,
120758.1302,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
51822.58297,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
41841.54229,
30714.33863,
30714.33863,
30714.33863,
30714.33863,
30714.33863,
30714.33863,
30714.33863,
30714.33863,
72998.86202,
72998.86202,
72998.86202,
72998.86202,
72998.86202,
72998.86202,
55968.42221,
55968.42221,
55968.42221,
55968.42221,
55968.42221,
55968.42221,
55968.42221,
93362.02606,
]
)

demographic_events = []
for sz, t in zip(sizes, times):
demographic_events.append(
msprime.PopulationParametersChange(time=t, initial_size=sz, population_id=0)
)
populations = [
stdpopsim.Population(
id="PAnubis_SNPRC",
description="Papio Anubis population from SNPRC",
)
]

return stdpopsim.DemographicModel(
id="SinglePopSMCpp_1W22",
description="SMC++ estimates of N(t) for Papio Anubis individuals",
long_description="""
These estimates were obtained from a sample Papio Anubis
individuals from the colony housed at the Southwest National
Primate Research Center (SNPRC). SMC++ was run with a subset of
36 individuals from the population.
""",
populations=populations,
citations=[
stdpopsim.Citation(
doi="https://doi.org/10.1093/gbe/evac040",
year=2022,
author="Wall et. al.",
reasons={stdpopsim.CiteReason.DEM_MODEL},
)
],
# citations for generation time and mutation rate can be
# found in species.py
generation_time=11,
mutation_rate=5.7 * 10e-9,
demographic_events=demographic_events,
population_configurations=[
msprime.PopulationConfiguration(
initial_size=335505, metadata=populations[0].asdict()
)
],
)


_species.add_demographic_model(_pap_anu())
30 changes: 30 additions & 0 deletions stdpopsim/catalog/PapAnu/genetic_maps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import stdpopsim


_species = stdpopsim.get_species("PapAnu")

_gm = stdpopsim.GeneticMap(
species=_species,
id="Pyrho_PAnubis1.0",
description="Pyrho inferred genetic map for Papio Anubis",
long_description="""
These estimates were obtained from a sample Papio Anubis
individuals from the colony housed at the Southwest National
Primate Research Center (SNPRC).
""",
url=(
"https://stdpopsim.s3-us-west-2.amazonaws.com/genetic_maps/"
"PapAnu/Pyrho_PAnubis1.0.tar.gz"
),
sha256="",
file_pattern="Pyrho_PAnubis1.0_chr{id}.txt",
citations=[
stdpopsim.Citation(
year=2022,
author="Wall et. al.",
doi="https://doi.org/10.1093/gbe/evac040",
reasons={stdpopsim.CiteReason.GEN_MAP},
),
],
)
_species.add_genetic_map(_gm)
29 changes: 29 additions & 0 deletions stdpopsim/catalog/PapAnu/genome_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# File autogenerated from Ensembl REST API. Do not edit.
data = {
"assembly_accession": "GCA_008728515.1",
"assembly_name": "Panubis1.0",
"chromosomes": {
"1": {"length": 218172882, "synonyms": []},
"2": {"length": 193660750, "synonyms": []},
"3": {"length": 184919515, "synonyms": []},
"4": {"length": 182120902, "synonyms": []},
"5": {"length": 173900761, "synonyms": []},
"6": {"length": 167138247, "synonyms": []},
"7": {"length": 161768468, "synonyms": []},
"8": {"length": 140274886, "synonyms": []},
"9": {"length": 127591819, "synonyms": []},
"10": {"length": 126462689, "synonyms": []},
"11": {"length": 125913696, "synonyms": []},
"12": {"length": 123343450, "synonyms": []},
"13": {"length": 106849001, "synonyms": []},
"14": {"length": 106654974, "synonyms": []},
"15": {"length": 91985775, "synonyms": []},
"16": {"length": 91184193, "synonyms": []},
"17": {"length": 74525926, "synonyms": []},
"18": {"length": 72894408, "synonyms": []},
"19": {"length": 72123344, "synonyms": []},
"20": {"length": 50021108, "synonyms": []},
"X": {"length": 142711496, "synonyms": []},
"Y": {"length": 8309886, "synonyms": []},
},
}
Loading

0 comments on commit 75347ae

Please sign in to comment.