Concatenate and shift functions#3165
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3165 +/- ##
==========================================
+ Coverage 89.60% 89.61% +0.01%
==========================================
Files 28 28
Lines 31895 31939 +44
Branches 5857 5866 +9
==========================================
+ Hits 28579 28622 +43
Misses 1886 1886
- Partials 1430 1431 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
429de0d to
8341a07
Compare
|
Thanks for the review @petrelharp . I tacked on another quick commit to add that ref to subset in the union docs. |
3330365 to
1923865
Compare
jeromekelleher
left a comment
There was a problem hiding this comment.
There's a few tricky subtleties not handled here.
- We should definitely not alter a parameter table collection - so I don't think we need TableCollection.concatenate and can just have TreeSequence.concatenate(other1, other2,....) (I realise that I asked you to focus on the pairwise approach, but I hadn't realised that we were updating all the tablecollections in order to implement)
- I'm not clear how
TableCollection.shift()is interacting with the indexes. This is important.
|
OK, refactored so we only have a single |
Sorry what did you mean there, @jeromekelleher? |
|
And - I don't see why |
The previous version called .shift on the parameter TableCollection, which modifies it. So, calling |
I guess it shouldn't alter the relative order of the edges all right - but I'm not clear whether the current code will automatically invalidate the indexes, or if they are just left as is and that's OK? |
jeromekelleher
left a comment
There was a problem hiding this comment.
Looks good - missing an edge case on migrations though.
|
Addressed comments and squashed. Should be mergeable. |
jeromekelleher
left a comment
There was a problem hiding this comment.
Looks good to merge, once we've covered the remaining missing bit
Description
Fixes #3164
PR Checklist: