Description Creating Objects Slots Methods Important note on storage and performance Author(s) See Also Examples
This class is a container for a set of
cytoFrame
objects
Objects can be created using the function
readCytoSet
or via
new('cytoSet',
frames = ...., # environment with cytoFrames
phenoData = .... # object of class phenoData
colnames = .... # object of class character
)
frames
:An environment
containing one or more cytoFrame
objects.
phenoData
:A
phenoData
. Each row
corresponds to one of the cytoFrames in the frames
slot.
It is mandatory that the pData has column named name
colnames
:A character
object with the
(common) column names of all the data matrices in the cytoFrames.
subsetting. If x
is cytoSet
, then x[i]
returns a cytoSet
object, and x[[i]]
a cytoFrame
object. The semantics is similar to the behavior of the subsetting
operators for lists.
extract or replace the colnames
slot.
extract or replace the phenoData
slot.
display summary.
Scatterplot of one or all (consecutively) cytoFrame
objects. The additional argument gate
can be used to plot
subsets of the data defined by an object of class
gate
or gateSet
.
Draw histogram of the data. The additional argument
variable
can be used to subset to one variable prior to plotting.
The bulk of the data in a cytoSet
object is stored in an
environment
, and is therefore not
automatically copied when the cytoSet
object is copied. If
x
is an object of class cytoSet
, then the code
1 | y <- x
|
will create a 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. cytoSet
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 cytoSet
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
1 | 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 cytoSet
x
, use
1 | y <- x[seq(along=x)]
|
Florian Hahne, Wolfgang Huber http://www.ebi.ac.uk/huber
readCytoSet
,
cytoFrame
, gate
,
gateSet
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.