3 %- Also NEED an '\alias' for EACH other topic documented here.
5 %% ~~function to do ... ~~
6 Density plot to compare th empirical q's and the simulated q's from the fitted beta distribution.
9 %% ~~ A concise (1-5 lines) description of what the function does. ~~
12 DenNHist(QList, Alpha, Beta, name, AList = "F", GroupName)
14 %- maybe also 'usage' for other objects documented here.
17 The estimated q's from the output of NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi_NoNormVar
18 . 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 Beta.
22 The fitted parameter alpha from the output of NBBetaEB.bias.uniqueP_PoolVarSpeed
23 Up_MDFPoi_NoNormVar. Input should be a number if AList is not defined.
26 The fitted parameter beta from the output of NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi_NoNormVar.
27 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.
34 Whether a list of alpha's are used
38 The names of each sub plot. The l
39 ength of the input should be the same as the number of lists of QList.
44 %% ~~ If necessary, more details than the description above ~~
47 Plots will be generated. Each plot represents a sub-list of the QList.
48 The empirical estimation of q's will be represented as blue histogram and the density of
49 the fitted beta distribution will be represented as the green line.
50 The main title of the plot will be "GroupName name".
54 %% ~put references to the literature/web site here ~
63 %% ~Make other sections like Warning with \section{Warning }{....} ~
66 beta.mom, DenNHistTable, QQP, NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi_NoNormVar
69 ### Simulate Gene Level Data
70 GeneGenerate=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")
71 GeneData=GeneGenerate$data
74 EBres=NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi_NoNormVar(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)), sizeFactors=rep(1,10),maxround=5)
76 DenNHist(QList=EBres$QList1, Alpha=EBres[[1]][5,1], Beta=EBres[[2]][5,1], name="Gene", AList="F", GroupName="")
78 ### Simulate Isoform Level Data
79 IsoGenerate=IsoSimu(DVDconstant=NULL, DVDqt1=.97, DVDqt2=.98, Conditions=as.factor(rep(c(1,2),each=5)), NumofSample=10, NumofIso=NULL, DEIsoProp=.1, Phiconstant=NULL, Phi.qt1=.25, Phi.qt2=.75, OnlyData="Y" )
80 IsoList=IsoGenerate$data
82 # Get Vectors and Run EBSeq
83 ngv=c(1,2,3,2,3,2,3,2,3)
84 b3v=c(1,0,0,1,1,0,0,1,1)
85 b5v=c(1,0,0,0,0,1,1,1,1)
86 NgV=unlist(sapply(1:9,function(i)rep(ngv[i],dim(IsoList[[i]])[1])))
87 Bias3V=unlist(sapply(1:9,function(i)rep(b3v[i],dim(IsoList[[i]])[1])))
88 Bias5V=unlist(sapply(1:9,function(i)rep(b5v[i],dim(IsoList[[i]])[1])))
90 IsoData=do.call(rbind,IsoList)
91 IsoEBres=NBBetaEB.bias.uniqueP_PoolVarSpeedUp_MDFPoi_NoNormVar(Data=IsoData, NgVector=NgV, Vect5End=Bias5V, Vect3End=Bias3V, Conditions=as.factor(rep(c(1,2),each=5)),sizeFactors=rep(1,10), maxround=5)
95 DenNHist(QList=IsoEBres$QList1, Alpha=IsoEBres[[1]][5,], Beta=IsoEBres[[2]][5,], name="Isoform", AList="F", GroupName=paste("group",c(1:9),sep=""))
104 % Add one or more standard keywords, see file 'KEYWORDS' in the
105 % R documentation directory.
107 \keyword{ ~kwd2 }% __ONLY ONE__ keyword per line