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

Handle all-zero (?) expression rescaling in heatmap #45

Open
bhavyaac opened this issue Jul 29, 2021 · 1 comment
Open

Handle all-zero (?) expression rescaling in heatmap #45

bhavyaac opened this issue Jul 29, 2021 · 1 comment
Assignees
Labels
bug Something isn't working clusters-app documentation Improvements or additions to documentation

Comments

@bhavyaac
Copy link
Member

bhavyaac commented Jul 29, 2021

Although I've specified NA values to be coloured grey in the heatmap (na_col = "#e5e5e5" in pheatmap), there are some genes that still display all-white rows when certain cell types are selected:
image
(above I've selected Astrocytes, Neurons, and Other, and the gene with an all-white row is Gm37381)

What's weirder is that these same genes don't have all-white rows when I add an extra cell type to the existing choices:
image
(above I've selected Ependymal, Astrocytes, Neurons, Other, and the same gene Gm37381 is now all blue except for some Ependymal expression)

This behaviour makes me think that the gene has all-zero expression in the first combination of cell types I chose, not NA values. I suspect that the row rescaling in the heatmap has shifted all of the zero values to 0.5 (which is white according to the legend) before plotting.

I want to handle this case by making sure that the expression is not rescaled if the gene has all-zero expression across all cell types chosen - this should hopefully also give better clustering results. (Simply changing the colour of these points and not the values themselves will not take care of possible changes in clustering)

I also want to include a note about the row rescaling taking place in this tab's documentation.

@bhavyaac bhavyaac added bug Something isn't working documentation Improvements or additions to documentation clusters-app labels Jul 29, 2021
@bhavyaac bhavyaac self-assigned this Jul 29, 2021
@bhavyaac
Copy link
Member Author

The same gene Gm37381 also causes issues in the joint expression by sample tab - this was documented in #35 . I may want to solve both of these issues in the same update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clusters-app documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant