flowSet-class {flowCore} | R Documentation |
This class is a container for a set of
flowFrame
objects
Objects can be created using the function
read.flowSet
or via
new('flowSet',
frames = ...., # environment with flowFrames
phenoData = .... # object of class AnnotatedDataFrame
colnames = .... # object of class character
)
Alternatively, flowSet
s can be coerced from list
and
environment
objects.
as(list("A"=frameA,"B"=frameB),"flowSet")
frames
:environment
containing one or more flowFrame
objects.phenoData
:AnnotatedDataFrame
. Each row
corresponds to one of the flowFrames in the frames
slot. The
sampleNames
of phenoData
(see below) must match the
names of the flowFrames in the frames
environment.
colnames
:character
object with the
(common) column names of all the data matrices in the flowFrames.x
is flowSet
, then x[i]
returns a flowSet
object, and x[[i]]
a flowFrame
object. The semantics is similar to the behavior of the subsetting operators for lists.apply
function on a flowSet
object. Similar to sapply
.flowSet
object.flowSet
object.colnames
slot.phenoData
slot.phenoData
slot.phenoData
object.flowFrame
objects in the set.flowFrame
objects by keywordsflowSet
object. See filter for details
flowFrame
objects according to a filter or
gate. Returns a list of flowFrames
flowSet
objectsflowSet
of flowFrames
that have been subset according to a filter.
The bulk of the data in a flowSet
object is stored in an
environment
, and is therefore not
automatically copied when the flowSet
object is copied. If
x
is an object of class flowSet
, then the code
y <- xwill create an object
y
that contains
copies of the phenoData
and
administrative data in x
, but refers to the same
environment with the actual fluorescence data. See below for how to
create proper copies.
The reason for this is performance. The pass-by-value semantics of
function calls in R
can result in numerous copies of the same
data object being made in the course of a series of nested function
calls. If the data object is large, this can result in a considerable
cost of memory and performance. flowSet
objects are intended to
contain experimental data in the order of hundreds of Megabytes,
which can effectively be treated as read-only: typical tasks
are the extraction of subsets and the calculation of summary statistics.
This is afforded by the design of the flowSet
class: an object of that class contains a phenoData
slot,
some administrative information, and a reference to an
environment with the fluorescence data; when it is copied, only the
reference is copied, but not the potentially large set of fluorescence
data themselves.
However, note that subsetting operations, such as
y <- x[i]do create proper copies, including a copy of the appropriate part of the fluorescence data, as it should be expected. Thus, to make a proper copy of a
flowSet
x
, use
y <- x[seq(along=x)]
F. Hahne, B. Ellis, P. Haaland and N. Le Meur
data(GvHD) GvHD phenoData(GvHD)