当我尝试估计影响下游分析的离散度时遇到问题。
#DGEList 对象
obj<- DGEList(matrix, group=Sample)
#设计矩阵
design <- model.matrix(~0+Sample)
在我的批量分析中,设计矩阵是这样的:
Sample1 Sample2 Sample3 Sample4
1 1 0 0 0
2 0 1 0 0
3 0 0 1 0
4 0 0 0 1
#色散估计
`obj <- estimateDisp(obj, design, robust=TRUE)`
obj$common.dispersion
estimateDisp.default(y = y$counts, design = design, group = group, 中的警告消息: “无残留 df:将色散设置为 NA”
str(obj)
plotBCV(obj)
Error in xy.coords(x, y, xlabel, ylabel, log): 'x' and 'y' lengths differ
Traceback:
1. plotBCV(obj)
2. plot(A, sqrt(disp), xlab = xlab, ylab = ylab, type = "n", ...)
3. plot.default(A, sqrt(disp), xlab = xlab, ylab = ylab, type = "n",
. ...)
4. xy.coords(x, y, xlabel, ylabel, log)
5. stop("'x' and 'y' lengths differ")
还有其他方法来估计离散度吗?
在我的批量分析中,设计矩阵是这样的:
Sample1 Sample2 Sample3 Sample4
1 1 0 0 0
2 0 1 0 0
3 0 0 1 0
4 0 0 0 1