flowSet-class {flowCore}R Documentation

'flowSet': a class for storing flow cytometry raw data from quantitative cell-based assays

Description

This class is a container for a set of flowFrame objects

Creating 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, flowSets can be coerced from list and environment objects.

as(list("A"=frameA,"B"=frameB),"flowSet")

Slots

frames:
An environment containing one or more flowFrame objects.
phenoData:
A 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:
A character object with the (common) column names of all the data matrices in the flowFrames.

Methods

[, [[
subsetting. If 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.
fsApply
apply function on a flowSet object. Similar to sapply.
compensate
apply a compensation matrix on a flowSet object.
transform
apply a transformation function on a flowSet object.
colnames, colnames<-
extract or replace the colnames slot.
phenoData, phenoData<-
extract or replace the phenoData slot.
pData
extract actual information from the phenoData slot.
sampleNames
extract sample names from the phenoData object.
length
number of flowFrame objects in the set.
keyword
extract entries from the description slots of the flowFrame objects by keywords
show
display summary.
filter
apply a filter object on a flowSet object. See filter for details
spillover
compute spillover matrix from a compensation set.
split
split all flowFrame objects according to a filter or gate. Returns a list of flowFrames
rbind2
combine two flowSet objects
Subset
Returns a flowSet of flowFrames that have been subset according to a filter.

Important note on storage and performance

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 <- x
will 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)]

Author(s)

F. Hahne, B. Ellis, P. Haaland and N. Le Meur

See Also

flowFrame

Examples

data(GvHD)
GvHD
phenoData(GvHD)

[Package flowCore version 1.0.2 Index]