Seurat object
0
0
Entering edit mode
2.7 years ago
lsudupe ▴ 20

I save my seurat object after performing some analisis and I want to open it in another session.

When I tried to load my object with LoadH5Seurat() function it give my this error

prueba_load_1 <- LoadH5Seurat("./GSM5355663_WT_Sham/Sham_object_update.h5Seurat")
Validating h5Seurat file
Initializing SCT with data
Adding counts for SCT
Adding scale.data for SCT
Adding variable feature information for SCT
Adding miscellaneous information for SCT
Initializing Spatial with data
Adding counts for Spatial
Adding miscellaneous information for Spatial
Adding reduction pca
Adding cell embeddings for pca
Adding feature loadings for pca
Adding miscellaneous information for pca
Adding reduction umap
Adding cell embeddings for umap
Adding miscellaneous information for umap
Adding graph SCT_nn
Adding graph SCT_snn
Adding image slice
la condicin tiene longitud > 1 y slo el primer elemento ser usadoError in UseMethod(generic = "DefaultAssay<-", object = object) : 
  no applicable method for 'DefaultAssay<-' applied to an object of class "list"

I check it and I found this issue comment in git https://github.com/satijalab/seurat/issues/1946 where it looks like the error appear when your seurat object isn't update. I update it like this:

Sham_object_update = UpdateSeuratObject(object = Sham_object)
Validating object structure
Updating object slots
Ensuring keys are in the proper strucutre
Ensuring feature names don't have underscores or pipes
Object representation is consistent with the most current Seurat version
> Sham_object_update
An object of class Seurat 
46450 features across 1689 samples within 2 assays 
Active assay: SCT (14165 features, 3000 variable features)
 1 other assay present: Spatial
 2 dimensional reductions calculated: pca, umap

But when I saved it

SaveH5Seurat(Sham_object_update, filename = "Sham_object_update.h5Seurat")
Convert("Sham_object_update.h5Seurat", dest = "h5ad")

and try to load it again, it raise me the first error I showed. Why am I getting this error? Thanks

seuratobject seurat • 2.5k views
ADD COMMENT

Login before adding your answer.

Traffic: 1852 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6