diff SMART/DiffExpAnal/DESeqTools/barplotTC.R @ 18:94ab73e8a190

Uploaded
author m-zytnicki
date Mon, 29 Apr 2013 03:20:15 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SMART/DiffExpAnal/DESeqTools/barplotTC.R	Mon Apr 29 03:20:15 2013 -0400
@@ -0,0 +1,20 @@
+# barplotTC
+# barplot representing total count per sample
+
+# input : counts, target, projectName
+# output : barplotTC (png)
+
+# created Feb 7th, 2012
+# modified April 30th, 2012 (group instead of target$group)
+
+barplotTC <- function( counts, group, OUT_barplotTCName, out = TRUE ){
+
+  if (out) png( file=OUT_barplotTCName )
+
+  ylim <- c(0, max(colSums(counts))*1.2)
+  barplot( colSums(counts), col=as.integer(group)+1, main = "Total Read Count per Sample",  ylim=ylim )
+  legend( "topright", as.character(unique(group)), lty=1,
+         col=as.integer(unique(group))+1 )
+
+  if (out) dev.off()
+}