tskit-dev / pyslim

Tools for dealing with tree sequences coming to and from SLiM.
MIT License
26 stars 23 forks source link

Fix mutation rate in time units example #344

Closed lkirk closed 1 month ago

lkirk commented 1 month ago

The branch diversity stat was being scaled by 1e-8 instead of 2e-8, leading to the underestimation of branch diversity when scaled by generation time.

I've corrected the code example and the text.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.65%. Comparing base (4cb44e2) to head (9d53350).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #344 +/- ## ======================================= Coverage 95.65% 95.65% ======================================= Files 8 8 Lines 621 621 Branches 131 131 ======================================= Hits 594 594 Misses 18 18 Partials 9 9 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

petrelharp commented 1 month ago

Good catch - and thanks for the PR! Here's where mutation rate is indeed set to 2e-8. (The test failure is a transient CI failure; I'll merge this.)