Entering edit mode
Christopher T Gregg
▴
210
@christopher-t-gregg-4973
Last seen 10.4 years ago
Hi,
I have been using the pooled-CR method of estimating dispersions with
DESeq. I wish to plot the fit using the approach presented in the
vignette. When I use this function with plotDispEsts(cps, "pooled")
it appears to work, however when I use plotDispEsts(cds, "pooled-CR")
it fails. I would appreciate advice regarding how to plot the fit for
the dispersion estimation with the pooled-CR method.
Please see the code below.
Thank you.
best wishes,
Chris
> plotDispEsts <- function( cds, cond )
+ {
+ plot(
+ rowMeans( counts( cds, normalized=TRUE ) ),
+ cds@fitInfo[[cond]]$perGeneDispEsts,
+ pch = '.', log="xy" )
+ xg <- 10^seq( -.5, 5, length.out=300 )
+ lines( xg, cds@fitInfo[[cond]]$dispFun( xg ), col="red" )
+ }
> plotDispEsts( cds, "pooled" )
> plotDispEsts( cds, "pooled-CR" )
Error in xy.coords(x, y) : attempt to apply non-function
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] qvalue_1.30.0 DESeq_1.8.0 locfit_1.5-6
lattice_0.20-6 akima_0.5-7 Biobase_2.16.0
BiocGenerics_0.2.0
loaded via a namespace (and not attached):
[1] annotate_1.34.0 AnnotationDbi_1.18.0 DBI_0.2-5
genefilter_1.38.0 geneplotter_1.34.0 grid_2.15.0
IRanges_1.14.0 MASS_7.3-17
[9] RColorBrewer_1.0-5 RSQLite_0.11.1 splines_2.15.0
stats4_2.15.0 survival_2.36-12 tcltk_2.15.0
tools_2.15.0 xtable_1.7-0
[[alternative HTML version deleted]]