annotate SMART/DiffExpAnal/DESeqTools/barplotTC.R @ 33:aa0420172fc6

Deleted selected files
author m-zytnicki
date Tue, 30 Apr 2013 14:34:53 -0400
parents 94ab73e8a190
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
1 # barplotTC
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
2 # barplot representing total count per sample
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
3
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
4 # input : counts, target, projectName
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
5 # output : barplotTC (png)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
6
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
7 # created Feb 7th, 2012
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
8 # modified April 30th, 2012 (group instead of target$group)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
9
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
10 barplotTC <- function( counts, group, OUT_barplotTCName, out = TRUE ){
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
11
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
12 if (out) png( file=OUT_barplotTCName )
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
13
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
14 ylim <- c(0, max(colSums(counts))*1.2)
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
15 barplot( colSums(counts), col=as.integer(group)+1, main = "Total Read Count per Sample", ylim=ylim )
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
16 legend( "topright", as.character(unique(group)), lty=1,
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
17 col=as.integer(unique(group))+1 )
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
18
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
19 if (out) dev.off()
94ab73e8a190 Uploaded
m-zytnicki
parents:
diff changeset
20 }