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

Initial outline for Trajectory refactoring #1808

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jeromekelleher
Copy link
Member

Here's a rough outline for what I'm thinking the low-level C will look like. I think it's worth getting things right here in the Python version before looking at the C --- it's much faster to try different things out here.

As discussed in #1803

Does this look like roughly the right design @andrewkern, @molpopgen?

Looks like we're missing quite a bit of stuff from the Python version though @andrewkern?

@codecov
Copy link

codecov bot commented Aug 12, 2021

Codecov Report

Merging #1808 (e73e8aa) into main (7a49bc6) will decrease coverage by 0.01%.
The diff coverage is 87.69%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1808      +/-   ##
==========================================
- Coverage   90.92%   90.90%   -0.02%     
==========================================
  Files          20       20              
  Lines       10511    10538      +27     
  Branches     2226     2231       +5     
==========================================
+ Hits         9557     9580      +23     
- Misses        497      498       +1     
- Partials      457      460       +3     
Flag Coverage Δ
C 90.90% <87.69%> (-0.02%) ⬇️
python 97.52% <ø> (ø)

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

Impacted Files Coverage Δ
lib/util.h 100.00% <ø> (ø)
lib/msprime.c 85.38% <87.50%> (-0.01%) ⬇️
lib/util.c 98.06% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a49bc6...e73e8aa. Read the comment docs.

@molpopgen
Copy link
Member

This looks like it is on the right track. One source of confusion, for me at least, is how msprime's "new" ploidy argument gets handled here? This came up in the review of the other PR from @andrewkern -- the neutral fixation time being tested was 2n instead of 4n, and it wasn't clear (to me) why. Presumably, these trajectories should be considering an effective size of ploidy*n?

@jeromekelleher
Copy link
Member Author

We don't have ploidy in the Python version @molpopgen, but we probably should. But yes, I think it would be best if we did things in the general case with arbitrary ploidy.

@molpopgen
Copy link
Member

But yes, I think it would be best if we did things in the general case with arbitrary ploidy.

Yeah, seems prudent to iron out any wrinkles ASAP

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