Skip to content

From Seurat to AnnData and scVelo #452

Answered by WeilerP
Jeff87075 asked this question in Q&A
Discussion options

You must be logged in to vote

@Jeff87075, sorry, not sure what you mean by ldata. Could you elaborate?

I'll try to briefly outline how to proceed on going from a Seurat object to AnnData and using scVelo:

Conversion from Seurat to AnnData

When you have your Seurat object data you can, for example, convert it to AnnData using anndata2ri. See, for example, here how you can use it in a Jupyter notebook. This will keep the UMAP embedding (should be added as adata.obsm['X_umap']) and clusters (stored as column in adata.obs).

Alternatively, if you want to do everything in R, you can use Seurat and SeuratDisk:

library(Seurat)
library(SeuratDisk)

data <- ReadRDS(data.rds)
SaveH5Seurat(data, filename = "data_from_seurat.h5Seurat

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@Jeff87075
Comment options

@WeilerP
Comment options

@Jeff87075
Comment options

@WeilerP
Comment options

@WeilerP
Comment options

Answer selected by Jeff87075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #448 on May 20, 2021 16:36.