]> git.donarmstrong.com Git - rsem.git/blob - EBSeq/man/QQP.Rd
Included EBSeq for downstream differential expression analysis
[rsem.git] / EBSeq / man / QQP.Rd
1 \name{QQP}
2 \alias{QQP}
3 %- Also NEED an '\alias' for EACH other topic documented here.
4 \title{
5 The QQ Plot of empirical q's and simulated q's from fitted beta distribution
6 }
7 \description{
8
9 }
10 \usage{
11 QQP(QList, AlphaResult, BetaResult, name, AList="F", GroupName)
12 }
13 %- maybe also 'usage' for other objects documented here.
14 \arguments{
15   \item{QList}{
16 The estimated q's from the output of NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi. Input could be a vector or a list of different groups of transcripts. The number of lists here should be the same as the length of BetaResult.
17
18 }
19   \item{AlphaResult}{
20 The fitted parameter alpha from the output of NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi. Input should be a number if AList is not defined.
21 }
22   \item{BetaResult}{
23 The fitted parameter beta from the output of NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi. Input could be one single number or a vector of several numbers. The length of the input should be the same as the number of lists of QList.
24 }
25   \item{name}{
26 The name of the plots
27 }
28   \item{AList}{
29 Whether a list of alpha's are used
30 }
31   \item{GroupName}{
32 The names of each sub plot. The l
33 ength of the input should be the same as the number of lists of QList.
34 }
35 }
36 \details{
37 %%  ~~ If necessary, more details than the description above ~~
38 }
39 \value{
40 %%  ~Describe the value returned
41 %%  If it is a LIST, use
42 %%  \item{comp1 }{Description of 'comp1'}
43 %%  \item{comp2 }{Description of 'comp2'}
44 %% ...
45 }
46 \references{
47 %% ~put references to the literature/web site here ~
48 }
49 \author{
50 Ning Leng
51 }
52 \note{
53 %%  ~~further notes~~
54 }
55
56 %% ~Make other sections like Warning with \section{Warning }{....} ~
57
58 \seealso{
59  NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi , DenNHist
60 }
61 \examples{
62 GeneData=GeneSimu(DVDconstant=4, DVDqt1=NULL, DVDqt2=NULL, Conditions=rep(c(1,2),each=5), NumofSample=10, NumofGene=10000, DEGeneProp=.1, Phiconstant=NULL, Phi.qt1=.25, Phi.qt2=.75, Meanconstant=NULL, OnlyData="Y")
63
64 EBres=NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi(Data=GeneData, NgVector=rep(1,10^4), Vect5End=rep(1,10^4), Vect3End=rep(1,10^4), Conditions=as.factor(rep(c(1,2),each=5)), maxround=5)
65
66 QQP(QList=EBres$QList1, AlphaResult=EBres[[1]][5,1], BetaResult=EBres[[2]][5,1], name="Gene", AList="F", GroupName=NULL)
67
68 ## The function is currently defined as
69 function(QList,AlphaResult,BetaResult,name,AList="F",GroupName){
70                     for (i in 1:length(BetaResult)){
71                                 tmpSize=length(QList[[i]][QList[[i]]<1])
72                         if (AList=="F") rdpts=rbeta(tmpSize,AlphaResult,BetaResult[i])
73                                 else rdpts=rbeta(tmpSize,AlphaResult[i],BetaResult[i])
74         qqplot(QList[[i]][QList[[i]]<1], rdpts, xlab="estimated q's", "simulated q's from fitted beta distribution",main=paste(names(name,GroupName[i],sep=" "),xlim=c(0,1),ylim=c(0,1))
75                         }
76   }
77 }
78 % Add one or more standard keywords, see file 'KEYWORDS' in the
79 % R documentation directory.
80 \keyword{ ~kwd1 }
81 \keyword{ ~kwd2 }% __ONLY ONE__ keyword per line