mojaveazure / seurat-disk

Interfaces for HDF5-based Single Cell File Formats
https://mojaveazure.github.io/seurat-disk
GNU General Public License v3.0
156 stars 50 forks source link

Scaling after conversion from anndata to seurat object #163

Open pmarzano97 opened 1 year ago

pmarzano97 commented 1 year ago

Hello world! I have a question related to the conversion from an anndata object (generated by Scanpy Python pakage) to a Seurat Object (seurat version 4.3.0).

In the workflow that I normally apply, when I create the anndata object I do not scale the counts stored in .X layer, I only run the following functions to normalize the counts:

I do not scale the counts since when I check the expression of markers via DotPlots/MatrixPlots/..., I use the option in the function _standarscale = 'var', so that the marker gene expression is scaled.

And here comes my question. When I convert the anndata object to a Seurat one, in the seuratobject the scale layer (seuratobject[["RNA"]]@scale.data) is empty. This means that I should scale the expression with the function ScaleData(seuratobject)? The normalization is not necessary since the counts that I'm importing into the seuratobject are already normalized, but since in Seurat there is not the option to scale the expression within the DotPlot/... function, should I scale right after the conversion?

Thanks for the help! Paolo