filterSet-class {flowCore} | R Documentation |
A container for a collection of related filters.
There are several ways to create a filterSet
object. There is
the filterSet
constructor, which creates an empty
filterSet
object (see the details section for more
information). filterSet
objects can also be coerced to and from
list
objects using the as
function.
env
:filter
), this method is
also useful for planning gating strategy layouts and the like.NULL
name will use the filter's name for
assignment. Composed filters can be added easily using formulas
rather than attempting to construct filters the long way. The
formula interface is also lazy, allowing you to add filters in any
order.
filterSet
objects are intended to provide a convenient grouping
mechanism for a particular gating strategy. To accomplish this, much
like the flowSet
object, the filterSet
object introduces
reference semantics through the use of an environment
, allowing
users to change an upstream filter via the usual assignment mechanism
and have that change reflected in all dependent filters. We do this by
actually creating two filters for each filter in the filterSet
.
The first is the actual concrete filter, which is assigned to a
variable of the form .name
where name
is the original
filter name. A second filterReference
filter is the created
with the original name to point to the internal name. The allows us to
evaluate a formula
in the environment without creating a copy
of the original filter.
B. Ellis
fs = new("filterSet") ## Simple assignment. Note that the filterId slot for the rectangle gate ## is changed. fs[["filter1"]] = rectangleGate("FSC-H"=c(.2,.8),"SSC-H"=c(0,.8)) ## Convenience assignment using the filterId slot. fs[[""]] = norm2Filter("FSC-H","SSC-H",scale.factor=2,filterId="Live Cells") ## We also support formula interfaces. These two statements are equivalent. fs[["Combined"]] = ~ filter1 %subset% `Live Cells` fs[[""]] = Combined ~ filter1 %subset% `Live Cells` fs as(fs,"list") as(as(fs,"list"),"filterSet")