Repository navigation
Conversation
This was referenced Oct 1, 2026
Collaborator
Author
|
Moved to GiottoVisuals, where the plotting code lives: giotto-suite/GiottoVisuals#156. The S3 method registers there with no dependency on Giotto, since Giotto imports GiottoVisuals. |
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.
A
plot()method forgiottoTree:what = "tree"(the default): the plainhclustplot, as before....passes through, soplot(tree, hang = -1)keeps working.what = "heatmap": drawsattr(tree, "cor_matrix")in leaf order, with the tree's branches on both axes (ComplexHeatmap, already in Suggests). The title names the correlation type and the feature count.This is the one place where drawing the attached matrix is honest: it's the matrix the branches were built from, so colors and branches can't disagree. It describes the tree, not whatever object is current. For correlations recomputed from an object in a tree's order, use
GiottoVisuals::showClusterHeatmap(cluster_custom_order = tree$labels[tree$order])(GiottoVisuals#154), which deliberately draws no branches. A tree without its matrix errors and points there.The method is registered as
S3method(plot, giottoTree). Inside Giotto,plotis terra's S4 generic, so a plain@exportwould only have exported the function. It's checked from a user session: bothwhatoptions dispatch.This was first pushed by mistake onto #1323's branch after #1323 had merged, and is re-raised here on a fresh branch off gsource.
Verification
test_03_giotto_tree.R:plot(tree, hang = -1)returns the tree with no warningcor_matrixin leaf order, and its row dendrogram is the treeshowClusterHeatmap(cluster_custom_order =)11 tests, 33 expectations, all passing.
🤖 Generated with Claude Code