Mercurial > repos > yufei-luo > differential_expression_analysis_pipeline_for_rnaseq_data
annotate deseq/differential_expression_analysis_pipeline_for_rnaseq_data-a03838a6eb54/DiffExpAnal/DESeqTools/raw2counts.R @ 10:6e573fd3c41b draft
Uploaded
author | yufei-luo |
---|---|
date | Mon, 13 May 2013 10:06:30 -0400 |
parents | |
children |
rev | line source |
---|---|
10 | 1 # raw2counts |
2 # extract counts only from rawCounts | |
3 # and add rownames to counts | |
4 | |
5 # input : rawCounts | |
6 # output : counts | |
7 | |
8 # created Feb 6th, 2012 | |
9 # modified April 12, 2012 | |
10 # Marie-Agnes Dillies | |
11 | |
12 | |
13 raw2counts <- function( rawCounts, annot=1 ){ | |
14 | |
15 ex <- 1:annot | |
16 counts <- as.matrix( rawCounts[,-ex] ) | |
17 rownames(counts) <- rawCounts[,1] | |
18 infoCounts <- rawCounts[,ex] | |
19 return( list("counts"=counts, "infoCounts"= infoCounts) ) | |
20 } |