Processing a Seurat V5 object

Hi, when I try to ‘Process project’ for a project with an uploaded Seurat object, it fails saying “We couldn’t get the counts slot from the RNA assay of the uploaded Seurat object. Please check requirements and re-upload after fixing.”. The object was built in Seurat V5 and the RNA counts are in seurat_object$RNA@layers$counts rather than the expected seurat_object$RNA@counts
This might be the issue. Is there a workaround? Thanks, Donald

Hi Donald! The issue is in fact related to the use of Seurat V5 here, because Cellenics still uses V4, so the expected Assay slot is Assay V4. Using the newer version will break the platform.

I believe that the most straightforward way to convert the object for use in Cellenics is to replace the RNA assay with a V4 assay. The other slots that Cellenics uses (samples, reductions and meta.data) should be compatible right off the box. I’ve created a project with the fixed object and shared it with you. Please let me know if you have any issues with this new project.

Also, for reference, here is the code you can use to convert other projects:

# r is the V5 object, already loaded into memory with ReadRDS().
# Seurat V5 conveniently keeps the ability to create v4 assay objects.

fixed_r <- r
fixed_r@assays$RNA <- CreateAssayObject(r@assays$RNA$counts)

#Save fixed_r with saveRDS()

Thanks Oliver.
All the best,
Donald

Hi again Oliver, can you check that code for me? My counts are in a version 5 object so doesnn’t have r@assays$RNA$counts. When I try to pass the actual counts (r$RNA@layers$counts or
r@assays$RNA@layers$counts) to CreateAssayObject it complains that there are “No cell names (colnames) names present in the input matrix”.
Any help appreciated. Many thanks,
Donald

I’ve tried it and had no issues accessing counts directly (r@assays$RNA$counts). However, an alternative solution, and the one recommended by the Seurat authors is to do the following:

# r is the V5 object, already loaded with ReadRDS().
# Seurat V5 conveniently keeps the ability to create v4 assay objects as well as cast from V5 to V3.

fixed_r <- r
fixed_r@assays$RNA <- as(object = r@assays$RNA, Class = "Assay")

#Save fixed_r with saveRDS()

If it doesn’t work let me know and we can find another alternative.

Many thanks Oliver. That worked. I think one issue I had was that I generated the object in Seurat v5 but was trying the fix in v4.
Thanks again and all the best,
Donald