chris-mcginnis-ucsf / DoubletFinder

R package for detecting doublets in single-cell RNA sequencing data
397 stars 104 forks source link

Error in ParamSweep #193

Open igs0011 opened 6 months ago

igs0011 commented 6 months ago

Hello,

I have been trying to implement DoubletFinder for my sc analysis. However when I run the paramSweep function i get the following error.

"Normalizing layer: counts Error in NormalizeData.V3Matrix(object = LayerData(object = object, layer = l, : trying to get slot "params" from an object of a basic class ("NULL") with no slots"

Based on my reading, I believe its due to the function interpreting my data as an aggregated data set of WT vs MT. However, this is not the case in my data.

Is this therefore caused by just a problem in how I am preprocessing the data?

I am using Seurat V5, and following the SCTransform workflow of data processing.

I appreciate the help in advance.

imrankhan27 commented 6 months ago

I had same the issue with Seurat v5. I detached the installed DoubletFinder and reinstalled(‘2.0.4’) detach("package:DoubletFinder", unload=TRUE) devtools::install_github("chris-mcginnis-ucsf/DoubletFinder") library(DoubletFinder) packageVersion("DoubletFinder")

‘2.0.4’

This solved my issue.

igs0011 commented 6 months ago

Thank you for the help

I did this as well as reinstalled R and it fixed the issue.

However, now I get a new error when I follow the SCTransform workflow.

Normalizing layer: counts Error in orig.commands$NormalizeData.RNA@params : no applicable method for @ applied to an object of class "NULL"

I can get around this issue by using the standard preprocessing workflow.

nadinegheziel commented 6 months ago

Hello, Thank you for your help.

sweep.res.data <- paramSweep(data, PCs = 1:40) Erreur : $ operator not defined for this S4 class

I am getting the same error, but I am working with Seurat v4 (4.1.0) and would like to stick with it. Which version of Doublet Finder should I use ?

Thank you very much!

djiuhong commented 6 months ago

I did this as well as reinstalled R and it fixed the issue.

However, now I get a new error when I follow the SCTransform workflow.

Normalizing layer: counts Error in orig.commands$NormalizeData.RNA@params : no applicable method for @ applied to an object of class "NULL"

Maybe you could try this method, I had the same problem before and solved it with this method sweep.res.list_se_obj <- paramSweep(se_obj, PCs = 1:50, sct = TRUE)