diff --git a/docs/parameter_tables/BosTau/Angus_1B16.csv b/docs/parameter_tables/BosTau/Angus_1B16.csv new file mode 100644 index 000000000..22685ea58 --- /dev/null +++ b/docs/parameter_tables/BosTau/Angus_1B16.csv @@ -0,0 +1,44 @@ +Population size,"33,810",Ancestral population size +Population size,"56,981",Pop. size during 1st time interval +Population size,"85,228",Pop. size during 2nd time interval +Population size,"87,426",Pop. size during 3rd time interval +Population size,"83,576",Pop. size during 4th time interval +Population size,"80,651",Pop. size during 5th time interval +Population size,"69,328",Pop. size during 6th time interval +Population size,"56,775",Pop. size during 7th time interval +Population size,"47,892",Pop. size during 8th time interval +Population size,"35,998",Pop. size during 9th time interval +Population size,"24,300",Pop. size during 10th time interval +Population size,"16,441",Pop. size during 11th time interval +Population size,"12,042",Pop. size during 12th time interval +Population size,"10,827",Pop. size during 13th time interval +Population size,"6,837",Pop. size during 14th time interval +Population size,"4,836",Pop. size during 15th time interval +Population size,"2,558",Pop. size during 16th time interval +Population size,"1,224",Pop. size during 17th time interval +Population size,"709",Pop. size during 18th time interval +Population size,"412",Pop. size during 19th time interval +Population size,"291",Pop. size during 20th time interval +Time (gen.),"129,999",Begining of 1st time interval +Time (gen.),"83,043",Begining of 2nd time interval +Time (gen.),"53,045",Begining of 3rd time interval +Time (gen.),"33,881",Begining of 4th time interval +Time (gen.),"21,638",Begining of 5th time interval +Time (gen.),"13,817",Begining of 6th time interval +Time (gen.),"8,821",Begining of 7th time interval +Time (gen.),"5,629",Begining of 8th time interval +Time (gen.),"3,590",Begining of 9th time interval +Time (gen.),"2,287",Begining of 10th time interval +Time (gen.),"1,455",Begining of 11th time interval +Time (gen.),"923",Begining of 12th time interval +Time (gen.),"584",Begining of 13th time interval +Time (gen.),"367",Begining of 14th time interval +Time (gen.),"228",Begining of 15th time interval +Time (gen.),"139",Begining of 16th time interval +Time (gen.),"83",Begining of 17th time interval +Time (gen.),"47",Begining of 18th time interval +Time (gen.),"24",Begining of 19th time interval +Time (gen.),"9",Begining of 20th time interval +Generation time (yrs.),5,Generation time +Mutation rate,1e-8,Per-base per-generation mutation rate +Recombination rate,5.00e-9,Per-base per-generation recombination rate diff --git a/docs/parameter_tables/BosTau/Fleckvieh_1B16.csv b/docs/parameter_tables/BosTau/Fleckvieh_1B16.csv new file mode 100644 index 000000000..9f02fa41c --- /dev/null +++ b/docs/parameter_tables/BosTau/Fleckvieh_1B16.csv @@ -0,0 +1,44 @@ +Population size,"31,131",Ancestral population size +Population size,"70,789",Pop. size during 1st time interval +Population size,"91,228",Pop. size during 2nd time interval +Population size,"85,607",Pop. size during 3rd time interval +Population size,"82,448",Pop. size during 4th time interval +Population size,"82,844",Pop. size during 5th time interval +Population size,"72,920",Pop. size during 6th time interval +Population size,"61,479",Pop. size during 7th time interval +Population size,"54,358",Pop. size during 8th time interval +Population size,"38,069",Pop. size during 9th time interval +Population size,"28,547",Pop. size during 10th time interval +Population size,"20,963",Pop. size during 11th time interval +Population size,"18,176",Pop. size during 12th time interval +Population size,"13,604",Pop. size during 13th time interval +Population size,"10,546",Pop. size during 14th time interval +Population size,"7,414",Pop. size during 15th time interval +Population size,"5,689",Pop. size during 16th time interval +Population size,"4,184",Pop. size during 17th time interval +Population size,"3,395",Pop. size during 18th time interval +Population size,"2,812",Pop. size during 19th time interval +Population size,"2,227",Pop. size during 20th time interval +Time (gen.),"129,999",Begining of 1st time interval +Time (gen.),"83,043",Begining of 2nd time interval +Time (gen.),"53,045",Begining of 3rd time interval +Time (gen.),"33,881",Begining of 4th time interval +Time (gen.),"21,638",Begining of 5th time interval +Time (gen.),"13,817",Begining of 6th time interval +Time (gen.),"8,821",Begining of 7th time interval +Time (gen.),"5,629",Begining of 8th time interval +Time (gen.),"3,590",Begining of 9th time interval +Time (gen.),"2,287",Begining of 10th time interval +Time (gen.),"1,455",Begining of 11th time interval +Time (gen.),"923",Begining of 12th time interval +Time (gen.),"584",Begining of 13th time interval +Time (gen.),"367",Begining of 14th time interval +Time (gen.),"228",Begining of 15th time interval +Time (gen.),"139",Begining of 16th time interval +Time (gen.),"83",Begining of 17th time interval +Time (gen.),"47",Begining of 18th time interval +Time (gen.),"24",Begining of 19th time interval +Time (gen.),"9",Begining of 20th time interval +Generation time (yrs.),5,Generation time +Mutation rate,1e-8,Per-base per-generation mutation rate +Recombination rate,3.89e-9,Per-base per-generation recombination rate diff --git a/docs/parameter_tables/BosTau/HolsteinFriesian_1B16.csv b/docs/parameter_tables/BosTau/HolsteinFriesian_1B16.csv new file mode 100644 index 000000000..1e204fd27 --- /dev/null +++ b/docs/parameter_tables/BosTau/HolsteinFriesian_1B16.csv @@ -0,0 +1,44 @@ +Population size,"31,652",Ancestral population size +Population size,"65,485",Pop. size during 1st time interval +Population size,"86,206",Pop. size during 2nd time interval +Population size,"79,079",Pop. size during 3rd time interval +Population size,"71,209",Pop. size during 4th time interval +Population size,"72,841",Pop. size during 5th time interval +Population size,"63,092",Pop. size during 6th time interval +Population size,"52,882",Pop. size during 7th time interval +Population size,"50,726",Pop. size during 8th time interval +Population size,"36,512",Pop. size during 9th time interval +Population size,"27,155",Pop. size during 10th time interval +Population size,"23,783",Pop. size during 11th time interval +Population size,"20,159",Pop. size during 12th time interval +Population size,"15,602",Pop. size during 13th time interval +Population size,"11,367",Pop. size during 14th time interval +Population size,"6,908",Pop. size during 15th time interval +Population size,"3,892",Pop. size during 16th time interval +Population size,"1,815",Pop. size during 17th time interval +Population size,"1,320",Pop. size during 18th time interval +Population size,"1,076",Pop. size during 19th time interval +Population size,"793",Pop. size during 20th time interval +Time (gen.),"129,999",Begining of 1st time interval +Time (gen.),"83,043",Begining of 2nd time interval +Time (gen.),"53,045",Begining of 3rd time interval +Time (gen.),"33,881",Begining of 4th time interval +Time (gen.),"21,638",Begining of 5th time interval +Time (gen.),"13,817",Begining of 6th time interval +Time (gen.),"8,821",Begining of 7th time interval +Time (gen.),"5,629",Begining of 8th time interval +Time (gen.),"3,590",Begining of 9th time interval +Time (gen.),"2,287",Begining of 10th time interval +Time (gen.),"1,455",Begining of 11th time interval +Time (gen.),"923",Begining of 12th time interval +Time (gen.),"584",Begining of 13th time interval +Time (gen.),"367",Begining of 14th time interval +Time (gen.),"228",Begining of 15th time interval +Time (gen.),"139",Begining of 16th time interval +Time (gen.),"83",Begining of 17th time interval +Time (gen.),"47",Begining of 18th time interval +Time (gen.),"24",Begining of 19th time interval +Time (gen.),"9",Begining of 20th time interval +Generation time (yrs.),5,Generation time +Mutation rate,1e-8,Per-base per-generation mutation rate +Recombination rate,3.66e-9,Per-base per-generation recombination rate diff --git a/docs/parameter_tables/BosTau/Jersey_1B16.csv b/docs/parameter_tables/BosTau/Jersey_1B16.csv new file mode 100644 index 000000000..e2db71f80 --- /dev/null +++ b/docs/parameter_tables/BosTau/Jersey_1B16.csv @@ -0,0 +1,44 @@ +Population size,"30,275",Ancestral population size +Population size,"53,856",Pop. size during 1st time interval +Population size,"76,905",Pop. size during 2nd time interval +Population size,"67,505",Pop. size during 3rd time interval +Population size,"75,739",Pop. size during 4th time interval +Population size,"77,971",Pop. size during 5th time interval +Population size,"78,608",Pop. size during 6th time interval +Population size,"63,277",Pop. size during 7th time interval +Population size,"51,777",Pop. size during 8th time interval +Population size,"33,713",Pop. size during 9th time interval +Population size,"22,549",Pop. size during 10th time interval +Population size,"13,960",Pop. size during 11th time interval +Population size,"13,460",Pop. size during 12th time interval +Population size,"10,474",Pop. size during 13th time interval +Population size,"8,106",Pop. size during 14th time interval +Population size,"5,766",Pop. size during 15th time interval +Population size,"3,704",Pop. size during 16th time interval +Population size,"1,640",Pop. size during 17th time interval +Population size,"947",Pop. size during 18th time interval +Population size,"561",Pop. size during 19th time interval +Population size,"388",Pop. size during 20th time interval +Time (gen.),"129,999",Begining of 1st time interval +Time (gen.),"83,043",Begining of 2nd time interval +Time (gen.),"53,045",Begining of 3rd time interval +Time (gen.),"33,881",Begining of 4th time interval +Time (gen.),"21,638",Begining of 5th time interval +Time (gen.),"13,817",Begining of 6th time interval +Time (gen.),"8,821",Begining of 7th time interval +Time (gen.),"5,629",Begining of 8th time interval +Time (gen.),"3,590",Begining of 9th time interval +Time (gen.),"2,287",Begining of 10th time interval +Time (gen.),"1,455",Begining of 11th time interval +Time (gen.),"923",Begining of 12th time interval +Time (gen.),"584",Begining of 13th time interval +Time (gen.),"367",Begining of 14th time interval +Time (gen.),"228",Begining of 15th time interval +Time (gen.),"139",Begining of 16th time interval +Time (gen.),"83",Begining of 17th time interval +Time (gen.),"47",Begining of 18th time interval +Time (gen.),"24",Begining of 19th time interval +Time (gen.),"9",Begining of 20th time interval +Generation time (yrs.),5,Generation time +Mutation rate,1e-8,Per-base per-generation mutation rate +Recombination rate,4.58e-9,Per-base per-generation recombination rate diff --git a/stdpopsim/catalog/BosTau/demographic_models.py b/stdpopsim/catalog/BosTau/demographic_models.py index 614b9d0fc..13e63b1bc 100644 --- a/stdpopsim/catalog/BosTau/demographic_models.py +++ b/stdpopsim/catalog/BosTau/demographic_models.py @@ -11,8 +11,8 @@ def _HolsteinFriesian_1M13(): ) long_description = """ The piecewise-constant population size model of Holstein-Friesian cattle - from MacLeod et al. (2013). Effective population sizes were estimated based - on runs of homozygosity observed in a single individual, + from MacLeod et al. (2013). Effective population sizes were estimated from + runs of homozygosity observed in a single individual, using the following assumptions: a generation interval of 5 years (page 2213), a mutation rate of 0.94e-8 (pages 2221 and 2215), and @@ -39,7 +39,7 @@ def _HolsteinFriesian_1M13(): long_description=long_description, populations=populations, citations=citations, - generation_time=_species.generation_time, + generation_time=5, mutation_rate=0.94e-8, recombination_rate=1e-8, population_configurations=[ @@ -96,7 +96,7 @@ def _HolsteinFriesian_1M13(): msprime.PopulationParametersChange( time=3354, initial_size=17000, population_id=0 ), - # 900,000 generations at 62,000, [33,154-93,3154) + # many generations at 62,000, [33,154-93,3154) msprime.PopulationParametersChange( time=33154, initial_size=62000, population_id=0 ), @@ -105,3 +105,550 @@ def _HolsteinFriesian_1M13(): _species.add_demographic_model(_HolsteinFriesian_1M13()) + + +def _HolsteinFriesian_1B16(): + id = "HolsteinFriesian_1B16" + description = ( + "Piecewise size model for Holstein-Friesian cattle (Boitard et al., 2016)." + ) + long_description = """ + The piecewise-constant population size model of Holstein-Friesian cattle + from Boitard et al. (2016). Effective population sizes were estimated using + Approximate Bayesian Computation with allele frequency spectrum and + linkage-disequlibrium statistics (both on SNPs with minor allele frequency + above 0.2) observed in 25 individuals, + using the following assumptions: + a generation interval of 5 years (page 10), + a mutation rate of 1e-8 (pages 8 and 22), and + a recombination rate of 3.66e-9 (page 15). + Effective population sizes are given in Figure 6, + with exact values provided by the lead author in personal communication. + The 25 individuals' genomes were obtained from the 1000 bull genomes Run 2 + (of which 129 were Holstein-Friesian; + the authors chose 52 from Australia to get a homogeneous sub-population, + kept the least inbred and unrelated samples, and from these randomly selected 25). + """ + populations = [ + stdpopsim.Population(id="Holstein_Friesian", description="Holstein-Friesian"), + ] + citations = [ + stdpopsim.Citation( + author="Boitard et al.", + year=2016, + doi="https://doi.org/10.1371/journal.pgen.1005877", + reasons={stdpopsim.CiteReason.DEM_MODEL}, + ) + ] + return stdpopsim.DemographicModel( + id=id, + description=description, + long_description=long_description, + populations=populations, + citations=citations, + generation_time=5, + mutation_rate=1e-8, + recombination_rate=3.66e-9, + population_configurations=[ + # 9 generations at 793, [0- 9) 9- 0= 9 + msprime.PopulationConfiguration( + initial_size=793, metadata=populations[0].asdict() + ) + ], + # Here 'time' should be in generation notation ie. how many + # generations ago were that Ne (effective population size) + # Note the zero-based counting in the code + demographic_events=[ + # 15 generations at 1076, [9- 24) 24- 9= 15 + msprime.PopulationParametersChange( + time=9, initial_size=1076, population_id=0 + ), + # 23 generations at 1320, [24- 47) 47- 24= 23 + msprime.PopulationParametersChange( + time=24, initial_size=1320, population_id=0 + ), + # 36 generations at 1815, [47- 83) 83- 47= 36 + msprime.PopulationParametersChange( + time=47, initial_size=1815, population_id=0 + ), + # 56 generations at 3892, [83- 139) 139- 83= 56 + msprime.PopulationParametersChange( + time=83, initial_size=3892, population_id=0 + ), + # 89 generations at 6908, [139- 228) 228- 139= 89 + msprime.PopulationParametersChange( + time=139, initial_size=6908, population_id=0 + ), + # 139 generations at 11367, [228- 367) 367- 228= 139 + msprime.PopulationParametersChange( + time=228, initial_size=11367, population_id=0 + ), + # 217 generations at 15602, [367- 584) 584- 367= 217 + msprime.PopulationParametersChange( + time=367, initial_size=15602, population_id=0 + ), + # 339 generations at 20159, [584- 923) 923- 584= 339 + msprime.PopulationParametersChange( + time=584, initial_size=20159, population_id=0 + ), + # 532 generations at 23783, [923- 1455) 1455- 923= 532 + msprime.PopulationParametersChange( + time=923, initial_size=23783, population_id=0 + ), + # 832 generations at 27155, [1455- 2287) 2287- 1455= 832 + msprime.PopulationParametersChange( + time=1455, initial_size=27155, population_id=0 + ), + # 1303 generations at 36512, [2287- 3590) 3590- 2287= 1303 + msprime.PopulationParametersChange( + time=2287, initial_size=36512, population_id=0 + ), + # 2039 generations at 50726, [3590- 5629) 5629- 3590= 2039 + msprime.PopulationParametersChange( + time=3590, initial_size=50726, population_id=0 + ), + # 3192 generations at 52882, [5629- 8821) 8821- 5629= 3192 + msprime.PopulationParametersChange( + time=5629, initial_size=52882, population_id=0 + ), + # 4996 generations at 63092, [8821- 13817) 13817- 8821= 4996 + msprime.PopulationParametersChange( + time=8821, initial_size=63092, population_id=0 + ), + # 7821 generations at 72841, [13817- 21638) 21638-13817= 7821 + msprime.PopulationParametersChange( + time=13817, initial_size=72841, population_id=0 + ), + # 12243 generations at 71209, [21638- 33881) 33881-21638=12243 + msprime.PopulationParametersChange( + time=21638, initial_size=71209, population_id=0 + ), + # 19164 generations at 79079, [33881- 53045) 53045-33881=19164 + msprime.PopulationParametersChange( + time=33881, initial_size=79079, population_id=0 + ), + # 29998 generations at 86206, [53045- 83043) 83043-53045=29998 + msprime.PopulationParametersChange( + time=53045, initial_size=86206, population_id=0 + ), + # 46956 generations at 65485, [83043-129999) 129999-83043=46956 + msprime.PopulationParametersChange( + time=83043, initial_size=65485, population_id=0 + ), + # "many" generations at 31652, [129999-inf) inf-129999="many" + msprime.PopulationParametersChange( + time=129999, initial_size=31652, population_id=0 + ), + ], + ) + + +_species.add_demographic_model(_HolsteinFriesian_1B16()) + + +def _Fleckvieh_1B16(): + id = "Fleckvieh_1B16" + description = "Piecewise size model for Fleckvieh cattle (Boitard et al., 2016)." + long_description = """ + The piecewise-constant population size model of Fleckvieh cattle + from Boitard et al. (2016). Effective population sizes were estimated using + Approximate Bayesian Computation with allele frequency spectrum and + linkage-disequlibrium statistics (both on SNPs with minor allele frequency + above 0.2) observed in 25 individuals, + using the following assumptions: + a generation interval of 5 years (page 10), + a mutation rate of 1e-8 (pages 8 and 22), and + a recombination rate of 3.89e-9 (page 15). + Effective population sizes are given in Figure 6, + with exact values provided by the lead author in personal communication. + The 25 individuals' genomes were obtained from the 1000 bull genomes Run 2 + (of which 43 were Fleckvieh; + the authors kept the least inbred and unrelated samples, and + from these randomly selected 25). + """ + populations = [ + stdpopsim.Population(id="Fleckvieh", description="Fleckvieh"), + ] + citations = [ + stdpopsim.Citation( + author="Boitard et al.", + year=2016, + doi="https://doi.org/10.1371/journal.pgen.1005877", + reasons={stdpopsim.CiteReason.DEM_MODEL}, + ) + ] + return stdpopsim.DemographicModel( + id=id, + description=description, + long_description=long_description, + populations=populations, + citations=citations, + generation_time=5, + mutation_rate=1e-8, + recombination_rate=3.89e-9, + population_configurations=[ + # 9 generations at 2227, [0- 9) 9- 0= 9 + msprime.PopulationConfiguration( + initial_size=2227, metadata=populations[0].asdict() + ) + ], + # Here 'time' should be in generation notation ie. how many + # generations ago were that Ne (effective population size) + # Note the zero-based counting in the code + demographic_events=[ + # 15 generations at 2812, [9- 24) 24- 9= 15 + msprime.PopulationParametersChange( + time=9, initial_size=2812, population_id=0 + ), + # 23 generations at 3395, [24- 47) 47- 24= 23 + msprime.PopulationParametersChange( + time=24, initial_size=3395, population_id=0 + ), + # 36 generations at 4184, [47- 83) 83- 47= 36 + msprime.PopulationParametersChange( + time=47, initial_size=4184, population_id=0 + ), + # 56 generations at 5689, [83- 139) 139- 83= 56 + msprime.PopulationParametersChange( + time=83, initial_size=5689, population_id=0 + ), + # 89 generations at 7414, [139- 228) 228- 139= 89 + msprime.PopulationParametersChange( + time=139, initial_size=7414, population_id=0 + ), + # 139 generations at 10546, [228- 367) 367- 228= 139 + msprime.PopulationParametersChange( + time=228, initial_size=10546, population_id=0 + ), + # 217 generations at 13604, [367- 584) 584- 367= 217 + msprime.PopulationParametersChange( + time=367, initial_size=13604, population_id=0 + ), + # 339 generations at 18176, [584- 923) 923- 584= 339 + msprime.PopulationParametersChange( + time=584, initial_size=18176, population_id=0 + ), + # 532 generations at 20963, [923- 1455) 1455- 923= 532 + msprime.PopulationParametersChange( + time=923, initial_size=20963, population_id=0 + ), + # 832 generations at 28547, [1455- 2287) 2287- 1455= 832 + msprime.PopulationParametersChange( + time=1455, initial_size=28547, population_id=0 + ), + # 1303 generations at 38069, [2287- 3590) 3590- 2287= 1303 + msprime.PopulationParametersChange( + time=2287, initial_size=38069, population_id=0 + ), + # 2039 generations at 54358, [3590- 5629) 5629- 3590= 2039 + msprime.PopulationParametersChange( + time=3590, initial_size=54358, population_id=0 + ), + # 3192 generations at 61479, [5629- 8821) 8821- 5629= 3192 + msprime.PopulationParametersChange( + time=5629, initial_size=61479, population_id=0 + ), + # 4996 generations at 72920, [8821- 13817) 13817- 8821= 4996 + msprime.PopulationParametersChange( + time=8821, initial_size=72920, population_id=0 + ), + # 7821 generations at 82844, [13817- 21638) 21638-13817= 7821 + msprime.PopulationParametersChange( + time=13817, initial_size=82844, population_id=0 + ), + # 12243 generations at 82448, [21638- 33881) 33881-21638=12243 + msprime.PopulationParametersChange( + time=21638, initial_size=82448, population_id=0 + ), + # 19164 generations at 85607, [33881- 53045) 53045-33881=19164 + msprime.PopulationParametersChange( + time=33881, initial_size=85607, population_id=0 + ), + # 29998 generations at 91228, [53045- 83043) 83043-53045=29998 + msprime.PopulationParametersChange( + time=53045, initial_size=91228, population_id=0 + ), + # 46956 generations at 70789, [83043-129999) 129999-83043=46956 + msprime.PopulationParametersChange( + time=83043, initial_size=70789, population_id=0 + ), + # many generations at 31131, [129999-inf) inf-129999="many" + msprime.PopulationParametersChange( + time=129999, initial_size=31131, population_id=0 + ), + ], + ) + + +_species.add_demographic_model(_Fleckvieh_1B16()) + + +def _Jersey_1B16(): + id = "Jersey_1B16" + description = "Piecewise size model for Jersey cattle (Boitard et al., 2016)." + long_description = """ + The piecewise-constant population size model of Jersey cattle + from Boitard et al. (2016). Effective population sizes were estimated using + Approximate Bayesian Computation with allele frequency spectrum and + linkage-disequlibrium statistics (both on SNPs with minor allele frequency + above 0.2) observed in 15 individuals, + using the following assumptions: + a generation interval of 5 years (page 10), + a mutation rate of 1e-8 (pages 8 and 22), and + a recombination rate of 4.58e-9 (page 15). + Effective population sizes are given in Figure 6, + with exact values provided by the lead author in personal communication. + The 15 individuals' genomes were obtained from the 1000 bull genomes Run 2. + """ + populations = [ + stdpopsim.Population(id="Jersey", description="Jersey"), + ] + citations = [ + stdpopsim.Citation( + author="Boitard et al.", + year=2016, + doi="https://doi.org/10.1371/journal.pgen.1005877", + reasons={stdpopsim.CiteReason.DEM_MODEL}, + ) + ] + return stdpopsim.DemographicModel( + id=id, + description=description, + long_description=long_description, + populations=populations, + citations=citations, + generation_time=5, + mutation_rate=1e-8, + recombination_rate=4.58e-9, + population_configurations=[ + # 9 generations at 388, [0- 9) 9- 0= 9 + msprime.PopulationConfiguration( + initial_size=388, metadata=populations[0].asdict() + ) + ], + # Here 'time' should be in generation notation ie. how many + # generations ago were that Ne (effective population size) + # Note the zero-based counting in the code + demographic_events=[ + # 15 generations at 561, [9- 24) 24- 9= 15 + msprime.PopulationParametersChange( + time=9, initial_size=561, population_id=0 + ), + # 23 generations at 947, [24- 47) 47- 24= 23 + msprime.PopulationParametersChange( + time=24, initial_size=947, population_id=0 + ), + # 36 generations at 1640, [47- 83) 83- 47= 36 + msprime.PopulationParametersChange( + time=47, initial_size=1640, population_id=0 + ), + # 56 generations at 3704, [83- 139) 139- 83= 56 + msprime.PopulationParametersChange( + time=83, initial_size=3704, population_id=0 + ), + # 89 generations at 5766, [139- 228) 228- 139= 89 + msprime.PopulationParametersChange( + time=139, initial_size=5766, population_id=0 + ), + # 139 generations at 8106, [228- 367) 367- 228= 139 + msprime.PopulationParametersChange( + time=228, initial_size=8106, population_id=0 + ), + # 217 generations at 10474, [367- 584) 584- 367= 217 + msprime.PopulationParametersChange( + time=367, initial_size=10474, population_id=0 + ), + # 339 generations at 13460, [584- 923) 923- 584= 339 + msprime.PopulationParametersChange( + time=584, initial_size=13460, population_id=0 + ), + # 532 generations at 13960, [923- 1455) 1455- 923= 532 + msprime.PopulationParametersChange( + time=923, initial_size=13960, population_id=0 + ), + # 832 generations at 22549, [1455- 2287) 2287- 1455= 832 + msprime.PopulationParametersChange( + time=1455, initial_size=22549, population_id=0 + ), + # 1303 generations at 33713, [2287- 3590) 3590- 2287= 1303 + msprime.PopulationParametersChange( + time=2287, initial_size=33713, population_id=0 + ), + # 2039 generations at 51777, [3590- 5629) 5629- 3590= 2039 + msprime.PopulationParametersChange( + time=3590, initial_size=51777, population_id=0 + ), + # 3192 generations at 63277, [5629- 8821) 8821- 5629= 3192 + msprime.PopulationParametersChange( + time=5629, initial_size=63277, population_id=0 + ), + # 4996 generations at 78608, [8821- 13817) 13817- 8821= 4996 + msprime.PopulationParametersChange( + time=8821, initial_size=78608, population_id=0 + ), + # 7821 generations at 77971, [13817- 21638) 21638-13817= 7821 + msprime.PopulationParametersChange( + time=13817, initial_size=77971, population_id=0 + ), + # 12243 generations at 75739, [21638- 33881) 33881-21638=12243 + msprime.PopulationParametersChange( + time=21638, initial_size=75739, population_id=0 + ), + # 19164 generations at 67505, [33881- 53045) 53045-33881=19164 + msprime.PopulationParametersChange( + time=33881, initial_size=67505, population_id=0 + ), + # 29998 generations at 76905, [53045- 83043) 83043-53045=29998 + msprime.PopulationParametersChange( + time=53045, initial_size=76905, population_id=0 + ), + # 46956 generations at 53856, [83043-129999) 129999-83043=46956 + msprime.PopulationParametersChange( + time=83043, initial_size=53856, population_id=0 + ), + # many generations at 30275, [129999-inf) inf-129999="many" + msprime.PopulationParametersChange( + time=129999, initial_size=30275, population_id=0 + ), + ], + ) + + +_species.add_demographic_model(_Jersey_1B16()) + + +def _Angus_1B16(): + id = "Angus_1B16" + description = "Piecewise size model for Angus cattle (Boitard et al., 2016)." + long_description = """ + The piecewise-constant population size model of Angus cattle + from Boitard et al. (2016). Effective population sizes were estimated using + Approximate Bayesian Computation with allele frequency spectrum and + linkage-disequlibrium statistics (both on SNPs with minor allele frequency + above 0.2) observed in 15 individuals, + using the following assumptions: + a generation interval of 5 years (page 10), + a mutation rate of 1e-8 (pages 8 and 22), and + a recombination rate of 5.00e-9 (page 15). + Effective population sizes are given in Figure 6, + with exact values provided by the lead author in personal communication. + The 25 individuals' genomes were obtained from the 1000 bull genomes Run 2 + (of which 47 were Angus; + the authors kept the least inbred and unrelated samples, and + from these randomly selected 25). + """ + populations = [ + stdpopsim.Population(id="Angus", description="Angus"), + ] + citations = [ + stdpopsim.Citation( + author="Boitard et al.", + year=2016, + doi="https://doi.org/10.1371/journal.pgen.1005877", + reasons={stdpopsim.CiteReason.DEM_MODEL}, + ) + ] + return stdpopsim.DemographicModel( + id=id, + description=description, + long_description=long_description, + populations=populations, + citations=citations, + generation_time=5, + mutation_rate=1e-8, + recombination_rate=5.00e-9, + population_configurations=[ + # 9 generations at 291, [0- 9) 9- 0= 9 + msprime.PopulationConfiguration( + initial_size=291, metadata=populations[0].asdict() + ) + ], + # Here 'time' should be in generation notation ie. how many + # generations ago were that Ne (effective population size) + # Note the zero-based counting in the code + demographic_events=[ + # 15 generations at 412, [9- 24) 24- 9= 15 + msprime.PopulationParametersChange( + time=9, initial_size=412, population_id=0 + ), + # 23 generations at 709, [24- 47) 47- 24= 23 + msprime.PopulationParametersChange( + time=24, initial_size=709, population_id=0 + ), + # 36 generations at 1224, [47- 83) 83- 47= 36 + msprime.PopulationParametersChange( + time=47, initial_size=1224, population_id=0 + ), + # 56 generations at 2558, [83- 139) 139- 83= 56 + msprime.PopulationParametersChange( + time=83, initial_size=2558, population_id=0 + ), + # 89 generations at 4836, [139- 228) 228- 139= 89 + msprime.PopulationParametersChange( + time=139, initial_size=4836, population_id=0 + ), + # 139 generations at 6837, [228- 367) 367- 228= 139 + msprime.PopulationParametersChange( + time=228, initial_size=6837, population_id=0 + ), + # 217 generations at 10827, [367- 584) 584- 367= 217 + msprime.PopulationParametersChange( + time=367, initial_size=10827, population_id=0 + ), + # 339 generations at 12042, [584- 923) 923- 584= 339 + msprime.PopulationParametersChange( + time=584, initial_size=12042, population_id=0 + ), + # 532 generations at 16441, [923- 1455) 1455- 923= 532 + msprime.PopulationParametersChange( + time=923, initial_size=16441, population_id=0 + ), + # 832 generations at 24300, [1455- 2287) 2287- 1455= 832 + msprime.PopulationParametersChange( + time=1455, initial_size=24300, population_id=0 + ), + # 1303 generations at 35998, [2287- 3590) 3590- 2287= 1303 + msprime.PopulationParametersChange( + time=2287, initial_size=35998, population_id=0 + ), + # 2039 generations at 47892, [3590- 5629) 5629- 3590= 2039 + msprime.PopulationParametersChange( + time=3590, initial_size=47892, population_id=0 + ), + # 3192 generations at 56775, [5629- 8821) 8821- 5629= 3192 + msprime.PopulationParametersChange( + time=5629, initial_size=56775, population_id=0 + ), + # 4996 generations at 69328, [8821- 13817) 13817- 8821= 4996 + msprime.PopulationParametersChange( + time=8821, initial_size=69328, population_id=0 + ), + # 7821 generations at 80651, [13817- 21638) 21638-13817= 7821 + msprime.PopulationParametersChange( + time=13817, initial_size=80651, population_id=0 + ), + # 12243 generations at 83576, [21638- 33881) 33881-21638=12243 + msprime.PopulationParametersChange( + time=21638, initial_size=83576, population_id=0 + ), + # 19164 generations at 87426, [33881- 53045) 53045-33881=19164 + msprime.PopulationParametersChange( + time=33881, initial_size=87426, population_id=0 + ), + # 29998 generations at 85228, [53045- 83043) 83043-53045=29998 + msprime.PopulationParametersChange( + time=53045, initial_size=85228, population_id=0 + ), + # 46956 generations at 56981, [83043-129999) 129999-83043=46956 + msprime.PopulationParametersChange( + time=83043, initial_size=56981, population_id=0 + ), + # many generations at 33810, [129999-inf) inf-129999="many" + msprime.PopulationParametersChange( + time=129999, initial_size=33810, population_id=0 + ), + ], + ) + + +_species.add_demographic_model(_Angus_1B16())