diff SMART/DiffExpAnal/DESeqTools/raw2counts.R @ 18:94ab73e8a190

Uploaded
author m-zytnicki
date Mon, 29 Apr 2013 03:20:15 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SMART/DiffExpAnal/DESeqTools/raw2counts.R	Mon Apr 29 03:20:15 2013 -0400
@@ -0,0 +1,20 @@
+# raw2counts
+# extract counts only from rawCounts
+# and add rownames to counts
+
+# input : rawCounts
+# output : counts
+
+# created Feb 6th, 2012
+# modified April 12, 2012
+# Marie-Agnes Dillies
+
+
+raw2counts <- function( rawCounts, annot=1 ){
+
+  ex <- 1:annot
+  counts <- as.matrix( rawCounts[,-ex] )
+  rownames(counts) <- rawCounts[,1]
+  infoCounts <- rawCounts[,ex]
+  return( list("counts"=counts, "infoCounts"= infoCounts) )
+}