feat: heatmap ordering with tree directly#24
Merged
Merged
Conversation
Heatmap plotting code now mostly just uses ComplexHeatmap directly, without invoking ggtree to plot the tree portion of the heatmap. This reduces a bunch of code for figuring out tree plotting order and aligment, and lets ComplexHeatmap do that directly. The ggtree install has also been fragile and different versions seems to really alter success of plotting.
Removing dependency on ggtree and separate heatmap images for tree and states, and instead uses complexheatmap for all of it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previous code plotted a tree heat map, a states heatmap, and then combined them. This relied on a bunch of steps for ensuring correct ordering. It also used ggtree for creating part of the tree-heatmap side, but that dependency has been unstable and behaviour changes across versions.
This new code passes a dendrogram directly to ComplexHeatmap for combining the two elements.
...I think it's all working.
Also added is a "tree" construction method I have been working with, with some success.