Repository: popsim-consortium/stdpopsim (language: python)

Issue:
QC for GAS_1A17 (AnoGam)
**PR for new model:** This was added along with the species itself in #856
**Original paper:** https://doi.org/10.1038/nature24995 
**Parameter values:** 
**Population indices:** it's a one-population model, for the Gambia sampling location of A. gambiae

**Potential issues that might lead to differences between the model implementations:**
The reported values are with the intermediate (3.5e-9) mutation rate

**QC'er requests:** 



Discussion / hints:
Hm - the model also needs to be fixed up - there is currently no parameter table (and do we really want one so big and long? perhaps we just put in the initial and final values or something?) and there's twice as many time points in the specification as there needs to be (lots of zero-length intervals). This could happen in the QC PR.
Since the docs weren't building, I commented out the `register_demographic_model` line for it over in #1273.

Fix patch:
diff --git a/docs/_ext/speciescatalog.py b/docs/_ext/speciescatalog.py
index 89ab4d9c9..05ddaa963 100644
--- a/docs/_ext/speciescatalog.py
+++ b/docs/_ext/speciescatalog.py
@@ -428,6 +428,7 @@ def model_image(self, species, model):
         os.makedirs(f"parameter_images/{species.id}/", exist_ok=True)
         img_name = f"parameter_images/{species.id}/{mid}.png"
         plt.savefig(img_name, dpi=150)
+        plt.close()
         section = nodes.image(uri=img_name)
         return section
 
