polygonGate-class.RdClass 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. |
Returns a polygonGate object for use in filtering
flowFrames or other flow cytometry objects.
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.
boundariesObject of class "matrix". The
vertices of the polygon in two dimensions. There need to be at
least 3 vertices specified for a valid polygon.
parametersObject of class "character",
describing the parameter used to filter the flowFrame.
filterIdObject of class "character",
referencing the filter.
See the documentation in the flowViz
package for plotting of polygonGates.
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.
flowFrame, rectangleGate,
ellipsoidGate, polytopeGate,
filter for evaluation of rectangleGates and
split and Subsetfor 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)#> Warning: The 'boundaries' argument is deprecated, please use '.gate' instead.pg#> Polygonal gate 'nonDebris' with 4 vertices in dimensions FSC-H and SSC-H#> A filterResult produced by the filter named 'nonDebris'summary(fres)#> nonDebris+: 6680 of 10000 events (66.80%)#> flowFrame object '0877408774.B08' #> with 6680 cells and 8 observables: #> name desc range minRange maxRange #> $P1 FSC-H FSC-H 1024 0.000000 1023 #> $P2 SSC-H SSC-H 1024 0.000000 1023 #> $P3 FL1-H <NA> 1024 1.009044 10000 #> $P4 FL2-H <NA> 1024 1.009044 10000 #> $P5 FL3-H <NA> 1024 1.009044 10000 #> $P6 FL1-A <NA> 1024 0.000000 1023 #> $P7 FL4-H <NA> 1024 1.009044 10000 #> $P8 Time Time (51.20 sec.) 1024 0.000000 1023 #> 164 keywords are stored in the 'description' slot## We can also split, in which case we get those events in and those ## not in the gate as separate populations split(dat, fres)#> $`nonDebris+` #> flowFrame object '0877408774.B08 (nonDebris+)' #> with 6680 cells and 8 observables: #> name desc range minRange maxRange #> $P1 FSC-H FSC-H 1024 0.000000 1023 #> $P2 SSC-H SSC-H 1024 0.000000 1023 #> $P3 FL1-H <NA> 1024 1.009044 10000 #> $P4 FL2-H <NA> 1024 1.009044 10000 #> $P5 FL3-H <NA> 1024 1.009044 10000 #> $P6 FL1-A <NA> 1024 0.000000 1023 #> $P7 FL4-H <NA> 1024 1.009044 10000 #> $P8 Time Time (51.20 sec.) 1024 0.000000 1023 #> 164 keywords are stored in the 'description' slot #> #> $`nonDebris-` #> flowFrame object '0877408774.B08 (nonDebris-)' #> with 3320 cells and 8 observables: #> name desc range minRange maxRange #> $P1 FSC-H FSC-H 1024 0.000000 1023 #> $P2 SSC-H SSC-H 1024 0.000000 1023 #> $P3 FL1-H <NA> 1024 1.009044 10000 #> $P4 FL2-H <NA> 1024 1.009044 10000 #> $P5 FL3-H <NA> 1024 1.009044 10000 #> $P6 FL1-A <NA> 1024 0.000000 1023 #> $P7 FL4-H <NA> 1024 1.009044 10000 #> $P8 Time Time (51.20 sec.) 1024 0.000000 1023 #> 164 keywords are stored in the 'description' slot #>