satijalab / sctransform

R package for modeling single cell UMI expression data using regularized negative binomial regression
GNU General Public License v3.0
208 stars 33 forks source link

Converting `scale.data` layer for scTransform to sparce matrix #199

Closed siegelna closed 3 days ago

siegelna commented 4 days ago

I am aware that using SCT for normalization of single-cell data is considered best practice, however plotting violin plots after normalization with SCT results in discrete values plotted (see below). The scale.data layer contains the expression level that people are more accustomed to viewing. Unfortunately, when SCT is run without excluding non-variable genes the object becomes huge. This is due to the layer not being stored as sparce matrix.

Are there any negative repercussions with converting the non-sparce matrix into sparce and then replacing it with the original scale.data layer?

 Standard normalization

image

SCT normalization

image

saketkc commented 3 days ago

scale.data layer of SCT should not be used for visualization as these are pearson residuals.

siegelna commented 1 day ago

Thank you for the quick response; what would you recommend for visualizing violin plots from SCT normalized data?