longmanz / Mixscale

6 stars 0 forks source link

Error in CalcPerturbSig #7

Open Saharprh opened 4 months ago

Saharprh commented 4 months ago

Hello,

I have an issue with running the CalcPerturbSig on my own data. seurat_objcompass_perturb <- CalcPerturbSig( object = seurat_objcompass, assay = "RNA", slot = "data", gd.class ="gene", nt.cell.class = "neg", reduction = "pca", ndims = 40, num.neighbors = 20, new.assay.name = "PRTB_compass", split.by = NULL) # to specify the metadata column if multiple biological contexts (e.g., cell lines) exist

I received this error message: Error in nn2(data = numeric(0), query = c(-9.89631522133093, -15.278225783592, : Cannot find more nearest neighbours than there are points.

I appreciate if you can help me solve this issue. Thank you! Sahar

longmanz commented 3 months ago

Hello Sahar, Please consider reducing the "num.neighbors" to a smaller number (e.g., 10). May I ask, how many non-targeting control cells are there in your dataset?

Saharprh commented 3 months ago

Thank you for your response. I changed the "num.neighbors" to different values, but it did not solve the issue. We have four non-targeting controls. How many non-target did you have?

longmanz commented 3 months ago

Hi, do you mean four non-target cells or four non-target gRNAs? In our data, we had 14 non-target gRNAs and ~a few thousands non-target cells.

Saharprh commented 2 months ago

We had: Target gRNAs: 18 Non-targeting gRNAs: 5 And the same, a few thousands non-target cells