-
Notifications
You must be signed in to change notification settings - Fork 25
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
Reorder children in tree #217
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #217 +/- ##
==========================================
+ Coverage 78.80% 78.82% +0.02%
==========================================
Files 88 88
Lines 7774 7782 +8
==========================================
+ Hits 6126 6134 +8
Misses 1648 1648
☔ View full report in Codecov by Sentry. |
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!
Happy to merge it in as is, but I'm curious if you think it would be worthwhile to include functionality to optimize leaf ordering with respect to a piece of meta data (e.g., cell type annotation)? I suppose it could be a separate function that invokes the reorder_children
method that you implemented.
I think a separate function that organizes the entire tree with respect to a meta data item would make the most sense. But I'm not sure we want to include this in Cassiopeia since it requires significant customization. What's the order of the items? How to handle missing data? How to order children with impure subtrees? How to organize with respect to multiple metadata columns? Probably better to let each user write their own function that calls |
All good points. I'll make an issue for providing an example in the existing plotting tutorial (just an enhancement). If it's alright, I'll assign it to you for when you have time to provide this example. Thanks for discussion, and I'll go ahead and merge this in. |
Added
reorder_children
method toCassiopeiaTree
. This is useful for reordering clades prior to plotting a tree.