view SMART/DiffExpAnal/DESeqTools/boxplotCounts.R @ 18:94ab73e8a190

Uploaded
author m-zytnicki
date Mon, 29 Apr 2013 03:20:15 -0400
parents
children
line wrap: on
line source

# boxplotCounts
# boxplots representing counts distribution per sample

# input : counts, target, projectName, type of data (raw or norm)
# output : boxplot (png)

# created Feb 7th, 2012
# modified April 30th, 2012

boxplotCounts <- function( counts, group, type = c("raw", "norm"), OUT_boxplotCountsName, out = TRUE ){

  if (out) png( file=OUT_boxplotCountsName )

  boxplot( log2(counts+1), col=as.integer(group)+1, main = paste(type[1], " counts distribution", sep="" ) )
  legend( "topright", as.character(unique(group)), lty=1, col=as.integer(unique(group))+1 )

  if (out) dev.off()
}