This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Seurat object problem

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

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

0 answers

No answers yet.

Log in to answer this question.