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

Issue:
QC for Heliconius melpomene
**PR for new species:** {#835}

Refs
[Pardo-Diaz et al 2012](https://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1002752)
[Keightley et al 2015](https://academic.oup.com/mbe/article/32/1/239/2925597)
[Davey et al 2017](https://onlinelibrary.wiley.com/doi/full/10.1002/evl3.12)

NB: there is no ensembl id for this species so data has been filled out manually. The assembly is hosted at lepbase: 

http://ensembl.lepbase.org/Heliconius_melpomene_melpomene_hmel25/Info/Index


If you volunteer to QC this species, please use the checklist below.
While this list is intended to be comprehensive, it may not be exhaustive.
Where relevant, the QC reviewer should identify that parameter values match
those given in the linked citation(s).

- [ ] Recombination rate.
  - This might be genome-wide, or per-chromosome. Both are fine.
  - Check there's a comment describing where it came from, and/or how calculated.
  - From a publication? Check the value(s) match the publication.
  - Calculated somehow? Average over a recombination map? Redo the calculation.
- [ ] Mutation rate.
  - This might be genome-wide, or per-chromosome. Both are fine.
  - Check there's a comment describing where it came from, and/or how calculated.
  - From a publication? Check the value(s) match the publication.
  - Calculated somehow? Redo the calculation.
- [ ] Recombination map (if present).
  - Does it match the assembly? Liftover is fine, if clearly stated.
  - Is the description/long_description a good summary of how the map was created?
- [ ] Population size.
- [ ] Generation time.

For each citation, check:
- Doi link.
- Is publication a preprint? Is there a peer-reviewed publication instead?
- Is the year correct.
- Is the author correct (spelling, accents/ligatures/etc.)

Citations are required for:
- [ ] Genome reference assembly.
- [ ] Mutation rate.
- [ ] Recombination rate.
- [ ] Recombination map(s) (if relevant).
- [ ] Population size.
- [ ] Generation time.



Discussion / hints:

Fix patch:
diff --git a/stdpopsim/catalog/HelMel/genome_data.py b/stdpopsim/catalog/HelMel/genome_data.py
index 41c357049..4da71fa20 100644
--- a/stdpopsim/catalog/HelMel/genome_data.py
+++ b/stdpopsim/catalog/HelMel/genome_data.py
@@ -6,6 +6,8 @@
 # Data source:
 # http://ensembl.lepbase.org/Heliconius_melpomene_melpomene_hmel25/Info/Index
 #
+# Chromosomes lengths from Davey et al. 2017
+#
 data = {
     "assembly_accession": None,  # No accession number available
     "assembly_name": "Hmel2.5",
@@ -15,21 +17,21 @@
         "3": {"length": 10541528, "synonyms": []},
         "4": {"length": 9662098, "synonyms": []},
         "5": {"length": 9908586, "synonyms": []},
-        "6": {"length": 1405417, "synonyms": []},
-        "7": {"length": 1430885, "synonyms": []},
+        "6": {"length": 14054175, "synonyms": []},
+        "7": {"length": 14308859, "synonyms": []},
         "8": {"length": 9320449, "synonyms": []},
         "9": {"length": 8708747, "synonyms": []},
-        "10": {"length": 1796548, "synonyms": []},
-        "11": {"length": 1175927, "synonyms": []},
-        "12": {"length": 1632729, "synonyms": []},
-        "13": {"length": 1812731, "synonyms": []},
+        "10": {"length": 17965481, "synonyms": []},
+        "11": {"length": 11759272, "synonyms": []},
+        "12": {"length": 16327298, "synonyms": []},
+        "13": {"length": 18127314, "synonyms": []},
         "14": {"length": 9174305, "synonyms": []},
-        "15": {"length": 1023575, "synonyms": []},
-        "16": {"length": 1008321, "synonyms": []},
-        "17": {"length": 1477329, "synonyms": []},
-        "18": {"length": 1680389, "synonyms": []},
-        "19": {"length": 1639934, "synonyms": []},
-        "20": {"length": 1487169, "synonyms": []},
-        "21": {"length": 1335969, "synonyms": []},
+        "15": {"length": 10235750, "synonyms": []},
+        "16": {"length": 10083215, "synonyms": []},
+        "17": {"length": 14773299, "synonyms": []},
+        "18": {"length": 16803890, "synonyms": []},
+        "19": {"length": 16399344, "synonyms": []},
+        "20": {"length": 14871695, "synonyms": []},
+        "21": {"length": 13359691, "synonyms": []},
     },
 }
diff --git a/stdpopsim/catalog/HelMel/species.py b/stdpopsim/catalog/HelMel/species.py
index eea017a55..9984064dd 100644
--- a/stdpopsim/catalog/HelMel/species.py
+++ b/stdpopsim/catalog/HelMel/species.py
@@ -78,8 +78,9 @@
     name="Heliconius melpomene",
     common_name="Heliconius melpomene",
     genome=_genome,
-    generation_time=1 / 10,
-    population_size=2.1e6,
+    generation_time=35 / 365,  # 35 days
+    # population size from the first of two datasets in Pardo-Diaz et al 2012
+    population_size=2111109,
     citations=[
         stdpopsim.Citation(
             author="Pardo-Diaz et al",


Test patch:
diff --git a/tests/test_HelMel.py b/tests/test_HelMel.py
index 2aa839a98..e6c1d8e0c 100644
--- a/tests/test_HelMel.py
+++ b/tests/test_HelMel.py
@@ -22,10 +22,10 @@ def test_common_name(self):
     # species definition, filling in the appropriate values
     # and deleting the pytest "skip" annotations.
     def test_qc_population_size(self):
-        assert self.species.population_size == 2.1e06
+        assert self.species.population_size == 2111109
 
     def test_qc_generation_time(self):
-        assert self.species.generation_time == 1 / 10
+        assert self.species.generation_time == 35 / 365
 
 
 class TestGenomeData(test_species.GenomeTestBase):