diff --git a/docs/parameter_tables/AnoGam/GabonAg1000G_1A17.csv b/docs/parameter_tables/AnoGam/GabonAg1000G_1A17.csv
new file mode 100644
index 000000000..176f8da8f
--- /dev/null
+++ b/docs/parameter_tables/AnoGam/GabonAg1000G_1A17.csv
@@ -0,0 +1,4 @@
+Population size,"4,069,863","Modern population size"
+Population size,"205,766","Mean coalescence time / 4"
+"Generation time (yrs.)",1/11,"Generation time"
+"Mutation rate (subst/gen)",3.5e-9,"Mutation rate"
diff --git a/stdpopsim/catalog/AnoGam/demographic_models.py b/stdpopsim/catalog/AnoGam/demographic_models.py
index aa45d1d37..9a6e767d7 100644
--- a/stdpopsim/catalog/AnoGam/demographic_models.py
+++ b/stdpopsim/catalog/AnoGam/demographic_models.py
@@ -10,451 +10,143 @@ def _GAS_sp():
     times = np.array(
         [
             1.08221472e01,
-            1.08221472e01,
-            1.77815418e01,
             1.77815418e01,
             2.43957877e01,
-            2.43957877e01,
-            2.62194838e01,
             2.62194838e01,
             2.80715527e01,
-            2.80715527e01,
-            2.99059882e01,
             2.99059882e01,
             3.17590591e01,
-            3.17590591e01,
             3.36213534e01,
-            3.36213534e01,
-            3.55031410e01,
-            3.55031410e01,
-            3.74218265e01,
             3.74218265e01,
-            3.93692837e01,
-            3.93692837e01,
-            4.13556900e01,
-            4.13556900e01,
-            4.33822257e01,
-            4.33822257e01,
-            4.54501193e01,
-            4.54501193e01,
-            4.75606499e01,
-            4.75606499e01,
-            4.97151498e01,
-            4.97151498e01,
-            5.19150077e01,
-            5.19150077e01,
-            5.41616710e01,
-            5.41616710e01,
-            5.64566497e01,
-            5.64566497e01,
-            5.88015192e01,
-            5.88015192e01,
-            6.11979243e01,
-            6.11979243e01,
-            6.36475829e01,
-            6.36475829e01,
-            6.61522900e01,
-            6.61522900e01,
             6.87139222e01,
-            6.87139222e01,
-            7.13468519e01,
             7.13468519e01,
             7.40546632e01,
-            7.40546632e01,
-            7.69788992e01,
             7.69788992e01,
             8.00932536e01,
-            8.00932536e01,
             8.33883683e01,
-            8.33883683e01,
-            9.33624771e01,
             9.33624771e01,
             1.05867180e02,
-            1.05867180e02,
-            1.19778311e02,
             1.19778311e02,
             1.34317538e02,
-            1.34317538e02,
-            1.49486416e02,
             1.49486416e02,
             1.65081438e02,
-            1.65081438e02,
             1.81069660e02,
-            1.81069660e02,
-            1.96884420e02,
             1.96884420e02,
             2.13010501e02,
-            2.13010501e02,
-            2.28659684e02,
             2.28659684e02,
             2.43883726e02,
-            2.43883726e02,
-            2.58403062e02,
             2.58403062e02,
             2.70573820e02,
-            2.70573820e02,
             2.75664382e02,
-            2.75664382e02,
-            2.80730912e02,
             2.80730912e02,
             2.85888999e02,
-            2.85888999e02,
-            2.91187697e02,
             2.91187697e02,
             2.96632655e02,
-            2.96632655e02,
-            3.02218199e02,
             3.02218199e02,
             3.07951917e02,
-            3.07951917e02,
             3.13860240e02,
-            3.13860240e02,
-            3.19955507e02,
             3.19955507e02,
             3.26244790e02,
-            3.26244790e02,
-            3.32745865e02,
             3.32745865e02,
-            3.39465956e02,
-            3.39465956e02,
-            3.46421839e02,
-            3.46421839e02,
-            3.53626147e02,
-            3.53626147e02,
-            3.61092430e02,
-            3.61092430e02,
-            3.68835241e02,
-            3.68835241e02,
-            3.76870235e02,
-            3.76870235e02,
-            3.85214266e02,
-            3.85214266e02,
-            3.93885515e02,
-            3.93885515e02,
-            4.02903613e02,
-            4.02903613e02,
-            4.12289797e02,
-            4.12289797e02,
-            4.22067072e02,
-            4.22067072e02,
-            4.32260401e02,
-            4.32260401e02,
-            4.42896919e02,
-            4.42896919e02,
-            4.54006170e02,
-            4.54006170e02,
-            4.65620388e02,
-            4.65620388e02,
             4.77774801e02,
-            4.77774801e02,
-            4.90490498e02,
-            4.90490498e02,
-            5.03826473e02,
-            5.03826473e02,
-            5.17829247e02,
-            5.17829247e02,
-            5.32550112e02,
-            5.32550112e02,
-            5.48045759e02,
-            5.48045759e02,
-            5.64379009e02,
             5.64379009e02,
-            5.81588679e02,
-            5.81588679e02,
-            5.99781759e02,
-            5.99781759e02,
-            6.19045020e02,
             6.19045020e02,
             6.39454764e02,
-            6.39454764e02,
-            6.61129552e02,
             6.61129552e02,
             6.84129309e02,
-            6.84129309e02,
-            7.08609246e02,
             7.08609246e02,
             7.34719738e02,
-            7.34719738e02,
-            7.62657505e02,
             7.62657505e02,
             7.92661043e02,
-            7.92661043e02,
             8.24963147e02,
-            8.24963147e02,
-            8.59801339e02,
             8.59801339e02,
-            8.97519058e02,
-            8.97519058e02,
-            9.38516578e02,
             9.38516578e02,
-            9.83196252e02,
-            9.83196252e02,
-            1.03213113e03,
-            1.03213113e03,
-            1.08595950e03,
-            1.08595950e03,
             1.14545402e03,
-            1.14545402e03,
-            1.21187638e03,
             1.21187638e03,
             1.42580467e03,
-            1.42580467e03,
             1.66762718e03,
-            1.66762718e03,
-            1.94206662e03,
             1.94206662e03,
-            2.25673855e03,
-            2.25673855e03,
             2.61982155e03,
-            2.61982155e03,
-            3.04325043e03,
-            3.04325043e03,
-            3.54366638e03,
-            3.54366638e03,
-            4.14416552e03,
             4.14416552e03,
             4.86878040e03,
-            4.86878040e03,
-            5.74277111e03,
             5.74277111e03,
             6.06376420e03,
-            6.06376420e03,
             6.48115044e03,
-            6.48115044e03,
-            7.16974182e03,
             7.16974182e03,
             9.94668728e03,
-            9.94668728e03,
-            1.08341379e04,
             1.08341379e04,
             1.12602248e04,
-            1.12602248e04,
-            1.80292683e04,
         ]
     )
     sizes = np.array(
         [
-            4069863.26413754,
-            2570469.78880419,
             2570469.78880419,
             2398970.46335773,
-            2398970.46335773,
             649423.64089016,
-            649423.64089016,
-            647425.87204344,
             647425.87204344,
             629386.55333025,
-            629386.55333025,
-            623896.55036331,
             623896.55036331,
             615171.6634657,
-            615171.6634657,
-            609770.71698915,
-            609770.71698915,
             609770.71698915,
-            609770.71698915,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
-            606896.78477367,
             606896.78477367,
             609770.71698915,
-            609770.71698915,
-            612860.29930411,
             612860.29930411,
             646628.97921259,
-            646628.97921259,
             672653.84034255,
-            672653.84034255,
-            694949.57011815,
             694949.57011815,
             2053484.48904133,
-            2053484.48904133,
             2512451.15337624,
-            2512451.15337624,
-            2726859.95574373,
             2726859.95574373,
             2779609.28386339,
-            2779609.28386339,
-            2827486.59107239,
             2827486.59107239,
             2833326.90480091,
-            2833326.90480091,
-            2830283.03259496,
             2830283.03259496,
             2726859.95574373,
-            2726859.95574373,
             2707367.42825967,
-            2707367.42825967,
-            2557240.92209016,
             2557240.92209016,
             2420531.19687943,
-            2420531.19687943,
-            2245241.1128414,
             2245241.1128414,
             1829782.22978925,
-            1829782.22978925,
-            743769.25832605,
             743769.25832605,
             719107.79112942,
-            719107.79112942,
             710882.47527273,
-            710882.47527273,
-            708782.9061541,
             708782.9061541,
             706605.83914068,
-            706605.83914068,
-            702884.83678823,
             702884.83678823,
             699330.14877435,
-            699330.14877435,
-            698106.79217618,
             698106.79217618,
             697332.03584512,
-            697332.03584512,
             696317.93467906,
-            696317.93467906,
-            696167.64460966,
             696167.64460966,
             695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            695633.55941906,
-            694677.60526595,
             694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            694677.60526595,
-            693429.24269629,
-            693429.24269629,
-            693429.24269629,
-            693429.24269629,
             693429.24269629,
-            693429.24269629,
-            692716.93526192,
             692716.93526192,
             692379.41939462,
-            692379.41939462,
-            690176.6983718,
             690176.6983718,
             688681.83478372,
-            688681.83478372,
-            687162.86783629,
             687162.86783629,
             686235.36369922,
-            686235.36369922,
             686150.90910499,
-            686150.90910499,
-            685951.34145025,
             685951.34145025,
             685005.95081601,
-            685005.95081601,
-            684576.59330447,
             684576.59330447,
-            684576.59330447,
-            684576.59330447,
-            683889.43627665,
             683889.43627665,
-            683889.43627665,
-            683889.43627665,
-            683889.43627665,
-            683889.43627665,
-            683889.43627665,
-            683889.43627665,
-            687172.58638815,
             687172.58638815,
             1980227.21562606,
-            1980227.21562606,
-            1989715.58702617,
             1989715.58702617,
             1992430.35210815,
-            1992430.35210815,
-            1998953.44050118,
             1998953.44050118,
-            1998953.44050118,
-            1998953.44050118,
-            1998160.88128216,
-            1998160.88128216,
-            1998160.88128216,
-            1998160.88128216,
-            1998160.88128216,
             1998160.88128216,
             1972764.03439268,
-            1972764.03439268,
-            1903551.76041575,
             1903551.76041575,
             543762.2932594,
-            543762.2932594,
             530289.21416049,
-            530289.21416049,
-            624896.67937685,
             624896.67937685,
             1680052.006021,
-            1680052.006021,
             322144.56539297,
-            322144.56539297,
-            77334.77862527,
             77334.77862527,
             409527.12801416,
-            409527.12801416,
         ]
     )
 
