]> git.donarmstrong.com Git - rsem.git/blob - EBSeq/man/CheckNg.Rd
Included EBSeq for downstream differential expression analysis
[rsem.git] / EBSeq / man / CheckNg.Rd
1 \name{CheckNg}
2 \alias{CheckNg}
3 %- Also NEED an '\alias' for EACH other topic documented here.
4 \title{
5 CheckNgStructure
6 }
7 \description{
8 Provide the best polynomial fit of log variance and log mean in each Ng group. 
9 }
10 \usage{
11 CheckNg(NewMean, NewVar,nterm, xlim, ylim)
12 }
13 %- maybe also 'usage' for other objects documented here.
14 \arguments{
15   \item{NewMean}{
16 A list contains  
17 }
18 }
19 \details{
20 %%  ~~ If necessary, more details than the description above ~~
21 }
22 \value{
23 4 plots will be returned. The first 3 are the data and the best fit line from 
24 Ng=1, Ng=2 and Ng=3 group.
25 The 4th plot is the scatetr plot of all the data.  
26 }
27 \references{
28 }
29 \author{
30 Ning Leng
31 }
32
33 %% ~Make other sections like Warning with \section{Warning }{....} ~
34
35 \seealso{
36
37 }
38 \examples{
39 ##---- Should be DIRECTLY executable !! ----
40 ##-- ==>  Define data, use random,
41 ##--    or do  help(data=index)  for the standard data sets.
42
43 ### Simulate Isoform Level Data
44 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=.4, Phi.qt2=.6, OnlyData="Y" )
45 IsoList=IsoGenerate$data
46
47 # Get Vectors and Run EBSeq
48 ngv=c(1,2,3,2,3,2,3,2,3)
49 b3v=c(1,0,0,1,1,0,0,1,1)
50 b5v=c(1,0,0,0,0,1,1,1,1)
51 NgV=unlist(sapply(1:9,function(i)rep(ngv[i],dim(IsoList[[i]])[1])))
52 Bias3V=unlist(sapply(1:9,function(i)rep(b3v[i],dim(IsoList[[i]])[1])))
53 Bias5V=unlist(sapply(1:9,function(i)rep(b5v[i],dim(IsoList[[i]])[1])))
54
55 IsoData=do.call(rbind,IsoList)
56 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)
57
58
59 # Plot
60 CheckNg(IsoEBres$C1Mean, IsoEBres$C1EstVar,5, c(-1,5),c(-1,7))
61
62
63 }
64 % Add one or more standard keywords, see file 'KEYWORDS' in the
65 % R documentation directory.
66 \keyword{ Ng }