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 UseMethod("vcov") #17

Open
ashipde opened this issue Apr 14, 2024 · 8 comments
Open

Error in UseMethod("vcov") #17

ashipde opened this issue Apr 14, 2024 · 8 comments

Comments

@ashipde
Copy link

ashipde commented Apr 14, 2024

With valiDrops 0.1.0 in R 4.3.2, x86_64-apple-darwin20, I get this error with one of 12 samples of my snRNA seq. experiment. The sample's data is not of good quality (~150 median features/cell, as against 300+ for others).

> temp <- valiDrops(counts)
Step 1: Filtering on the barcode-rank plot.
Error in UseMethod("vcov") : 
  no applicable method for 'vcov' applied to an object of class "NULL"
In addition: Warning messages:
1: In min(rmse[, 2]) : no non-missing arguments to min; returning Inf
2: In min(rmse[rmse[, 2] <= min(rmse[, 2]) * factor, 3]) :
  no non-missing arguments to min; returning Inf
@ashipde
Copy link
Author

ashipde commented Apr 14, 2024

For this particular sample, the issue was avoided with alpha = 0.01. Setting type = 'Genes' and/or factor = 1 did not help.

@Sandman-1
Copy link

Hello! I managed to fix this. It was a grep error in the source code where the loop didn't search for the right message provided by the segmented package when ranking barcodes. I also added the control parameter with QUANT = TRUE in the expression filter script to avoid a similar error regarding breakpoints. Please see my patch and/or commits to the main branch.

@ashipde
Copy link
Author

ashipde commented Apr 23, 2024

Thank you! I will try the updated software. Separately, can one in general use valiDrops as a one-stop solution for snRNA seq. data? I have been using cellbender to remove ambient RNA and cell-free drops, then a couple of doublet finder softwares to remove multiplets cells, and then removing cells with high mitochondrial RNA content. Should one use ambient RNA removers before and doublet finders after using validDrops?

@Sandman-1
Copy link

Just updated it yet again to have decreased breakpoint intervals and more iterations in the seg.control function. This should be the final one! It’s version 1.0.1 on the main branch in my fork.

I’m using valiDrops to remove bad cells/nuclei and following it up with SoupX to remove ambient RNA. Then I’m converting Seurat objects to h5ad files so I can use RADO to remove doublets in Python. Let me know if you have any questions.

Best,
Sandman

@ashipde
Copy link
Author

ashipde commented Apr 25, 2024

Thank you... version 1.1.0 does not raise this issue.

@Sandman-1
Copy link

Yup! There are several possibilities to incur errors in valiDrops, but it is a good package. The forked version I released a few hours earlier today (1.1.0) covers every error I have experienced. It even skips stage 3 filtering if a suitable breakpoint cannot be fit to the linear model, so you don’t have to rerun the command and specify skipping of stage 3 yourself. I am looping the command over thousands of samples and am no longer experiencing errors now. You can imagine how frustrating it must have been when I was getting errors.

All the best with your work!

@ashipde
Copy link
Author

ashipde commented Apr 26, 2024

Thank you again for fixing/improving the software. May be I am wrong but it looks like the original developer no longer seems interested in the software. I had almost given up on using valiDrops – unmaintained software == unreliable software.

@JesperGrud
Copy link
Contributor

JesperGrud commented Jun 17, 2024

Hi both. Unfortunately, the funding environment isn't great for supporting continued development of scientific software. We do have some, but low bandwidth, for supporting updating the valiDrops.

@Sandman-1 I have made a pull request from your fork of valiDrops and will review the code before pushing it to main. Thank you for contributing to the software.

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

3 participants