Mercurial > repos > yufei-luo > s_mart
comparison SMART/DiffExpAnal/DESeqTools/barplotTC.R @ 31:0ab839023fe4
Uploaded
author | m-zytnicki |
---|---|
date | Tue, 30 Apr 2013 14:33:21 -0400 |
parents | 94ab73e8a190 |
children |
comparison
equal
deleted
inserted
replaced
30:5677346472b5 | 31:0ab839023fe4 |
---|---|
1 # barplotTC | |
2 # barplot representing total count per sample | |
3 | |
4 # input : counts, target, projectName | |
5 # output : barplotTC (png) | |
6 | |
7 # created Feb 7th, 2012 | |
8 # modified April 30th, 2012 (group instead of target$group) | |
9 | |
10 barplotTC <- function( counts, group, OUT_barplotTCName, out = TRUE ){ | |
11 | |
12 if (out) png( file=OUT_barplotTCName ) | |
13 | |
14 ylim <- c(0, max(colSums(counts))*1.2) | |
15 barplot( colSums(counts), col=as.integer(group)+1, main = "Total Read Count per Sample", ylim=ylim ) | |
16 legend( "topright", as.character(unique(group)), lty=1, | |
17 col=as.integer(unique(group))+1 ) | |
18 | |
19 if (out) dev.off() | |
20 } |