plot.RJaCGH {RJaCGH} | R Documentation |
A plot is drawed with information from the fit of a RJaCGH object.
## S3 method for class 'RJaCGH': plot(x, k = NULL, model.averaging = TRUE, cex=1, smoother=FALSE, ...) ## S3 method for class 'RJaCGH.Chrom': plot(x, Chrom="genome", model.averaging=TRUE, cex=1, k=NULL, smoother=FALSE, ...) ## S3 method for class 'RJaCGH.genome': plot(x, k=NULL, model.averaging=TRUE, cex=1, smoother=FALSE, ...) ## S3 method for class 'RJaCGH.array': plot(x, show="frequency", weights=NULL, cex=1, smoother=FALSE, ...)
x |
any of RJaCGH, RJaCGH.Chrom, RJaCGH.genome, RJaCGH.array objects |
k |
Model to plot (i.e., number of hidden states). If NULL, the most visited is taken. |
cex |
A numerical value giving the amount by which plotting text and symbols should be scaled relative to the default. |
model.averaging |
if TRUE, model.averaging is
performed. If FALSE, a call to link{states} is made to get
hidden state sequence. |
Chrom |
For RJaCGH.chrom objects. If "genome", a whole plot of the genome is shown. If a chromosome number, olnly the model corresponding to that chromosome. See details. |
show |
one of "average" or "frequency" |
weights |
vector of weights for each array. Must have the length of the number of arrays. If NULL, the weights are uniform. |
smoother |
Logical. Smoothed means by model averaging. |
... |
additional arguments passed to plot. |
Depending on the object, a different plot is drawed:
If the object is RJaCGH or RJaCGH.genome, a panel with 5 subplots is
returned. The first one is a barplot with the posterior distribution
of the number of hidden states. The second and third are a density
plot of the posterior distribution of means and variances. The four
one is the probability of staying in the same hidden state, as
returned by plot.Q.NH
, and the last one shows the
original observations colored by thir hidden state and the probability
of being in that hidden state.
On every plot, the 'Normal' state is coloured black. The 'Gain' states are red and the 'Loss' ones green.
If the object is 'RJaCGH.Chrom', only the last one of the plots are shown. For the complete panel, call the method on every chromosome.
If the object is 'RJaCGH.array' and show
is 'average', the last
one of the plots is drawn, but the hidden state sequence and its
probability is computed averaging on all the arrays with weights
according to weights
vector. If show
is 'frequency',
again the last plot is drawn, but the percentage of arrays in
which every gene is Gain/Lost is shown, weighted by the
weights
vector.
If smoother
is TRUE, the smoothed mean is drawn. See
smoothMeans
(except in plot.RJaCGH.array
when
method is not 'averaging').
A plot.
Oscar M. Rueda and Ramon Diaz Uriarte
Rueda OM, Diaz-Uriarte R. Flexible and Accurate Detection of Genomic Copy-Number Changes from aCGH. PLoS Comput Biol. 2007;3(6):e122
RJaCGH
,
smoothMeans
,
summary.RJaCGH
, model.averaging
,
states
, trace.plot
,
gelman.brooks.plot
, collapseChain
## Not run: y <- c(rnorm(100, 0, 1), rnorm(10, -3, 1), rnorm(20, 3, 1), rnorm(100, 0, 1)) Pos <- runif(230) Pos <- cumsum(Pos) Chrom <- rep(1:23, rep(10, 23)) jp <- list(sigma.tau.mu=rep(0.5, 4), sigma.tau.sigma.2=rep(0.3, 4), sigma.tau.beta=rep(0.7, 4), tau.split.mu=0.5, tau.split.beta=0.5) fit.Chrom <- RJaCGH(y=y, Pos=Pos, Chrom=Chrom, model="Chrom", burnin=100, TOT=1000, jump.parameters=jp, k.max=4) plot(fit.Chrom) plot(fit.Chrom[[1]]) ## End(Not run)