Skip to content

Low level pair coalescence rates#2985

Merged
mergify[bot] merged 1 commit intotskit-dev:mainfrom
nspope:pair-coalescence-rate-ll
Sep 13, 2024
Merged

Low level pair coalescence rates#2985
mergify[bot] merged 1 commit intotskit-dev:mainfrom
nspope:pair-coalescence-rate-ll

Conversation

@nspope
Copy link
Contributor

@nspope nspope commented Sep 12, 2024

Low level pair coalescence rates within time windows, followup to #2976

@nspope nspope marked this pull request as draft September 12, 2024 03:09
@codecov
Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 98.91304% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.71%. Comparing base (46578bd) to head (2bc7118).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
python/_tskitmodule.c 97.50% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2985      +/-   ##
==========================================
+ Coverage   89.65%   89.71%   +0.05%     
==========================================
  Files          29       29              
  Lines       31116    31298     +182     
  Branches     6031     6067      +36     
==========================================
+ Hits        27898    28078     +180     
- Misses       1836     1837       +1     
- Partials     1382     1383       +1     
Flag Coverage Δ
c-tests 86.46% <100.00%> (+0.06%) ⬆️
lwt-tests 80.78% <ø> (ø)
python-c-tests 88.98% <97.50%> (+0.09%) ⬆️
python-tests 99.01% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
c/tskit/core.c 95.83% <100.00%> (+0.07%) ⬆️
c/tskit/core.h 100.00% <ø> (ø)
c/tskit/trees.c 90.44% <100.00%> (+0.11%) ⬆️
python/tskit/trees.py 98.78% <100.00%> (+0.01%) ⬆️
python/_tskitmodule.c 88.98% <97.50%> (+0.09%) ⬆️

@nspope nspope force-pushed the pair-coalescence-rate-ll branch from 0b0e591 to f063103 Compare September 13, 2024 01:39
@nspope nspope marked this pull request as ready for review September 13, 2024 01:44
@nspope nspope force-pushed the pair-coalescence-rate-ll branch from f063103 to 2bc7118 Compare September 13, 2024 01:52
@nspope
Copy link
Contributor Author

nspope commented Sep 13, 2024

Hey @jeromekelleher this is ready to be merged after a review. Thanks!

One question is what the output fill value should be for time windows that do not contain any nodes. I'm filling these with NaN at the moment, but zero also makes sense in this particular context. Maybe it should match what will be done for other time-windowed statistics (@petrelharp and @tforest have you decided on this?)

Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super! Merging

j = 0;
coalesced = 0.0;
timepoint = -INFINITY;
/* TODO: may be more efficient to use a binary search */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to note we have tsk_search_sorted if you want to try it out

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 this pull request may close these issues.

2 participants