-
Notifications
You must be signed in to change notification settings - Fork 0
Datashader HeatMap function pull request #30
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
base: dev
Are you sure you want to change the base?
Conversation
Add layer information in histogram title
Fix Histogram Return Value
refactor histogram by returning hist_data
Spatial annos
| def heatmap_datashader(x, y, labels=None, theme=None, | ||
| x_axis_title="Component 1", y_axis_title="Component 2", | ||
| plot_title=None, **kwargs): | ||
| """ |
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.
Make sure the docstring follows the same format as the other functions in visualizations. Also make sure all your lines are < 80 chars in length
Parameters
----------
var_name: type, [optional/default]
description
Returns
-------
...
| logging.basicConfig(level=logging.INFO, | ||
| format='%(asctime)s - %(levelname)s - %(message)s') | ||
|
|
||
| def heatmap_datashader(x, y, labels=None, theme=None, |
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.
Why is the input x and y, and not an adata object? I think all the spac functions are supposed to have adata as input
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.
This is a low-level function which is designed to only accept x and y coordinates. See visualize_2d_scatter() as an example which does not accept adata but rather x and y.
| 'inferno': ds.colors.inferno, | ||
| 'color_lookup': ds.colors.color_lookup, | ||
| } | ||
| cmap = themes.get(theme, ds.colors.viridis) # Default to 'viridis' if theme is not specified |
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.
George wants us to use the get_defined_color_map function to get the color_map from the adata object for consistency across functions
| heatmap_datashader(self.x, self.y, labels=wrong_labels) | ||
| self.assertIn("Labels length should match x and y length", str(context_manager.exception)) | ||
|
|
||
|
|
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.
Add a test of it running with valid inputs to make sure it returns a figure and correct number of subplots
Ahmad8864
left a comment
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
| 'inferno': ds.colors.inferno, | ||
| 'color_lookup': ds.colors.color_lookup, | ||
| } | ||
| cmap = themes.get(theme, ds.colors.viridis) # Default to 'viridis' if theme is not specified |
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.
Move this comment to its own line so the line is >80 chars
…he import of unneccesary libraries
fix(select_values): added support when observation are numerical
Add comments UTAG tests
… added unit tests
…dataset fix(summarize_dataframe): remove duplicated missing index
…ncolor feat(visualize_nearest_neighbor): add pin-color and corresponding uni…
merge updated summarize_dataframe and visualize_nearest_neighbor with pin-color from dev to release_dev
…and helpers and unit test files individually
…nearest_neighbor feat(pin_color): add pin color feature to visualize nearest neighbor …
merge dev into release_dev with updated visualize_nearest_neighbor by adding pin-color feature
…nearest_neighbor fix(visualize_nearest_neighbor): rewrite unit tests and move up libr…
merge the updated visualize_nearest_neighbor function and unit tests from dev to dev_release
step: bumping minor version from 0.8 to 0.9
step: bumping minor version from 0.8 to 0.9
Minor version bumping from v0.8.0 to v0.9.0
Created datashader heatmap function with faceted plots based off annotations as well as included test cases for usability.