Skip to content
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

Advanced diplotype clustering - investigate CNV imshow weirdness #1

Conversation

alimanfoo
Copy link

Hi @sanjaynagi, I did some digging into the CNV imshow weirdness. In this PR I stripped back the _plot_dendro_cnv_bar() method to the simplest possible implementation. I then tested it in the spike_dipclust_cnv notebook, outputting both the final figure and the CNV subplot.

What's weird is that the CNV subplot respects the color_continuous_scale parameter and the zmin and zmax parameters, but in the final combined figure these are ignored, meaning that the default PuOr colorscale is always used, and the zmin and zmax are always obtained from the data.

I think this has to be something to do with the way that the subplots are combined into a single figure within the concat_subplots() method. Something about this is erasing some of the parameters originally given to imshow.

That's as far as I've got for now, hope it's useful :)

@alimanfoo
Copy link
Author

I did a bit more digging, have a basic working version here. Looks like we have to use go.Heatmap() rather than px.imshow() otherwise the zmin, zmax and colorscale parameters get lost.

image

@sanjaynagi sanjaynagi merged commit d4925e4 into sanjaynagi:amino-acid-heatmap-diplotype-clustering-21-05-24 Jun 11, 2024
@alimanfoo alimanfoo deleted the advanced-diplotype-clustering-alimanfoo-2024-06-10 branch June 11, 2024 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants