Question: Error with DropletUtils::EmptyDrops()
gravatar for shbrief
3 months ago by
shbrief10 wrote:

Hi! I'm trying to analyze the scRNAseq data from 10X Genomics using simpleSingleCell workflow, and EmptyDrops() was used to work, but it's not working with the newer version of the packages (even if I tried it with the identical dataset). It doesn't seem like there is any major update with the function and also the workflow vignette is same, I'm not sure what the problem is.

Here is the error message I got: Error in testEmptyDrops(m, lower = lower, ...) : no counts available to estimate the ambient profile

sessionInfo() R version 3.6.0 (2019-04-26) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default BLAS/LAPACK: /usr/lib/

[4] LC

attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base

other attached packages: [1] EnsDb.Hsapiens.v862.99.0 ensembldb2.8.0 AnnotationFilter1.8.0
[4] GenomicFeatures
1.36.4 AnnotationDbi1.46.0 scran1.12.1
[7] scater1.12.2 ggplot23.2.0 DropletUtils1.4.2
[10] SingleCellExperiment
1.6.0 SummarizedExperiment1.14.0 DelayedArray0.10.0
[13] BiocParallel1.18.0 matrixStats0.54.0 Biobase2.44.0
[16] GenomicRanges
1.36.0 GenomeInfoDb1.20.0 IRanges2.18.1
[19] S4Vectors0.22.0 BiocGenerics0.30.0 BiocManager_1.30.4

loaded via a namespace (and not attached): [1] ProtGenerics1.16.0 bitops1.0-6 bit640.9-7 progress1.2.2
[5] httr1.4.0 dynamicTreeCut1.63-1 tools3.6.0 backports1.1.4
[9] R62.4.0 irlba2.3.3 HDF5Array1.12.1 vipor0.4.5
[13] DBI1.0.0 lazyeval0.2.2 colorspace1.4-1 withr2.1.2
[17] tidyselect0.2.5 gridExtra2.3 prettyunits1.0.2 curl4.0
[21] bit1.1-14 compiler3.6.0 BiocNeighbors1.2.0 rtracklayer1.44.2
[25] scales1.0.0 stringr1.4.0 digest0.6.20 Rsamtools2.0.0
[29] R.utils2.9.0 XVector0.24.0 pkgconfig2.0.2 limma3.40.6
[33] rlang0.4.0 rstudioapi0.10 RSQLite2.1.2 DelayedMatrixStats1.6.0 [37] dplyr0.8.3 R.oo1.22.0 RCurl1.95-4.12 magrittr1.5
[41] BiocSingular1.0.0 GenomeInfoDbData1.2.1 Matrix1.2-17 Rcpp1.0.1
[45] ggbeeswarm0.6.0 munsell0.5.0 Rhdf5lib1.6.0 viridis0.5.1
[49] R.methodsS31.7.1 stringi1.4.3 edgeR3.26.6 zlibbioc1.30.0
[53] rhdf52.28.0 grid3.6.0 blob1.2.0 dqrng0.2.1
[57] crayon1.3.4 lattice0.20-38 Biostrings2.52.0 hms0.5.0
[61] locfit1.5-9.1 zeallot0.1.0 knitr1.23 pillar1.4.2
[65] igraph1.2.4.1 biomaRt2.40.3 XML3.98-1.20 glue1.3.1
[69] vctrs0.2.0 gtable0.3.0 purrr0.3.2 assertthat0.2.1
[73] xfun0.8 rsvd1.0.1 viridisLite0.3.0 tibble2.1.3
[77] GenomicAlignments1.20.1 beeswarm0.2.3 memoise1.1.0 statmod1.4.32

ADD COMMENTlink modified 3 months ago by Aaron Lun25k • written 3 months ago by shbrief10
Answer: Error with DropletUtils::EmptyDrops()
gravatar for Aaron Lun
3 months ago by
Aaron Lun25k
Cambridge, United Kingdom
Aaron Lun25k wrote:

Ah, you've been caught by my attempt to prevent people from using the function the wrong way.

CellRanger produces two sets of count matrices - the raw, unfiltered count matrix, and another matrix where they have already filtered the columns to only retain what they think are the cells. emptyDrops() represents an alternative approach to doing the filtering step, so you need to apply it to the unfiltered count matrix.

It doesn't make any sense to apply emptyDrops() to the filtered count matrix. This is because emptyDrops() uses the low-count columns to estimate the ambient background; but if you give it a filtered matrix, there are no low-count columns left to estimate the background, so you get an all-zero vector for the ambient profile.

Previously, if you did give it a filtered matrix, emptyDrops() would silently run and give... I don't even know what it would return. Well, clearly it didn't segfault and blow up your computer, but the output can't be anything sensible. This new error is my attempt at protecting people from themselves, see also here.

It is worth mentioning that CellRanger v3's cell calling method is based on emptyDrops(), but substantially modified with their own flavor. Presumably they had their reasons for making these modifications, but the takeway is that it will not be the same as running emptyDrops() here.

ADD COMMENTlink modified 3 months ago • written 3 months ago by Aaron Lun25k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 161 users visited in the last hour