tskit-dev / msprime

Simulate genealogical trees and genomic sequence data using population genetic models
GNU General Public License v3.0
170 stars 84 forks source link

Smc(k) gene conversion #2282

Closed GertjanBisschop closed 1 month ago

GertjanBisschop commented 1 month ago

Implementation of gene conversion using SMC K logic. alloc_hull function was adapted and no longer automatically applies the hull_offset. This means there are now multiple min(self.sequence_length, hull_right + self.hull_offset) statements but it makes reasoning about the right endpoint of the hull easier in all other cases.

Will check if we need some additional statistical tests. Solves #2280.

GertjanBisschop commented 1 month ago

Tests failing because of conda setup failure in the git workflow. @benjeffery does this require merging #2277? The PR seems to not only affect the conda setup for MacOS.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 53.22581% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 91.10%. Comparing base (d516e27) to head (0762cab).

Files Patch % Lines
lib/msprime.c 53.22% 18 Missing and 11 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2282 +/- ## ========================================== - Coverage 91.30% 91.10% -0.21% ========================================== Files 20 20 Lines 11873 11929 +56 Branches 2421 2433 +12 ========================================== + Hits 10841 10868 +27 - Misses 563 581 +18 - Partials 469 480 +11 ``` | [Flag](https://app.codecov.io/gh/tskit-dev/msprime/pull/2282/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tskit-dev) | Coverage Δ | | |---|---|---| | [C](https://app.codecov.io/gh/tskit-dev/msprime/pull/2282/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tskit-dev) | `91.10% <53.22%> (-0.21%)` | :arrow_down: | | [python](https://app.codecov.io/gh/tskit-dev/msprime/pull/2282/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tskit-dev) | `98.70% <ø> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=tskit-dev#carryforward-flags-in-the-pull-request-comment) to find out more.

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

benjeffery commented 1 month ago

I'll try and get that one merged, not sure what is wrong with it.