DoubletFinder icon indicating copy to clipboard operation
DoubletFinder copied to clipboard

paramsweep error

Open bykovam opened this issue 1 year ago • 3 comments

I'm trying to run DoubletFinder for the first time, and I'm having an issue when trying to run paramsweep.

When running sweep.res.list<- paramSweep(Seurat_Object, PCs = 1:50, sct = FALSE) the results are

sweep.res.list <- paramSweep(Seurat_Object, PCs = 1:50, sct = FALSE) Error in seu@assays$RNA$counts : $ operator not defined for this S4 class

Now it might be an issue with Seurat, as running Seurat_Object@assays$RNA$counts

produces

Error in Seurat_Object@assays$RNA$counts : $ operator not defined for this S4 class

But running Seurat_Object@assays[["RNA"]]@counts notifies that it's a sparse matrix of class "dgCMatrix"

bykovam avatar Dec 04 '23 22:12 bykovam

I am getting the same error: Error in seu@assays$RNA$counts : $ operator not defined for this S4 class ... first time user of DoubletFinder and getting stuck at the first step! I am using Seurat_4.3.0 and DoubletFinder_2.0.4 ... could it be a version incompatibility issue? UPDATE: I copied the paramSweep function from the GitHub page and replaced seu@assays$RNA$counts by seu@assays$RNA@counts and that seems to work ... hopefully just a syntax issue with Seurat 4?

rocanja avatar Dec 08 '23 12:12 rocanja

I am getting the same error: Error in seu@assays$RNA$counts : $ operator not defined for this S4 class ... first time user of DoubletFinder and getting stuck at the first step! I am using Seurat_4.3.0 and DoubletFinder_2.0.4 ... could it be a version incompatibility issue? UPDATE: I copied the paramSweep function from the GitHub page and replaced seu@assays$RNA$counts by seu@assays$RNA@counts and that seems to work ... hopefully just a syntax issue with Seurat 4?

I was able to fork it and fix it, I basically changed the lines from seu@assays$RNA$counts to seu@assays$RNA@counts

bykovam avatar Dec 12 '23 15:12 bykovam

please use this code to install the former version 2.0.3 which supports v3/v4

remotes::install_github('https://github.com/ekernf01/DoubletFinder', force = T)

lancelotzhang0124 avatar Dec 12 '23 18:12 lancelotzhang0124