Class "norm2Filter"
Description
Class and constructors for a filter
that fits a
bivariate normal distribution to a data set of paired values and
selects data points according to their standard deviation from the
fitted distribution.
Usage
1 2  norm2Filter(x, y, method="covMcd", scale.factor=1, n=50000,
filterId="defaultNorm2Filter")

Arguments
x,y 
Characters giving the names of the measurement parameter
on which the filter is supposed to work on. 
filterId 
An optional parameter that sets the 
scale.factor, n 
Numerics of length 1, used to set the

method 
Character in 
Details
The filter fits a bivariate normal distribution to the data and
selects all events within the Mahalanobis distance multiplied by the
scale.factor
argument. The constructor norm2Filter
is a
convenience function for object instantiation. Evaluating a
curv2Filter
results in an object of class
logicalFilterResult
. Accordingly, norm2Filters
can be used to subset and to split flow cytometry data sets.
Value
Returns a norm2Filter
object for use in filtering
flowFrame
s or other flow cytometry objects.
Extends
Class "parameterFilter"
, directly.
Class "concreteFilter"
, by class
parameterFilter
, distance 2.
Class "filter"
, by class parameterFilter
,
distance 3.
Slots
method
:One of
covMcd
orcov.rob
defining method used for computation of covariance matrix.scale.factor
:Numeric vector giving factor of standard deviations used for data selection (all points within
scalefac
standard deviations are selected).n
:Object of class
"numeric"
, the number of events used to compute the covariance matrix of the bivariate distribution.filterId
:Object of class
"character"
referencing the filter.parameters
:Object of class
"ANY"
describing the parameters used to filter theflowFrame
orflowSet
.
Objects from the Class
Objects can be created by calls of the form new("norm2Filter",
...)
or using the constructor norm2Filter
. The constructor
is the recommended way of object instantiation:
Methods
 %in%
signature(x = "flowFrame", table = "norm2Filter")
: The workhorse used to evaluate the filter on data. This is usually not called directly by the user, but internally by calls to thefilter
methods. show
signature(object = "norm2Filter")
: Print information about the filter.
Note
See the documentation in the
flowViz
package for plotting of
norm2Filters
.
Author(s)
F. Hahne
See Also
cov.rob
,
CovMcd
, filter
for evaluation of norm2Filters
and split
and
Subset
for splitting and subsetting of flow cytometry
data sets based on that.
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  ## Loading example data
dat < read.FCS(system.file("extdata","0877408774.B08",
package="flowCore"))
## Create directly. Most likely from a command line
norm2Filter("FSCH", "SSCH", filterId="myCurv2Filter")
## To facilitate programmatic construction we also have the following
n2f < norm2Filter(filterId="myNorm2Filter", x=list("FSCH", "SSCH"),
scale.factor=2)
n2f < norm2Filter(filterId="myNorm2Filter", x=c("FSCH", "SSCH"),
scale.factor=2)
## Filtering using norm2Filter
fres < filter(dat, n2f)
fres
summary(fres)
## The result of norm2 filtering is a logical subset
Subset(dat, fres)
## We can also split, in which case we get those events in and those
## not in the gate as separate populations
split(dat, fres)
