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 “Assay5” object: Layers must be two-dimensional objects #9476

Open
sguttr opened this issue Nov 13, 2024 · 1 comment

Comments

@sguttr
Copy link

sguttr commented Nov 13, 2024

I am currently trying to split my Seurat object into samples in order to follow the Integration vignette. My Seurat object is currently already split into days:

An object of class Seurat
22798 features across 1342 samples within 1 assay
Active assay: RNA (22798 features, 2000 variable features)
11 layers present: counts.Day 3, counts.Day 4, counts.Day 5, counts.Day 6, counts.Day 7, data.Day 3, data.Day 4, data.Day 5, data.Day 6, data.Day 7, scale.data
2 dimensional reductions calculated: pca, umap

I tried JoinLayers to create just three layers (counts, data and scale.data) and then converted the object back into a Seurat object because JoinLayers created an Assay5 file. However, I keep getting errors when using the split function.

I am following this code:

obj[["RNA"]] <- split(obj[["RNA"]], f = obj$Method)

But I keep getting this error code:

Error in validObject(object = object) :
invalid class “Assay5” object: Layers must be two-dimensional objects

If anyone could explain why this is happening and how I can rectify it, that would help. Thanks :)

@samuel-marsh
Copy link
Collaborator

Hi,

Can you please post the full code that you are running and the output of sessionInfo()?

Thanks,
Sam

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