-
Notifications
You must be signed in to change notification settings - Fork 77
Support migrations in sort. #1131
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
Conversation
43b9522
to
f7ab0c5
Compare
@petrelharp I've added sort support for migrations here. What do you think of the sort key? Should we make the sort requirement for migrations stricter now? We'd need to update msprime to make sure things are output in this order, I think. |
Codecov Report
@@ Coverage Diff @@
## main #1131 +/- ##
==========================================
- Coverage 93.70% 93.69% -0.01%
==========================================
Files 26 26
Lines 21404 21460 +56
Branches 902 902
==========================================
+ Hits 20056 20108 +52
- Misses 1310 1314 +4
Partials 38 38
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question on coverage.
I vote to not add more sortedness requirements if we don't have a good algorithmic reason to. Plus, it's not obvious to me that |
Well, we need to choose some keys to sort on to make things deterministic (which we definitely want, we had loads of problems in the past with different C implementations having slightly different sort orders). I chose the current ordering because that's what comes out of msprime. So, my vote would be to formalise the order that pops out naturally from msprime (starting here - sort by (source, dest, left). Unless there's a good reason otherwise, we might as well go with an existing ordering. Agreed on not adding any more sortedness requirements to the input, that seems like it's more trouble that it's worth. |
I'm a bit confused still: by "deterministic" you mean specifying a total order, right? Don't we need some more keys for that, since you could have more than one migration event with the same |
Yeah, I mean a fully specified ordering, because the output of sort isn't deterministic otherwise. Ah, you're right |
Sure, sounds good. I guess that sorting of mutations can be skipped with the bookmark if it's a performance problem. So, |
Yep, agreed |
We should probably try to get #1108 in first, since @petrelharp has had to do a lot of messing around with it already. Unless you'd prefer to get this in first Peter? The updates I need to do are fairly small. |
I would love to not have to do more mucking around with #1108, yes. |
Is this ready for me to have a look over? |
No, not yet. Thanks for the ping though, will do ASAP. (Writing slides for a talk tomorrow atm!) |
Closes tskit-dev#22 Closes tskit-dev#117
f7ab0c5
to
3382b83
Compare
Ready for final review and merge here @benjeffery |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, annoyingly I can't find anything to comment on!
Closes #22
Closes #117
(I've not done any docs because I can't see anywhere we've said this stuff wasn't supported)