Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mean_recombination_rate() assumes the start of the map is position 0 #844

Closed
grahamgower opened this issue Dec 17, 2019 · 4 comments · Fixed by #845
Closed

mean_recombination_rate() assumes the start of the map is position 0 #844

grahamgower opened this issue Dec 17, 2019 · 4 comments · Fixed by #845
Milestone

Comments

@grahamgower
Copy link
Member

Given a genetic map like the example provided in the documentation (reproduced below), RecombinationMap.mean_recombination_rate() should give zero weight to the region 0-55550. Ie. it should be calculated to match 124.482178 / 100 / (183630013 - 55550), but current behaviour is to (effectively) calculate 124.482178 / 100 / 183630013.

Chromosome  Position(bp)    Rate(cM/Mb)     Map(cM)
chr1        55550           2.981822        0.000000
chr1        82571           2.082414        0.080572
chr1        88169           2.081358        0.092229
chr1        254996          3.354927        0.439456
chr1        564598          2.887498        1.478148
...
chr1        182973428       2.512769        122.832331
chr1        183630013       0.000000        124.482178
@jeromekelleher
Copy link
Member

Thanks for this @grahamgower. I confess I haven't fully digested this --- mind if we put it on the back burner till the new year?

@petrelharp
Copy link
Contributor

Good catch.

@jeromekelleher
Copy link
Member

Alternatively, should we require that genetic maps start with zero?

@jeromekelleher jeromekelleher added this to the Release 1.0 milestone Feb 5, 2020
grahamgower added a commit to grahamgower/msprime that referenced this issue Feb 13, 2020
grahamgower added a commit to grahamgower/msprime that referenced this issue Feb 13, 2020
@grahamgower
Copy link
Member Author

I'm not sure that we can require genetic maps start with zero. The hapmap files I've seen all start well away from zero. Presumably this is due to lack of information in the telomere region, not because the rate itself is zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants