pertpy
pertpy copied to clipboard
cmap in GuideAssignment.heatmap hardcoded
Please make sure these conditions are met
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of pertpy.
- [x] (optional) I have confirmed this bug exists on the main branch.
Report
cmap is currently hardcoded to "viridis" in GuideAssignemnt.plot_heatmap: https://github.com/scverse/pertpy/blob/main/pertpy/preprocessing/_guide_rna.py#L377
This should probably be removed, allowing sc.pl.heatmap (and, by extension, plt.imshow) define the default. Alternatively, use kwargs.set_default(cmap, ...). In the latter case, it should probably be a white/light-dark cmap like magma_r, Blues, or YlGnBu, which I would believe to be generally better for visualizing sparse data like this.
Versions
Makes sense. Would you be willing to make a PR for that, please?