Convert AnnotatedDataFrame S4 object from GEO datasets to Seurat Object
Entering edit mode
Last seen 3 months ago

Hi everybody, I'm trying to use data from GEO datasets GSE138826 They seem to offer an RDS file that contains all data that they processed with Seurat in their paper and the file is Integrated single cell data with several time points and cell identity in the metadata. So it seems like it has (most of?) the data an S4 object of class seurat with integrated data would have. They have both counts and SCT normalized counts. However when I use readRDS to get the data I get an S4 object of class annotateddataframe. I did separate the data to work with only the counts or only the SCT normalized counts. I'm beginner in the usage of Seurat, particularly integrated data so I'm sorry if the question is too basic. I guess the file they provide to GEOdatasets is easily usable and they did use Seurat for analysis. I can read gene counts for example with this

data[c("Dpp4", "Nvl", "Srp9"), 1:30]

like in the tutorial for Seurat. However when I try to scale data

list[["RNA"]] <- ScaleData(list[["RNA"]], verbose = FALSE)

I get this error message

Error in as.vector(data) : no method for coercing this S4 class to a vector

But it works for an S4 object of class Seurat so I guess I have to convert first my object as a Seurat Object before I can proceed with the regular steps of the tutorial. To convert I have tried

new_seurat_object <- CreateSeuratObject(counts = list[["RNA"]], min.cells = 5)    or
new_seurat_object <- as.Seurat(list[["RNA"]],slot = "data", assay = "RNA")

Error in UseMethod(generic = "as.Seurat", object = x) : no applicable method for 'as.Seurat' applied to an object of class "c('AnnotatedDataFrame', 'Versioned')"

seurat <- CreateSeuratObject(counts = list[["RNA"]]@data, min.cells = 5)

Error: cannot allocate vector of size 7.7 Gb Anyway this last one wouldn't have the metadate which is in list[["RNA"]]@varMetadata

I have loaded dplyr, Seurat and patchwork in my R envronment. thanks for any help, best regards

biobase SingleCellData seurat SingleCell • 268 views
Entering edit mode
Last seen 11 minutes ago
United States

Seurat isn't a Bioconductor package, so you should instead be asking the Seurat folks for help.

Login before adding your answer.

Traffic: 933 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6