view SMART/DiffExpAnal/DESeqTools/raw2counts.R @ 31:0ab839023fe4

Uploaded
author m-zytnicki
date Tue, 30 Apr 2013 14:33:21 -0400
parents 94ab73e8a190
children
line wrap: on
line source

# 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) )
}