[BioC] plotMeanVar and coxreid method in edgeR
Davis, Wade
davisjwa at health.missouri.edu
Tue Dec 13 17:10:30 CET 2011
Dear Mark and Gordon:
I have a few questions and suggestions for the plotMeanVar function (which I think is very handy) in edgeR.
I receive the following message when trying to use dispersion.method="coxreid" in plotMeanVar:
plotMeanVar(dge.ctl.filt, meanvar=ctl.filt.meanvar, show.tagwise.vars=TRUE, NBline=TRUE, dispersion.method="coxreid")
Error in plotMeanVar(dge.ctl.filt, meanvar = ctl.filt.meanvar, show.tagwise.vars = TRUE, :
Could not extract Cox-Reid common dispersion. Try running CRDisp on the DGEList object before plotMeanVar.
I had run estimateGLMCommonDisp/estimateGLMTrendedDisp/estimateGLMTagwiseDisp prior to this call, knowing that they have superseded CRDisp / estimateCRDisp / etc.
names(dge.ctl.filt)
[1] "samples" "counts" "all.zeros" "common.dispersion" "trended.dispersion" "abundance"
[7] "bin.dispersion" "bin.abundance" "tagwise.dispersion"
NOTE: Everything runs without complaint with:
plotMeanVar(dge.ctl.filt, meanvar=ctl.filt.meanvar, show.tagwise.vars=TRUE, NBline=TRUE, dispersion.method="qcml")
Looking into the plotMeanVar source, it seems that the function is looking for elements object$CR.common.dispersion or object$CR.tagwise.dispersion.
Snippet from plotMeanVar:
-------------------------------------------
if (NBline | show.tagwise.vars) {
if (dispersion.method == "coxreid") {
common.dispersion <- object$CR.common.dispersion
tagwise.dispersion <- object$CR.tagwise.dispersion
}
else {
common.dispersion <- object$common.dispersion
tagwise.dispersion <- object$tagwise.dispersion
}
if (is.null(common.dispersion)) {
if (dispersion.method == "coxreid")
stop("Could not extract Cox-Reid common dispersion. Try running CRDisp on the DGEList object before plotMeanVar.\n")
else stop("Could not extract qCML common dispersion. Try running estimateCommonDisp on the DGEList object before plotMeanVar.\n")
}
}
-------------------------------------------
It is my understanding that the names CR.* are not being used anymore for DGEList objects. I personally like the CR.* convention because as it stands now, I can't examine an DGEList object and tell by what dispersion method object$common.dispersion or estimateTagwiseDisp was obtained (i.e., estimateCommonDisp or estimateGLMCommonDisp).
So would you politely consider modifying the DGEList-class to address this? Or I have I misdiagnosed the problem entirely?
Thanks for your insight on the matter and your time.
My session info is below.
Wade
> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] limma_3.10.0 edgeR_2.4.1
More information about the Bioconductor
mailing list