Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in CalcPerturbSig #7

Open
Saharprh opened this issue Apr 10, 2024 · 4 comments
Open

Error in CalcPerturbSig #7

Saharprh opened this issue Apr 10, 2024 · 4 comments

Comments

@Saharprh
Copy link

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
Copy link
Collaborator

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
Copy link
Author

Saharprh commented May 8, 2024

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
Copy link
Collaborator

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
Copy link
Author

Saharprh commented May 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants