-
Notifications
You must be signed in to change notification settings - Fork 77
extend union
to do "disjoint union"
#3283
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3283 +/- ##
===========================================
- Coverage 89.81% 76.27% -13.55%
===========================================
Files 29 28 -1
Lines 32665 25112 -7553
Branches 5982 4641 -1341
===========================================
- Hits 29338 19153 -10185
- Misses 1886 4759 +2873
+ Partials 1441 1200 -241
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Whoops - now this should be ready to write tests for. |
And fix concatenate()
I made a PR to your PR, @petrelharp - the only thing I can see that might be a problem is that we might want to include empty sites when unioning one TS with another. If so, we could either:
I guess (2) gives the most flexibility for the user? |
Disjoint union: add some python tests
Let's keep the convo here, and lmk if you don't have permissions to push here. That all looks good; I think we just need some additional checks for correctness of the union (a lot of the checks are just that the number of things is right). I guess I don't think we should have a separate It's tempting to have a |
There; I switched the behavior to add all sites for reals if |
Great! I'll add more checks on actual correctness. Thanks @petrelharp ! |
Here's the start at what we discussed in #3183. Might you have a go at putting in the python tests, @hyanwong?
Something I haven't done that we said we might in the other PR is require that if
all_edges
orall_mutations
are True thencheck_shared_overlap
is False. I don't think we actually need to require this (since in some cases all three might be true and it's fine!) but we should probably say in the docstring that the user probably wants this to be the case. (I just don't remember why that is right now.)Still TODO:
other
has no edges that we can use this to add mutations to a subset of nodes in an existingts
ts
down to two disjoint spans and then union these together we get backts