polygonGate-class | R Documentation |
Class and constructor for 2-dimensional polygonal filter
objects.
polygonGate(..., .gate, boundaries, filterId="defaultPolygonGate")
filterId |
An optional parameter that sets the |
.gate , boundaries |
A definition of the gate. This can be either a list or a named matrix as described below. Note the argument boundaries is deprecated and will go away in the next release. |
... |
You can also directly describe a gate without wrapping it in a list or matrix, as described below. |
Polygons are specified by the coordinates of their vertices in two
dimensions. The constructor is designed to be useful in both direct and
programmatic usage. It takes either a list or a named matrix with 2
columns and at least 3
rows containing these coordinates.
Alternatively, vertices can be given as named arguments, in which case the
function tries to convert the values into a matrix.
Returns a polygonGate
object for use in filtering
flowFrame
s or other flow cytometry objects.
boundaries
Object of class "matrix"
. The
vertices of the polygon in two dimensions. There need to be at
least 3 vertices specified for a valid polygon.
parameters
Object of class "character"
,
describing the parameter used to filter the flowFrame
.
filterId
Object of class "character"
,
referencing the filter.
Class "parameterFilter"
, directly.
Class "concreteFilter"
, by class
parameterFilter
, distance 2.
Class "filter"
, by class parameterFilter
,
distance 3.
Objects can be created by calls of the form new("polygonGate",
...)
or by using the constructor polygonGate
. Using the
constructor is the recommended way.
signature(x = "flowFrame", table =
"polygonGate")
: 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.
signature(object = "polygonGate")
: Print
information about the filter.
See the documentation in the flowViz
package for plotting of polygonGates
.
F.Hahne, B. Ellis N. Le Meur
flowFrame
, rectangleGate
,
ellipsoidGate
, polytopeGate
,
filter
for evaluation of rectangleGates
and
split
and Subset
for splitting and subsetting of
flow cytometry data sets based on that.
Other Gate classes:
ellipsoidGate-class
,
polytopeGate-class
,
quadGate-class
,
rectangleGate-class
## Loading example data
dat <- read.FCS(system.file("extdata","0877408774.B08",
package="flowCore"))
## Defining the gate
sqrcut <- matrix(c(300,300,600,600,50,300,300,50),ncol=2,nrow=4)
colnames(sqrcut) <- c("FSC-H","SSC-H")
pg <- polygonGate(filterId="nonDebris", boundaries= sqrcut)
pg
## Filtering using polygonGates
fres <- filter(dat, pg)
fres
summary(fres)
## The result of polygon 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.