[BioC] plotMeanVar and coxreid method in edgeR
Gordon K Smyth
smyth at wehi.EDU.AU
Tue Dec 13 23:44:26 CET 2011
Dear Wade,
You are right on both fronts. plotMeanVar() needs to be updated to
reflect the changes in the dispersion estimation functions. Thanks for
the heads-up on this. Actually, I think plotMeanVar() will correctly use
whatever dispersion estimates you have previously estimated, so its
dispersion.method argument is actually redundant -- you can just leave it
at the default value. I will confer with Davis McCarthy, the author of
the function, to come to a complete solution.
I agree with you that it would be desirable for the data object to
'remember' which dispersion estimation method was used. We have been
thinking along the same lines, and plan to introduce a component called
"dispersion.method" or similar into the data object.
Best wishes
Gordon
---------------------------------------------
Professor Gordon K Smyth,
Bioinformatics Division,
Walter and Eliza Hall Institute of Medical Research,
1G Royal Parade, Parkville, Vic 3052, Australia.
Tel: (03) 9345 2326, Fax (03) 9347 0852,
smyth at wehi.edu.au
http://www.wehi.edu.au
http://www.statsci.org/smyth
On Tue, 13 Dec 2011, Davis, Wade wrote:
> 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
>
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
More information about the Bioconductor
mailing list