Skip to content

Commit

Permalink
species QC to ChlRei (#1067)
Browse files Browse the repository at this point in the history
* species QC to ChlRei
  • Loading branch information
izabelcavassim committed Nov 2, 2021
1 parent cfd3bf8 commit 0fc1dbe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 41 deletions.
2 changes: 1 addition & 1 deletion stdpopsim/catalog/ChlRei/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
reasons={stdpopsim.CiteReason.POP_SIZE}, # Quebec population
),
stdpopsim.Citation(
author="Vitova et al.",
author="Vítová et al",
year=2011,
doi="https://doi.org/10.1007/s00425-011-1427-7",
reasons={stdpopsim.CiteReason.GEN_TIME},
Expand Down
76 changes: 36 additions & 40 deletions tests/test_ChlRei.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,68 +21,64 @@ def test_common_name(self):
# independently referring to the citations provided in the
# species definition, filling in the appropriate values
# and deleting the pytest "skip" annotations.
@pytest.mark.skip("Population size QC not done yet")
def test_qc_population_size(self):
assert self.species.population_size == -1
assert self.species.population_size == 1.4 * 1e-7

@pytest.mark.skip("Generation time QC not done yet")
def test_qc_generation_time(self):
assert self.species.generation_time == -1
assert self.species.generation_time == 1 / 876


class TestGenomeData(test_species.GenomeTestBase):

genome = stdpopsim.get_species("ChlRei").genome

@pytest.mark.skip("Recombination rate QC not done yet")
@pytest.mark.parametrize(
["name", "rate"],
{
"1": -1,
"2": -1,
"3": -1,
"4": -1,
"5": -1,
"6": -1,
"7": -1,
"8": -1,
"9": -1,
"10": -1,
"11": -1,
"12": -1,
"13": -1,
"14": -1,
"15": -1,
"16": -1,
"17": -1,
"1": 1.21e-10,
"2": 1.49e-10,
"3": 1.52e-10,
"4": 1.47e-10,
"5": 1.70e-10,
"6": 1.17e-10,
"7": 8.66e-11,
"8": 1.39e-10,
"9": 1.12e-10,
"10": 1.97e-10,
"11": 1.63e-10,
"12": 9.15e-11,
"13": 1.43e-10,
"14": 1.90e-10,
"15": 3.93e-10,
"16": 1.71e-10,
"17": 1.83e-10,
}.items(),
)
def test_recombination_rate(self, name, rate):
assert rate == pytest.approx(
self.genome.get_chromosome(name).recombination_rate
)

@pytest.mark.skip("Mutation rate QC not done yet")
@pytest.mark.parametrize(
["name", "rate"],
{
"1": -1,
"2": -1,
"3": -1,
"4": -1,
"5": -1,
"6": -1,
"7": -1,
"8": -1,
"9": -1,
"10": -1,
"11": -1,
"12": -1,
"13": -1,
"14": -1,
"15": -1,
"16": -1,
"17": -1,
"1": 9.74e-10,
"2": 8.62e-10,
"3": 9.50e-10,
"4": 9.66e-10,
"5": 1.17e-09,
"6": 9.12e-10,
"7": 9.14e-10,
"8": 8.98e-10,
"9": 9.17e-10,
"10": 9.27e-10,
"11": 1.03e-09,
"12": 9.55e-10,
"13": 7.56e-10,
"14": 8.96e-10,
"15": 6.91e-10,
"16": 9.59e-10,
"17": 1.05e-09,
}.items(),
)
def test_mutation_rate(self, name, rate):
Expand Down

0 comments on commit 0fc1dbe

Please sign in to comment.