]> git.donarmstrong.com Git - rsem.git/blobdiff - EBSeq/R/MedianNorm.R
Included EBSeq for downstream differential expression analysis
[rsem.git] / EBSeq / R / MedianNorm.R
diff --git a/EBSeq/R/MedianNorm.R b/EBSeq/R/MedianNorm.R
new file mode 100644 (file)
index 0000000..44c0a4a
--- /dev/null
@@ -0,0 +1,5 @@
+MedianNorm=function(Data){
+
+    geomeans <- exp(rowMeans(log(Data)))
+       apply(Data, 2, function(cnts) median((cnts/geomeans)[geomeans >  0]))
+}