Mercurial > repos > yufei-luo > s_mart
comparison SMART/DiffExpAnal/DESeqTools/plotDispEstimates.R @ 31:0ab839023fe4
Uploaded
author | m-zytnicki |
---|---|
date | Tue, 30 Apr 2013 14:33:21 -0400 |
parents | 94ab73e8a190 |
children |
comparison
equal
deleted
inserted
replaced
30:5677346472b5 | 31:0ab839023fe4 |
---|---|
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 } |