polygonGate-class: Class "polygonGate"

Description Usage Arguments Details Value Slots Extends Objects from the Class Methods Note Author(s) See Also Examples

Description

Class and constructor for 2-dimensional polygonal filter objects.

Usage

1
polygonGate(..., .gate, boundaries, filterId="defaultPolygonGate")

Arguments

filterId

An optional parameter that sets the filterId of this gate.

.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.

Details

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.

Value

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

Slots

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.

Extends

Class "parameterFilter", directly.

Class "concreteFilter", by class parameterFilter, distance 2.

Class "filter", by class parameterFilter, distance 3.

Objects from the Class

Objects can be created by calls of the form new("polygonGate", ...) or by using the constructor polygonGate. Using the constructor is the recommended way.

Methods

%in%

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.

show

signature(object = "polygonGate"): Print information about the filter.

Note

See the documentation in the flowViz package for plotting of polygonGates.

Author(s)

F.Hahne, B. Ellis N. Le Meur

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## 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)

flowCore documentation built on Nov. 8, 2020, 5:19 p.m.