diff DiffExpAnal/DESeqTools/MAplotDE.R @ 0:63799b789162 draft

Uploaded
author yufei-luo
date Tue, 22 Jan 2013 10:07:03 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DiffExpAnal/DESeqTools/MAplotDE.R	Tue Jan 22 10:07:03 2013 -0500
@@ -0,0 +1,17 @@
+# Marie-Anges Dillies
+# 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()
+}