This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to obtain a data frame from "SeuratObject".

I am trying to obtain a csv counts matrix file from the SeuratObject but I run into an error.

k<-as.data.frame(a$RNA) ## a it the SeuratObject Error in as.data.frame.default(a$RNA) : cannot coerce class ‘structure("Assay", package = "SeuratObject")’ to a data.frame

k<-as.matrix.data.frame(a$RNA) ## a it the SeuratObject Error in X[[j]] : this S4 class is not subsettable

Any help please

count matrix

1 answer

Did you follow the official guide?

https://satijalab.org/seurat/articles/essential_commands.html#data-access-1

Log in to answer this question.