Open
Conversation
… row_colors matches heatmap zoom coordinates
…sync by matching yaxis9 and xaxis3
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.
Overview
Closes #780 and closes #778 related to bugs with Clustergram zooming behavior.
About
Description of changes
This PR fixes two related zoom synchronization bugs in the Clustergram component:
1. Fix column_colors and row_colors zoom synchronization
Problem: When zooming into a region of the heatmap, the
column_colorsandrow_colorsannotation bars were remaining at their original scale rather than zooming in to match the selected region. This made it impossible to identify which color annotations corresponded to the zoomed cells (Issue #780).Solution Implemented:
_get_row_colors_heatmap()and_get_column_colors_heatmap()to accepttickvalsparameters and use the same coordinate system as the main heatmap.matchesparameter to link color heatmap axes (xaxis6, xaxis7 for column colors; yaxis10 for row colors) with the main heatmap axes (xaxis11, yaxis11).2. Fix dendrogram zoom synchronization
Problem: When zooming into the heatmap, the dendrograms would zoom, but display an incorrect portion of the dendrogram not actually corresponding to the selected heatmap region, as thoroughly documented with examples in Issue #778.
Solution:
matchesparameter to dendrogram axes in addition to the existingscaleanchorparametermatches="y11"to synchronize with heatmap y-axismatches="x11"to synchronize with heatmap x-axisTechnical details: The key difference is that
scaleanchoronly maintains the scale/aspect ratio between axes, whilematchesensures axes share the same coordinate system and zoom level. Both are needed for dendrogram zooming to work properly:scaleanchorensures proper visual alignment andmatchesis necessary for synchronized zooming.Example and screenshots
Example Clustergram:
Before fixes:

After fixes:
