comparison deseq/differential_expression_analysis_pipeline_for_rnaseq_data-a03838a6eb54/DiffExpAnal/DESeqTools/barplotNul.R @ 10:6e573fd3c41b draft

Uploaded
author yufei-luo
date Mon, 13 May 2013 10:06:30 -0400
parents
children
comparison
equal deleted inserted replaced
9:a03838a6eb54 10:6e573fd3c41b
1 # barplotNul
2 # barplot representing null counts per sample
3
4 # input : counts, target, projectName
5 # output : barplotNul (png)
6
7 # created Feb 7th, 2012
8 # modified April 30th, 2012 (target$group instead of target)
9 # Marie-Anges Dillies
10
11 barplotNul <- function( counts, group, OUT_barplotNulName, out = TRUE ){
12
13 if (out) png( file=OUT_barplotNulName )
14
15 N <- apply(counts, 2, function(x){sum(x == 0)})/nrow(counts)
16 barplot(N, col=as.integer(group)+1, main = "Proportion of null counts per Sample", ylim = c(0,1))
17 legend("topright", as.character(unique(group)), lty=1, col=as.integer(unique(group))+1)
18
19 if (out) dev.off()
20 }