This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Dealing with 2 different layers of counts within RNA assay in seurat

I am woking with a seurat object which has the following information:

obj_seurat
An object of class Seurat 
31057 features across 6471 samples within 1 assay 
Active assay: RNA (31057 features, 0 variable features)
 2 layers present: counts.Gene Expression, counts.Antibody Capture

As you can see, RNA assay has 2 layers present Gene Expression and Antibody Capture. I want to remove the counts.Antibody Capture layer from within RNA assay and make it into a separate "HTO" assay. The reason I want to do this is because, when I run FindVariableFeatures on the RNA assay, I am getting an error:

Error in `.SelectFeatures()`:
! None of the features provided are present in the feature set

This is because these 2 count matrices are different; one is rna expression matrix and other is antibody expression.

How can I remove the antibody capture counts from within RNA assay and then make a separate assay for these counts?

Thanks!!

r seurat

1 answer

Please do check how you can remove a layer or subset of layer from a Seurat Object in the following link:

Seurat v5 Command Cheat Sheet

Thanks!!! This worked

obj_seurat[["RNA"]]$`counts.Antibody Capture`  <- NULL

Log in to answer this question.