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

Error in validObject(object = .Object) : invalid class “Seurat” object: 'assays' must be a named list #227

Open
PietroAndrei opened this issue Dec 2, 2024 · 1 comment

Comments

@PietroAndrei
Copy link

Hi,

I am trying to create a new S4 object class that contains all the slots already defined for a Seurat object, plus an additional slot.

NewClass <- setClass(
  Class = "NewClass",
  contains="Seurat",
  slots = c(
    "newslot" = c(NULL,"list")
  )
) -> NewClass

The problem is that when I try to convert any seurat object to the new class

as(seurat,'NewClass')

I got the following error message

Error in validObject(object = .Object) : 
  invalid classSeuratobject: 'assays' must be a named list

Any idea on how to fix this issue?
I am currently using Seurat 5.1.0 and SeuratObject 5.0.2.

Thank you!

Pietro

@renyzh5-2
Copy link

I met the same problem!

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

2 participants