Learn R Programming

flowCore (version 1.38.2)

quadGate-class: Class "quadGate"

Description

Class and constructors for quadrant-type filter objects.

Usage

quadGate(..., .gate, filterId="defaultQuadGate")

Arguments

filterId
An optional parameter that sets the filterId of this filter. The object can later be identified by this name.
.gate
A definition of the gate for programmatic access. This can be either a named list or a named numeric vector, as described below.
...
The parameters of quadGates can also be directly described using named function arguments, as described below.

Value

Returns a quadGate 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

boundary:
Object of class "numeric", length 2. The boundaries of the quadrant regions.
parameters:
Object of class "character", describing the parameter used to filter the flowFrame.
filterId:
Object of class "character", referencing the gate.

Objects from the Class

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

Methods

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

Details

quadGates are defined by two parameters, which specify a separation of a two-dimensional parameter space into four quadrants. The quadGate function is designed to be useful in both direct and programmatic usage:

For the interactive use, these parameters can be given as additional named function arguments, where the names correspond to valid parameter names in a flowFrame or flowSet. For a more programmatic approach, a named list or numeric vector of the gate boundaries can be passed on to the function as argument .gate.

Evaluating a quadGate results in four sub-populations, and hence in an object of class multipleFilterResult. Accordingly, quadGates can be used to split flow cytometry data sets.

See Also

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

Examples

Run this code

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

## Create directly. Most likely from a command line
quadGate(filterId="myQuadGate1", "FSC-H"=100, "SSC-H"=400)

## To facilitate programmatic construction we also have the following
quadGate(filterId="myQuadGate2", list("FSC-H"=100, "SSC-H"=400))
## FIXME: Do we want this?
##quadGate(filterId="myQuadGate3", .gate=c("FSC-H"=100, "SSC-H"=400))

## Filtering using quadGates
qg <- quadGate(filterId="quad", "FSC-H"=600, "SSC-H"=400)
fres <- filter(dat, qg)
fres
summary(fres)
names(fres)

## The result of quadGate 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="FSC-H-SSC-H-")
split(dat, fres, population=list(keep=c("FSC-H-SSC-H-",
"FSC-H-SSC-H+")))

Run the code above in your browser using DataLab