10
|
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 # Marie-Anges Dillies
|
|
10
|
|
11 barplotTC <- function( counts, group, OUT_barplotTCName, out = TRUE ){
|
|
12
|
|
13 if (out) png( file=OUT_barplotTCName )
|
|
14
|
|
15 ylim <- c(0, max(colSums(counts))*1.2)
|
|
16 barplot( colSums(counts), col=as.integer(group)+1, main = "Total Read Count per Sample", ylim=ylim )
|
|
17 legend( "topright", as.character(unique(group)), lty=1,
|
|
18 col=as.integer(unique(group))+1 )
|
|
19
|
|
20 if (out) dev.off()
|
|
21 }
|