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

readRDS(object) requires UpdateSeuratObject(object) - results in Error in [[<-: ! Cannot add new cells with [[<- #167

Open
MGjorgoska opened this issue Nov 9, 2023 · 4 comments

Comments

@MGjorgoska
Copy link

After updating my R Studio to version 4.3.2, and the package "Matrix" to version 1.6-1.1, I have problems reading rds files with readRDS().
I am using the developer Seurat version 5.0.0.
I am accessing the rds file via synapser, with synGet(object), reading the file with readRDS(object$path).
After this I get a message to run UpdateSeuratObject(), after which I receive this error:
object<-UpdateSeuratObject(object)
Validating object structure
Updating object slots
Ensuring keys are in the proper structure
Updating matrix keys for DimReduc ‘pca’
Updating matrix keys for DimReduc ‘umap’
Updating matrix keys for DimReduc ‘harmony’
Updating matrix keys for DimReduc ‘umapharmony’
Warning: Assay RNA changing from Assay to Assay
Error in [[<-:
! Cannot add new cells with [[<-
Run rlang::last_trace() to see where the error occurred.

rlang::last_trace()
<error/rlang_error>
Error in [[<-:
! Cannot add new cells with [[<-

Backtrace:

└─SeuratObject::UpdateSeuratObject(object)
├─base::suppressWarnings(...)
│ └─base::withCallingHandlers(...)
├─methods (local) [[<-(tmp, obj, value = <Assay[,24025]>)
└─SeuratObject (local) [[<-(tmp, obj, value = <Assay[,24025]>)
Run rlang::last_trace(drop = FALSE) to see 1 hidden frame.

@eddelbuettel
Copy link

Likely duplicate of #166 -- you most likely need to reinstall SeuratObject following the upgrade to Matrix 1.6-2.

@mojaveazure
Copy link
Member

Hi @MGjorgoska,

This is likely because your object has cells present in one part of the object, but not another. This behavior isn't allowed in SeuratObject v5. If you can provide the original Rds, I'd be happy to take a look

@MGjorgoska
Copy link
Author

Hi @mojaveazure,
Thanks, that would be great.
The rds file (ID: syn25569736) is a 37 GB file, stored on synapse.org (https://www.synapse.org/#!Synapse:syn51091882).
I am accessing it via synapser package, with synGet().
Looking forward to your feedback.
Best, MGjorgoska

@MGjorgoska
Copy link
Author

@mojaveazure anything new on this? I am still getting the same error.

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

3 participants