18
|
1 # plotDispEstimates
|
|
2 # scatter plots representing dispersion estimates vs mean expression
|
|
3
|
|
4 # input : cds, OUT_plotDispEstimatesName
|
|
5 # output : scatterplot (png)
|
|
6
|
|
7 plotDispEstimates <- function( cds, OUT_plotDispEstimatesName, out = TRUE ){
|
|
8
|
|
9 if (out) png( file=OUT_plotDispEstimatesName )
|
|
10
|
|
11 plot(
|
|
12 rowMeans( counts(cds, normalized=T) ),
|
|
13 fitInfo(cds)$perGeneDispEsts,
|
|
14 pch=".", log="xy",
|
|
15 xlab = "Mean expression strength", ylab = "Dispersion estimate" )
|
|
16
|
|
17 xg <- 10^seq(-.5, 5, length.out=300)
|
|
18 lines( xg, fitInfo(cds)$dispFun(xg), col="red" )
|
|
19
|
|
20 if (out) dev.off()
|
|
21 }
|