flowSets
the idea is to
horizontally stack plots of density estimates for all frames in the
flowSet
for one or several flow parameters. In the latter case,
each parameter will be plotted in a separate panel, i.e., we
implicitely condition on parameters.
## method for 'flowSet' objects
"densityplot"( x, data, ...)
## method for 'flowFrame' objects
"densityplot"( x, data, ...)
prepanel.densityplot.flowset( x, y, frames, overlap=0.3, subscripts, ..., which.channel)
panel.densityplot.flowset( x, y, darg=list(n=50, na.rm=TRUE), frames, channel, overlap = 0.3, channel.name, filter=NULL, fill=superpose.polygon$col, lty=superpose.polygon$lty, lwd=superpose.polygon$lwd, alpha=superpose.polygon$alpha, col=superpose.polygon$border, groups=NULL, refline=NULL, margin=0.005 ,stats=FALSE
,pos=0.5
,digits=2
,abs=FALSE
,fitGate=TRUE
,checkName = TRUE ,gp, ...)
## methods for various workflow objects
"densityplot"( x, data, ...)
"densityplot"( x, data, channels, ...)
factor ~ parameter
, where factor
can be any of the
phenotypic factors in the phenoData
slot or an appropriate
factor object and parameter
is a flow parameter. Panels for
multiple parameters are drawn if the formula structure is similar to
factor ~ parameter1 + parameter2
, and factor
can be
missing, in which case the sample names are used as y-variable. To
facilitate programatic access, the formula can be of special
structure factor ~ .
, in which case the optional
channel
argument is considered for parameter selection. For
the workflow methods, x
can also be one of the several
workflow objects. flowFrame
method.filter
,
filterResult
or
filterResultList
object
or a list of such objects of the same length as the
flowSet
. If applicable, the gate region will be superiposed
on the density curves using color shading. The software will figure
out whether the filter
needs to be evaluated in order to be
plotted (in which case providing a filterResult
can speed
things up considerably). flowSet
, or a factor.x
is of structure factor ~ .
.darg
gets passed on to
density
.lattice
-like par.setting
and
flowViz.par.set
customization. The relevant parameter
category for density plots is gate.density
with available
parameters col
, fill
, lwd
, alpha
and
lty
. See
flowViz.par.set
for details.panel.abline
. [0,1]
. Indicate margin events by
horizontal bars. The value of margin
is interpreted as the
proportion of events on the margin over which the bars are
added. E.g., a value of 0,5
means to indicate margin events
if there are more than 0.5
times the total number of
events. 1
means to ignore margin events completetly. For
0
bars are added even if there is only a single margin event.logical
scalar indicating whether to display the gate as fitted 1d density gate region
or simply display the gate boundaries using vertical lines. The latter would be helpful to display the gate when the gated density region is too small to see. logical
scalar indicating whether to validity check the channel name. Default is TRUE, which consider '(' as invalid character in channel namespar.settings
for customization of a single call or
flowViz.par.set
for customization of session-wide defaults.
xyplot
xyplot
axis.grid
signature(x = "formula", data =
"flowSet")
: Creates density plots for one or several channels,
with samples stacked according to a phenoData
variable.
Colors are used to indicate common values of this covariate
across panels. Filters can be added as the optional
filter
arguments. See xyplot
for details. signature(x = "formula", data = "view")
: A
method to create density plots for workspace
view
objects. This still allows
for some level of customization, but most defaults will be set depending
on the input object. signature(x = "view", data = "missing")
:
The default method for view objects. All defaults will be set. Not all standard lattice arguments will have the intended effect, but many should. For a fuller description of possible arguments and their effects, consult documentation on lattice (Trellis docs would also work for the fundamentals).
library(flowStats)
data(GvHD)
GvHD <- GvHD[pData(GvHD)$Patient %in% 6:7]
densityplot(~ `FSC-H`, GvHD)
densityplot(~ `FSC-H` + `SSC-H`, GvHD)
densityplot(~ ., GvHD[1:3])
## include a filter
densityplot(~ `FSC-H`, GvHD, filter=curv1Filter("FSC-H"))
#display the gate by its boundaries with statistics
densityplot(~ `FSC-H`, GvHD[1:2], filter=curv1Filter("FSC-H"),fitGate=FALSE,stats=TRUE)
## plot a single flowFrame
densityplot(~ `SSC-H`, GvHD[[1]], margin=FALSE)
Run the code above in your browser using DataLab