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