flowStats (version 3.30.0)

curv1Filter-class: Class "curv1Filter"

Description

Class and constructor for data-driven filter objects that selects high-density regions in one dimension.

Usage

curv1Filter(x, bwFac=1.2, gridsize=rep(401, 2), filterId="defaultCurv1Filter")

Arguments

x
Character giving the name of the measurement parameter on which the filter is supposed to work on. This can also be a list containing a single character scalar for programmatic access.
filterId
An optional parameter that sets the filterId slot of this filter. The object can later be identified by this name.
bwFac, gridsize
Numerics of length 1 and 2, respectively, used to set the bwFac and gridsize slots of the object.

Value

Returns a curv1Filter object for use in filtering flowFrames or other flow cytometry objects.

Extends

Class "parameterFilter", directly. Class "concreteFilter", by class parameterFilter, distance 2. Class "filter", by class parameterFilter, distance 3.

Slots

bwFac:
Object of class "numeric". The bandwidth factor used for smoothing of the density estimate.
gridsize:
Object of class "numeric". The size of the bins used for density estimation.
parameters:
Object of class "character", describing the parameter used to filter the flowFrame.
filterId:
Object of class "character", referencing the filter.

Objects from the Class

Objects can be created by calls of the form new("curvFilter", ...) or using the constructor curv1Filter. Using the constructor is the recommended way of object instantiation:

Methods

%in%
signature(x = "flowFrame", table = "curv1Filter"): The workhorse used to evaluate the filter on data. This is usually not called directly by the user, but internally by calls to the filter methods.
show
signature(object = "curv1Filter"): Print information about the filter.

Details

Areas of high local density in one dimensions are identified by detecting significant curvature regions. See Duong, T. and Cowling, A. and Koch, I. and Wand, M.P., Computational Statistics and Data Analysis 52/9, 2008 for details. The constructor curv1Filter is a convenience function for object instantiation. Evaluating a curv1Filter results in potentially multiple sub-populations, an hence in an object of class multipleFilterResult. Accordingly, curv1Filters can be used to split flow cytometry data sets.

See Also

curv2Filter, flowFrame, flowSet, filter for evaluation of curv1Filters and split for splitting of flow cytometry data sets based on that.

Examples

Run this code

library(flowStats)
## Loading example data
dat <- read.FCS(system.file("extdata","0877408774.B08",
package="flowCore"))

## Create directly. Most likely from a command line
curv1Filter("FSC-H", filterId="myCurv1Filter", bwFac=2)

## To facilitate programmatic construction we also have the following
c1f <- curv1Filter(filterId="myCurv1Filter", x=list("FSC-H"), bwFac=2)

## Filtering using curv1Filter
fres <- filter(dat, c1f)
fres
summary(fres)
names(fres)

## The result of curv1 filtering are multiple sub-populations
## and we can split our data set accordingly
split(dat, fres)

## We can limit the splitting to one or several sub-populations
split(dat, fres, population="rest")
split(dat, fres, population=list(keep=c("peak 2", "peak 3")))

Run the code above in your browser using DataLab