Integration of Datashader Library into Automatically Scaling Scatter Plot Heatmaps#53
Closed
SudeepMangam wants to merge 4 commits intoFNLCR-DMAP:mainfrom
Closed
Integration of Datashader Library into Automatically Scaling Scatter Plot Heatmaps#53SudeepMangam wants to merge 4 commits intoFNLCR-DMAP:mainfrom
SudeepMangam wants to merge 4 commits intoFNLCR-DMAP:mainfrom
Conversation
added 4 commits
July 31, 2025 23:16
Author
|
Hi all, |
This was referenced Oct 23, 2025
Contributor
|
the data shader implementation has moved to the spac package. |
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.
Description:
The goal of this is to implement automatic heatmap scaling through the datashader app. This allows better visualization of the data. Before, the data could be compressed tightly, with limited readability. Now, with automatic scaling and pin color additions, this issue should be resolved.
Requirements:
OS: Ubuntu via WSL on Windows 11
Python Version: 3.9.13 (Miniconda)
Conda Environment: spacy_viz_py3913_wsl
Dataset Used: Custom .h5ad file
Solution:
The integration is as follows. A button would display the heatmap using the datashader library. In order to implement this, a utility function renders the heatmap using the library. The utility function creates a high-resolution heatmap using Datashader, visualizing point density or average color values. For the server logic, I created a mode for the heatmap with the datashader library and color enabler for pin colors. The color enabler toggle dynamically adds or removes a dropdown menu for selecting a feature to color scatterplots or heatmaps. When active, it basically extracts and passes color values from AnnData to either Datashader or spac.visualization for enhanced visual rendering. If the color toggle is off but the heatmap toggle is on, it removes the UI color out. The addition of colorcet and datashader library is included a specific commit-based package as a dependency in environment.yml.