Repository navigation
Tests and documentation for genetic_relatedness_weighted - #2785
Conversation
|
Well, let's see: do you mean writing the python general stat function, for tests here? We just need to translate the C code to python, really: ... or, better, go back and look at the definition of this and see what the python code ought to be? Let's see, I actually think it should be exactly the same as what you've got there, from genetic relatedness, which is: Edit: not quite, I think just |
|
Comments above; otherwise, things look good! Thanks! |
|
I'll have a look after you've addressed @petrelharp's comments @brieuclehmann, and can sort out any remaining details (if they're giving you trouble) |
|
Thanks @petrelharp, I forgot we had derived the weighted function in the overleaf too! That's all working now. I've updated the docs too. @jeromekelleher I'm not sure how to resolve the remaining failed checks - I'm sure it's to do with the fact that the branch is quite old so would appreciate your help with any git surgery! |
Initialise total_weights to 0 and avoid an extra loop through arrays. Fix compile error
First pass at genetic_relatedness_weighted tests Full pass at tests for genetic_relatedness_weighted Update python/tskit/trees.py Co-authored-by: Peter Ralph <[email protected]> Add summary func to genetic_relatedness_weighted tests Fix summary function definition in docs
|
|
|
I just did a bit of git surgery @brieuclehmann - I'll take it from here, thanks! |
Codecov Report
@@ Coverage Diff @@
## main #2785 +/- ##
==========================================
+ Coverage 89.89% 89.93% +0.04%
==========================================
Files 30 30
Lines 29043 29171 +128
Branches 5672 5697 +25
==========================================
+ Hits 26107 26236 +129
+ Misses 1667 1666 -1
Partials 1269 1269
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
|

I've created a new PR to address the remaining tasks for #1246, namely adding tests and documentation. The tests are a bit messy but I think they cover everything. I'm not sure how to write the raw summary function under the general_stat framework, so would appreciate a hand / some pointers with this @petrelharp !