diff deseq/differential_expression_analysis_pipeline_for_rnaseq_data-a03838a6eb54/DiffExpAnal/DESeqTools/boxplotCounts.R @ 10:6e573fd3c41b draft

Uploaded
author yufei-luo
date Mon, 13 May 2013 10:06:30 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deseq/differential_expression_analysis_pipeline_for_rnaseq_data-a03838a6eb54/DiffExpAnal/DESeqTools/boxplotCounts.R	Mon May 13 10:06:30 2013 -0400
@@ -0,0 +1,19 @@
+# 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
+# Marie-Anges Dillies
+
+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()
+}