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

Scaling after conversion from anndata to seurat object #163

Open
pmarzano97 opened this issue Sep 13, 2023 · 0 comments
Open

Scaling after conversion from anndata to seurat object #163

pmarzano97 opened this issue Sep 13, 2023 · 0 comments

Comments

@pmarzano97
Copy link

pmarzano97 commented Sep 13, 2023

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:

  • sc.pp.normalize_total(adata, target_sum = 1e4)
  • sc.pp.log1p(adata)

I do not scale the counts since when I check the expression of markers via DotPlots/MatrixPlots/..., I use the option in the function standar_scale = '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

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

No branches or pull requests

1 participant