单细胞分析 library(DropletUtils) Error in testEmptyDrops(m, lower = lower, ...) : no counts available to estimate the ambient profile
单细胞分析
library(DropletUtils)
emptyDrops()
Error in testEmptyDrops(m, lower = lower, ...) : no counts available to estimate the ambient profile
问题分析和答复:
我试图阻止人们以错误的方式使用该功能,这让你感到困惑。
CellRanger生成两组计数矩阵——原始的、未经过滤的计数矩阵,以及另一个已经过滤了列的矩阵,只保留他们认为的单元格。emptyDrops()表示执行过滤步骤的另一种方法,因此您需要将其应用于未过滤的计数矩阵。
将emptyDrops()应用于过滤后的计数矩阵没有任何意义。这是因为emptyDrop()使用低计数列来估计环境背景;但是,如果你给它一个经过滤波的矩阵,就没有低计数的列来估计背景了,所以你会得到一个环境轮廓的全零向量。
以前,如果你给它一个过滤后的矩阵,emptyDrops()会默默地运行并给出。。。我甚至不知道它会回来什么。好吧,很明显,它没有分割和炸毁你的电脑,但输出不可能是任何合理的。这个新的错误是我试图保护人们免受自己的伤害,另见此处(https://github.com/MarioniLab/DropletUtils/issues/14)。
值得一提的是,CellRanger v3的单元格调用方法基于emptyDrops(),但经过了实质性的修改,具有自己的风格。据推测,他们做出这些修改是有原因的,但结果是,这与在这里运行emptyDrops()不同。
原文:
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.
From:
https://support.bioconductor.org/p/123554/#123562