Seurat object problem
0
0
Entering edit mode
17 months ago
Andy ▴ 120

Hello,

I encountered following problems:

for (i in 1:length(scRNAlist)) {
   scRNAlist[[i]][["percent.mt"]] <- PercentageFeatureSet(object = scRNAlist[[i]], pattern = "^MT-") ##mito genes
   scRNAlist[[i]] <- subset(scRNAlist[[i]], subset =  percent.mt < 10)
}

Error in UseMethod(generic = "DefaultAssay", object = object) :    no applicable method for 'DefaultAssay' applied to an object of class "c('dgCMatrix', 'CsparseMatrix', 'dsparseMatrix', 'generalMatrix', 'dCsparseMatrix', 'AnyMatrix', 'dMatrix', 'sparseMatrix', 'compMatrix', 'Matrix', 'xMatrix', 'mMatrix', 'replValueSp')"

I found out that it is due to a different version of the Seurat object. However, I did not understand what caused the problem. Could it be caused by the way I created the Seurat objects? Moreover, how can I solve the problem?

Thanks
Andy

Seurat • 1.5k views
ADD COMMENT
0
Entering edit mode

Have you validated that these are all Seurat objects? The error suggests that one a sparse matrix rather than a Seurat object.

ADD REPLY

Login before adding your answer.

Traffic: 1797 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6