curv2Filter-class {flowStats} | R Documentation

## Class "curv2Filter"

### Description

Class and constructor for data-driven `filter` objects that selects high-density regions in two dimensions.

### Usage

    curv2Filter(x, y, filterId="defaultCurv2Filter", bwFac=1.2,
    gridsize=rep(151, 2))

### Arguments

`x,y` | Characters giving the names of the measurement parameter on which the filter is supposed to work on. `y` can be missing in which case `x` is expected to be a character vector of length 2 or a list of characters.
`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.

### Details

Areas of high local density in two 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 `curv2Filter` is a convenience function for object instantiation. Evaluating a `curv2Filter` results in potentially multiple sub-populations, an hence in an object of class `multipleFilterResult`. Accordingly, `curv2Filters` can be used to split flow cytometry data sets.

### Value

Returns a `curv2Filter` 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

`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 parameters 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("curv2Filter", ...)` or using the constructor `curv2Filter`. The constructor is the recommended way of object instantiation:

### Methods

%in%

  `signature(x = "flowFrame", table = "curv2Filter")`: 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 = "curv2Filter")`: Print information about the filter.

### Note

See the documentation in the `flowViz` package for plotting of `curv2Filters`.

### Author(s)

Florian Hahne

### See Also

`curv1Filter`, `flowFrame`, `flowSet`, `filter` for evaluation of `curv2Filters` and `split` for splitting of flow cytometry data sets based on that.

### Examples

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

    ## Create directly. Most likely from a command line
    curv2Filter("FSC-H", "SSC-H", filterId="myCurv2Filter")

    ## To facilitate programmatic construction we also have the following
    c2f <- curv2Filter(filterId="myCurv2Filter", x=list("FSC-H", "SSC-H"),
    bwFac=2)
    c2f <- curv2Filter(filterId="myCurv2Filter", x=c("FSC-H", "SSC-H"),
    bwFac=2)

    ## Filtering using curv2Filter
    fres <- filter(dat, c2f)
    fres
    summary(fres)
    names(fres)

    ## The result of curv2 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("area 2", "area 3")))

    curv2Filter("FSC-H", "SSC-H", filterId="test filter")

[Package flowStats version 3.40.1 Index]