You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scanpy.pl.dotplot - does standard_scale need to subtract the min? #1451
I am wondering about the motivation that went into subtracting the min when performing standardisation of the scale between genes. I find that it leads a misleading visualisation when the genes expressed by all clusters so I am now copying and modifying your function for my work. Do you think it would be justified to remove min subtraction step or make it optional?
Thanks, and please let me know what you think!
If I recall correctly, the implementation mimic the one found in seaborn. Besides, the idea is to map the gene expression to an scale from 0 to 1, thus is needed to subtract the min.
Exactly. But I do agree that it can be misleading in some cases e.g if there is one cell with a single UMI out of 1000 cells, this nonzero mean value will be mapped to 1, giving the impression that there is something going on. I recently abandoned standard_scale and switched to zscore and RdBu_r colormap both in heat maps and dotplots with vmin=-3 and vmax=3, which leads to a better standardization.
The only caveat of this normalization in dotplot is that the dot size is determined by the number of cells above the average, which was possibly higher than zero before zscore, compared to the regular zero cutoff. In this sense it makes it more stringent than zero expression cutoff.
Activity
fidelram commentedon Oct 12, 2020
If I recall correctly, the implementation mimic the one found in seaborn. Besides, the idea is to map the gene expression to an scale from 0 to 1, thus is needed to subtract the min.
gokceneraslan commentedon Oct 12, 2020
Exactly. But I do agree that it can be misleading in some cases e.g if there is one cell with a single UMI out of 1000 cells, this nonzero mean value will be mapped to 1, giving the impression that there is something going on. I recently abandoned standard_scale and switched to zscore and RdBu_r colormap both in heat maps and dotplots with vmin=-3 and vmax=3, which leads to a better standardization.
The only caveat of this normalization in dotplot is that the dot size is determined by the number of cells above the average, which was possibly higher than zero before zscore, compared to the regular zero cutoff. In this sense it makes it more stringent than zero expression cutoff.