rectangleGate-class {flowCore}R Documentation

Define filter boundaries

Description

A convenience method to facilitate the construction of filter objects

Usage

rectangleGate( filterId = "rectangleGate", .gate, ...)
polygonGate(filterId = "polygonGate", boundaries, ...)
polytopeGate(filterId = "polytopeGate", .gate, ...)

Arguments

filterId An optional parameter that sets the filterId of this gate.
.gate A definition of the gate. This can be either a list or matrix, described below.
boundaries A definition of the gate.
... You can also directly describe a gate without wrapping it in a list, as described below.

Details

This function is designed to be useful in both direct and programmatic usage.

For rectangle gate in n dimensions, if n=1 the gate correspond to a range gate. If n=2, the gate is a rectangle gate. To use this function programmatically, you may either construct a list or you may construct a matrix with n columns and 2 rows. The first row corresponds to the minimal value for each parameter while the second row corresponds to the maximal value for each parameter. The names of the parameters are taken from the column names as in the third example.

For polygone gate, the boundaries are specified as vertices in 2 dimensions.

Value

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

Author(s)

B. Ellis N. Le Meur

See Also

flowFrame, filter

Examples

data(GvHD)

#Create directly. Most likely from a command line
rectangleGate(filterId="rectangleGateI","FSC-H"=c(1,50),"SSC-H"=c(50,800))

#To facilitate programmatic construction we also have the following
rectangleGate(filterId="rectangleGateII",list("FSC-H"=c(1,50),"SSC-H"=c(50,800)))

m <- matrix(c(1,50,50,800),ncol=2)
colnames(m) <- c("FSC-H","SSC-H")
rect <- rectangleGate(filterId="rectangleGate", m)
pop1 <- filter(GvHD,rect)
sub <- Subset(GvHD, pop1)

## PolygonGate
sqrcut <- matrix(c(300,300,600,600,50,300,300,50),ncol=2,nrow=4)
colnames(sqrcut) <- c("FSC-H","SSC-H")
polygonGate(filterId="nonDebris", boundaries= sqrcut)


[Package flowCore version 1.0.2 Index]