@@ -466,17 +158,19 @@ def _GAS_sp():
     populations = [
         stdpopsim.Population(
             id="GAS",
-            description="Gabon gabiae population",
+            description="Gabon gambiae population",
         )
     ]
 
     return stdpopsim.DemographicModel(
-        id="GAS_1A17",
+        id="GabonAg1000G_1A17",
         description="Stairwayplot estimates of N(t) for Gabon sample",
         long_description="""
-        These estimates were done as part of the Ag1000G 2017 Consortium
-        paper. Stairwayplot was run with the addition of a misorientation
-        parameter using SFS information from each population.
+        These estimates were done as part of the Ag1000G 2017 Consortium paper.
+        Stairwayplot was run with the addition of a
+        misorientation parameter using SFS information from each population.
+        The model contains 110 distinct epochs, so only some summaries
+        are reported in the population table.
         """,
         populations=populations,
         citations=[
@@ -487,7 +181,9 @@ def _GAS_sp():
                 reasons={stdpopsim.CiteReason.DEM_MODEL},
             )
         ],
-        # generation times and mutation rate given at bottom of page 32 in supp info
+        # generation times and mutation rate given at bottom of page 32 in supp info,
+        # and confirmed with Andy Kern that 3.5e-9 was indeed used for these stairwayplot
+        # estimates as well as dadi
         generation_time=1 / 11,
         mutation_rate=3.5e-9,
         demographic_events=demographic_events,
