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
Have you validated that these are all Seurat objects? The error suggests that one a sparse matrix rather than a Seurat object.