comparison deseq/differential_expression_analysis_pipeline_for_rnaseq_data-a03838a6eb54/DiffExpAnal/DESeqTools/plotDispEstimates.R @ 10:6e573fd3c41b draft

Uploaded
author yufei-luo
date Mon, 13 May 2013 10:06:30 -0400
parents
children
comparison
equal deleted inserted replaced
9:a03838a6eb54 10:6e573fd3c41b
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 }