longmanz/Mixscale

Error in CalcPerturbSig

Saharprh opened this issue · 4 comments

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

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?

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?

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.

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