@@ -499,6 +195,4 @@ def _GAS_sp():
     )
 
 
-# TODO: fix this up - there's no parameter table and also all the times above
-# are listed twice
-# _species.add_demographic_model(_GAS_sp())
+_species.add_demographic_model(_GAS_sp())
diff --git a/stdpopsim/qc/AnoGam.py b/stdpopsim/qc/AnoGam.py
new file mode 100644
index 000000000..6127a5606
--- /dev/null
+++ b/stdpopsim/qc/AnoGam.py
@@ -0,0 +1,277 @@
+import msprime
+import numpy as np
+
+import stdpopsim
+
+
+_species = stdpopsim.get_species("AnoGam")
+
+
+def GAS_stairwayplot():
+    id = "QC-GabonAg1000G_1A17"
+    generation_time = 1 / 11
+
+    # Parameters are from Miles et al 2016, which says in Supplement part 8
+    # that "All results are available from the Ag1000G FTP site."
+    # So, obtained results from:
+    # wget ftp://ngs.sanger.ac.uk/production/ag1000g/phase1/\
+    # AR3.1/stairway_plot/GAS.meru_mela.sfs.sp.summary
+    # tail -n +8 GAS.meru_mela.sfs.sp.summary | cut -f 6,7 > GAS.txt
+    # and pasted this into the below
+
+    # (year, Ne_median) pairs:
+    # note the repeated time entries
+    raw_data = np.array(
+        [
+            (0.0, 4069863.2641375437),
+            (119.04361951964268, 4069863.2641375437),
+            (119.04361951964268, 2570469.788804191),
+            (195.5969599650061, 2570469.788804191),
+            (195.5969599650061, 2398970.4633577284),
+            (268.3536651999058, 2398970.4633577284),
+            (268.3536651999058, 649423.6408901582),
+            (288.41432194750894, 649423.6408901582),
+            (288.41432194750894, 647425.872043444),
+            (308.78707980783946, 647425.872043444),
+            (308.78707980783946, 629386.5533302526),
+            (328.96586993080166, 629386.5533302526),
+            (328.96586993080166, 623896.5503633062),
+            (349.34965006192334, 623896.5503633062),
+            (349.34965006192334, 615171.6634657005),
+            (369.83488694056797, 615171.6634657005),
+            (369.83488694056797, 609770.7169891531),
+            (390.53455144559734, 609770.7169891531),
+            (390.53455144559734, 609770.7169891531),
+            (411.64009172523504, 609770.7169891531),
+            (411.64009172523504, 606896.7847736678),
+            (433.0621204495311, 606896.7847736678),
+            (433.0621204495311, 606896.7847736678),
+            (454.912589748313, 606896.7847736678),
+            (454.912589748313, 606896.7847736678),
+            (477.20448266929253, 606896.7847736678),
+            (477.20448266929253, 606896.7847736678),
+            (499.9513121804962, 606896.7847736678),
+            (499.9513121804962, 606896.7847736678),
+            (523.1671484857452, 606896.7847736678),
+            (523.1671484857452, 606896.7847736678),
+            (546.8666480473536, 606896.7847736678),
+            (546.8666480473536, 606896.7847736678),
+            (571.065084441838, 606896.7847736678),
+            (571.065084441838, 606896.7847736678),
+            (595.7783811851413, 606896.7847736678),
+            (595.7783811851413, 606896.7847736678),
+            (621.0231466756121, 606896.7847736678),
+            (621.0231466756121, 606896.7847736678),
+            (646.816711415876, 606896.7847736678),
+            (646.816711415876, 606896.7847736678),
+            (673.1771676888928, 606896.7847736678),
+            (673.1771676888928, 606896.7847736678),
+            (700.1234118790879, 606896.7847736678),
+            (700.1234118790879, 606896.7847736678),
+            (727.6751896465906, 606896.7847736678),
+            (727.6751896465906, 606896.7847736678),
+            (755.8531441815365, 606896.7847736678),
+            (755.8531441815365, 609770.7169891531),
+            (784.8153706937982, 609770.7169891531),
+            (784.8153706937982, 612860.2993041094),
+            (814.6012956678746, 612860.2993041094),
+            (814.6012956678746, 646628.9792125917),
+            (846.7678908283069, 646628.9792125917),
+            (846.7678908283069, 672653.8403425539),
+            (881.0257894961221, 672653.8403425539),
+            (881.0257894961221, 694949.5701181502),
+            (917.272050911558, 694949.5701181502),
+            (917.272050911558, 2053484.489041333),
+            (1026.987248146155, 2053484.489041333),
+            (1026.987248146155, 2512451.153376244),
+            (1164.5389797372006, 2512451.153376244),
+            (1164.5389797372006, 2726859.95574373),
+            (1317.561423942797, 2726859.95574373),
+            (1317.561423942797, 2779609.283863392),
+            (1477.4929132329808, 2779609.283863392),
+            (1477.4929132329808, 2827486.5910723945),
+            (1644.3505799334257, 2827486.5910723945),
+            (1644.3505799334257, 2833326.9048009124),
+            (1815.8958168056997, 2833326.9048009124),
+            (1815.8958168056997, 2830283.032594962),
+            (1991.7662593953326, 2830283.032594962),
+            (1991.7662593953326, 2726859.95574373),
+            (2165.728617018537, 2726859.95574373),
+            (2165.728617018537, 2707367.4282596707),
+            (2343.115508305002, 2707367.4282596707),
+            (2343.115508305002, 2557240.922090161),
+            (2515.2565282700093, 2557240.922090161),
+            (2515.2565282700093, 2420531.1968794307),
+            (2682.7209808007574, 2420531.1968794307),
+            (2682.7209808007574, 2245241.112841403),
+            (2842.433679110716, 2245241.112841403),
+            (2842.433679110716, 1829782.2297892452),
+            (2976.3120204159472, 1829782.2297892452),
+            (2976.3120204159472, 743769.2583260541),
+            (3032.3082002259275, 743769.2583260541),
+            (3032.3082002259275, 719107.7911294184),
+            (3088.040029345467, 719107.7911294184),
+            (3088.040029345467, 710882.4752727259),
+            (3144.778992971672, 710882.4752727259),
+            (3144.778992971672, 708782.9061540969),
+            (3203.064664297201, 708782.9061540969),
+            (3203.064664297201, 706605.8391406796),
+            (3262.9592045930835, 706605.8391406796),
+            (3262.9592045930835, 702884.8367882286),
+            (3324.400186829817, 702884.8367882286),
+            (3324.400186829817, 699330.1487743513),
+            (3387.4710876933045, 699330.1487743513),
+            (3387.4710876933045, 698106.7921761848),
+            (3452.462643079068, 698106.7921761848),
+            (3452.462643079068, 697332.0358451155),
+            (3519.5105769135102, 697332.0358451155),
+            (3519.5105769135102, 696317.9346790552),
+            (3588.692686668012, 696317.9346790552),
+            (3588.692686668012, 696167.6446096608),
+            (3660.2045145683364, 696167.6446096608),
+            (3660.2045145683364, 695633.5594190623),
+            (3734.1255133908285, 695633.5594190623),
+            (3734.1255133908285, 695633.5594190623),
+            (3810.64023147025, 695633.5594190623),
+            (3810.64023147025, 695633.5594190623),
+            (3889.8876180525085, 695633.5594190623),
+            (3889.8876180525085, 695633.5594190623),
+            (3972.0167277832124, 695633.5594190623),
+            (3972.0167277832124, 695633.5594190623),
+            (4057.1876563928317, 695633.5594190623),
+            (4057.1876563928317, 695633.5594190623),
+            (4145.572582308474, 695633.5594190623),
+            (4145.572582308474, 695633.5594190623),
+            (4237.356928451641, 695633.5594190623),
+            (4237.356928451641, 695633.5594190623),
+            (4332.740660718069, 695633.5594190623),
+            (4332.740660718069, 695633.5594190623),
+            (4431.939742275155, 695633.5594190623),
+            (4431.939742275155, 695633.5594190623),
+            (4535.187765936612, 695633.5594190623),
+            (4535.187765936612, 695633.5594190623),
+            (4642.737790583962, 695633.5594190623),
+            (4642.737790583962, 695633.5594190623),
+            (4754.864412024816, 695633.5594190623),
+            (4754.864412024816, 695633.5594190623),
+            (4871.8661039631, 695633.5594190623),
+            (4871.8661039631, 695633.5594190623),
+            (4994.06787109864, 695633.5594190623),
+            (4994.06787109864, 695633.5594190623),
+            (5121.824264013069, 695633.5594190623),
+            (5121.824264013069, 695633.5594190623),
+            (5255.52281473747, 695633.5594190623),
+            (5255.52281473747, 694677.6052659544),
+            (5395.395482665781, 694677.6052659544),
+            (5395.395482665781, 694677.6052659544),
+            (5542.0912075662045, 694677.6052659544),
+            (5542.0912075662045, 694677.6052659544),
+            (5696.121718711648, 694677.6052659544),
+            (5696.121718711648, 694677.6052659544),
+            (5858.051230428654, 694677.6052659544),
+            (5858.051230428654, 694677.6052659544),
+            (6028.5033480255015, 694677.6052659544),
+            (6028.5033480255015, 694677.6052659544),
+            (6208.169093600558, 694677.6052659544),
+            (6208.169093600558, 693429.2426962901),
+            (6397.475466163017, 693429.2426962901),
+            (6397.475466163017, 693429.2426962901),
+            (6597.599345729046, 693429.2426962901),
+            (6597.599345729046, 693429.2426962901),
+            (6809.4952182107245, 693429.2426962901),
+            (6809.4952182107245, 692716.935261925),
+            (7034.002408378257, 692716.935261925),
+            (7034.002408378257, 692379.4193946248),
+            (7272.425073459051, 692379.4193946248),
+            (7272.425073459051, 690176.6983717981),
+            (7525.4223969091245, 690176.6983717981),
+            (7525.4223969091245, 688681.8347837181),
+            (7794.7017066974795, 688681.8347837181),
+            (7794.7017066974795, 687162.8678362874),
+            (8081.917116451414, 687162.8678362874),
+            (8081.917116451414, 686235.3636992247),
+            (8389.232550262084, 686235.3636992247),
+            (8389.232550262084, 686150.9091049897),
+            (8719.271467580502, 686150.9091049897),
+            (8719.271467580502, 685951.341450253),
+            (9074.594617774881, 685951.341450253),
+            (9074.594617774881, 685005.950816014),
+            (9457.814730119504, 685005.950816014),
+            (9457.814730119504, 684576.5933044655),
+            (9872.709635152514, 684576.5933044655),
+            (9872.709635152514, 684576.5933044655),
+            (10323.682358014481, 684576.5933044655),
+            (10323.682358014481, 683889.4362766537),
+            (10815.15877646698, 683889.4362766537),
+            (10815.15877646698, 683889.4362766537),
+            (11353.442472867337, 683889.4362766537),
+            (11353.442472867337, 683889.4362766537),
+            (11945.554538907729, 683889.4362766537),
+            (11945.554538907729, 683889.4362766537),
+            (12599.994190847112, 683889.4362766537),
+            (12599.994190847112, 687172.5863881508),
+            (13330.640215714893, 687172.5863881508),
+            (13330.640215714893, 1980227.2156260633),
+            (15683.851404813011, 1980227.2156260633),
+            (15683.851404813011, 1989715.587026168),
+            (18343.898981051203, 1989715.587026168),
+            (18343.898981051203, 1992430.3521081463),
+            (21362.732847881725, 1992430.3521081463),
+            (21362.732847881725, 1998953.4405011814),
+            (24824.12408684481, 1998953.4405011814),
+            (24824.12408684481, 1998953.4405011814),
+            (28818.037054879136, 1998953.4405011814),
+            (28818.037054879136, 1998160.881282157),
+            (33475.75472686552, 1998160.881282157),
+            (33475.75472686552, 1998160.881282157),
+            (38980.33015739488, 1998160.881282157),
+            (38980.33015739488, 1998160.881282157),
+            (45585.8206740301, 1998160.881282157),
+            (45585.8206740301, 1972764.0343926845),
+            (53556.584449354086, 1972764.0343926845),
+            (53556.584449354086, 1903551.7604157536),
+            (63170.48222923164, 1903551.7604157536),
+            (63170.48222923164, 543762.2932593989),
+            (66701.40621143552, 543762.2932593989),
+            (66701.40621143552, 530289.214160486),
+            (71292.65481888562, 530289.214160486),
+            (71292.65481888562, 624896.6793768455),
+            (78867.16002345344, 624896.6793768455),
+            (78867.16002345344, 1680052.006021),
+            (109413.56013292617, 1680052.006021),
+            (109413.56013292617, 322144.5653929737),
+            (119175.51665998598, 322144.5653929737),
+            (119175.51665998598, 77334.77862527313),
+            (123862.47294030557, 77334.77862527313),
+            (123862.47294030557, 409527.1280141645),
+            (198321.95076106273, 409527.1280141645),
+        ]
+    )
+
+    model = msprime.Demography()
+    model.add_population(
+        name="GAS", description="Gabon sample", initial_size=raw_data[0][1]
+    )
+    last_time, last_size = 0, raw_data[0][1]
+    for j in range(1, raw_data.shape[0]):
+        time, size = raw_data[j, :]
+        if time > last_time and last_size != size:
+            model.add_population_parameters_change(
+                time * generation_time,
+                initial_size=size,
+                growth_rate=0,
+                population="GAS",
+            )
+            last_time, last_size = time, size
+
+    return stdpopsim.DemographicModel(
+        id=id,
+        description=id,
+        long_description=id,
+        generation_time=generation_time,
+        mutation_rate=3.5e-9,
+        model=model,
+    )
+
+
+_species.get_demographic_model("GabonAg1000G_1A17").register_qc(GAS_stairwayplot())
diff --git a/stdpopsim/qc/__init__.py b/stdpopsim/qc/__init__.py
index b09de693e..f6675b4ea 100644
--- a/stdpopsim/qc/__init__.py
+++ b/stdpopsim/qc/__init__.py
@@ -1,7 +1,8 @@
+from . import AnaPla  # NOQA
+from . import AnoGam  # NOQA
 from . import AraTha  # NOQA
+from . import BosTau  # NOQA
 from . import DroMel  # NOQA
 from . import HomSap  # NOQA
 from . import PonAbe  # NOQA
-from . import AnaPla  # NOQA
 from . import PapAnu  # NOQA
-from . import BosTau  # NOQA


Test patch:
diff --git a/tests/test_models.py b/tests/test_models.py
index 21c62e0fb..64e5a76a1 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -7,6 +7,7 @@
 import csv
 import pathlib
 import os
+import fractions
 
 import numpy as np
 import msprime
@@ -384,7 +385,12 @@ def test_params_match_docs_tables(self):
                         mutation_rate = None
                         for param_data in param_list:
                             if param_data[0].startswith("Generation time"):
-                                generation_time = float(param_data[1])
+                                try:
+                                    generation_time = float(param_data[1])
+                                except ValueError:
+                                    generation_time = float(
+                                        fractions.Fraction(param_data[1])
+                                    )
                             if param_data[0].startswith("Mutation rate"):
                                 mutation_rate = float(param_data[1])
                     assert model.mutation_rate == mutation_rate