view SMART/DiffExpAnal/DESeqTools/plotDispEstimates.R @ 34:529e3e6a0954

Deleted selected files
author m-zytnicki
date Tue, 30 Apr 2013 14:35:27 -0400
parents 94ab73e8a190
children
line wrap: on
line source

# plotDispEstimates
# scatter plots representing dispersion estimates vs mean expression

# input : cds, OUT_plotDispEstimatesName
# output : scatterplot (png)

plotDispEstimates <- function( cds, OUT_plotDispEstimatesName, out = TRUE ){

  if (out) png( file=OUT_plotDispEstimatesName )
  
  plot(
  	rowMeans( counts(cds, normalized=T) ),
  	fitInfo(cds)$perGeneDispEsts,
  	pch=".", log="xy",
  	xlab = "Mean expression strength", ylab = "Dispersion estimate" )
  	
  xg <- 10^seq(-.5, 5, length.out=300)
  lines( xg, fitInfo(cds)$dispFun(xg), col="red" )

  if (out) dev.off()
}