]> git.donarmstrong.com Git - rsem.git/blob - EBSeq/man/PoolMatrix.Rd
Included EBSeq for downstream differential expression analysis
[rsem.git] / EBSeq / man / PoolMatrix.Rd
1 \name{PoolMatrix}
2 \alias{PoolMatrix}
3 %- Also NEED an '\alias' for EACH other topic documented here.
4 \title{
5 Generate the expression matrix from the output of GetData
6 }
7 \description{
8 %%  ~~ A concise (1-5 lines) description of what the function does. ~~
9 }
10 \usage{
11 PoolMatrix(Data, reads, type)
12 }
13 %- maybe also 'usage' for other objects documented here.
14 \arguments{
15   \item{Data}{
16 The output from GetData function.
17 }
18   \item{reads}{
19 The total number of reads in each lane. Could be obtained from the RSEM outputs. 
20 }
21   \item{type}{
22 If type="S", the outputs will be the a matrix which transcript names in row and sample names in column.
23 If type="G", the first column will be the group information. 
24
25 }
26 }
27 \details{
28 %%  ~~ If necessary, more details than the description above ~~
29 }
30 \value{
31 \item{PoolM}{The matrix of nu values}
32 \item{PoolValue}{The matrix of expression values}
33 }
34 \references{
35 %% ~put references to the literature/web site here ~
36 }
37 \author{
38 Ning Leng
39 }
40 \note{
41 %%  ~~further notes~~
42 }
43
44 %% ~Make other sections like Warning with \section{Warning }{....} ~
45
46 \seealso{
47 GetData
48 }
49 \examples{
50 ##---- Should be DIRECTLY executable !! ----
51 ##-- ==>  Define data, use random,
52 ##--    or do  help(data=index)  for the standard data sets.
53
54 ## The function is currently defined as
55 function(Data,reads,type)
56 {
57 poolnames=names(Data)
58 poolM=NULL
59 for (po in 1:8)
60         poolM=cbind(poolM,Data[[po]][,1])
61 rownames(poolM)=rownames(Data[[1]])
62 colnames(poolM)=poolnames
63
64 #poolValue=poolM*reads
65 poolValue=poolM
66 for (col in 1:8)
67         poolValue[,col]=poolM[,col]*reads[col]
68 poolValue=round(poolValue)
69 if (type=="G")
70         {
71                 poolM=cbind(Data[[1]][,2],poolM)
72                 poolValue=cbind(Data[[1]][,2],poolValue)
73                 colnames(poolM)=c("Groups",poolnames)
74                 colnames(poolValue)=c("Groups",poolnames)
75         }
76 poolOutput=list(poolM=poolM,poolValue=poolValue)
77   }
78 }
79 % Add one or more standard keywords, see file 'KEYWORDS' in the
80 % R documentation directory.
81 \keyword{ ~kwd1 }
82 \keyword{ ~kwd2 }% __ONLY ONE__ keyword per line