Repository navigation
Generalise genetic values to individuals, nodes, and edges - #189
jeromekelleher merged 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #189 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 348 394 +46
Branches 43 54 +11
=========================================
+ Hits 348 394 +46
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jeromekelleher
left a comment
There was a problem hiding this comment.
Generally LGTM. Some performance issues that we perhaps want to leave for a follow-up, but let's try and get the nice docs and the overall framework merged
| """GeneticValue class to compute genetic values of individuals. | ||
| def _accumulate_edge_values( | ||
| nodes_genetic_value, nodes_edge, num_nodes, num_edges | ||
| ): # pragma: no cover |
There was a problem hiding this comment.
Why is this pragma no cover? This seems like a fundamental operation that we'd be testing thoroughly
There was a problem hiding this comment.
Hmm, this was in from before when we did this in Oxford. I have now removed that and added a test on my end.
| Accumulate the edge genetic values by summing their node contributions. | ||
| """ | ||
| edges_genetic_value = np.zeros(num_edges) | ||
| for u in range(num_nodes): |
There was a problem hiding this comment.
This is quite an inefficient implementation. We need to either implement using numpy operations or numba JIT compile it. I'd prefer numpy if possible (ask your favourite LLM for help).
|
The docs build failure looks like fairly basic stuff. You just need to build locally and fixup.
|
|
Looked into improving the Using this script I get Nice;) |
jeromekelleher
left a comment
There was a problem hiding this comment.
Great stuff, thanks @gregorgorjanc. I think we should merge. I can follow up with a few updates, like the perf and bugfix for #191
Co-authored-by: Jerome Kelleher <jk@well.ox.ac.uk> Co-authored-by: iozkaraca <120847491+iozkaraca@users.noreply.github.com>
eeff482 to
a6847c9
Compare
|
I have now squashed the commits so this can be merged in. |
Continuing work from jeromekelleher#1