diff SMART/DiffExpAnal/DESeqTools/MAplotDE.R @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 94ab73e8a190
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SMART/DiffExpAnal/DESeqTools/MAplotDE.R	Tue Apr 30 14:33:21 2013 -0400
@@ -0,0 +1,16 @@
+# MAplotDE
+# MAplot of DE genes
+
+# input : res, alpha,OUT_MAplotDEName 
+# output : MAplot (png)
+
+MAplotDE <- function( res, alpha, OUT_MAplotDEName, out = TRUE ){
+
+ 	if (out) png( file=OUT_MAplotDEName )
+  
+ 	plot( res$baseMean, res$log2FoldChange, pch=".", xlab="Mean expression", ylab="log2FC", main="",
+  		log="x", col=ifelse(res$padj < alpha, "red", "black") )
+	abline(h=0, col="red")
+
+  	if (out) dev.off()
+}