gate-class: 'gate': a class for subsetting flow-cytometry data by...

Description Creating Objects Slots Methods Author(s) See Also Examples

Description

In flow-cytometry analysis, regions in two-dimensional projections of the data space often have to be selected. Objects of this class can store the properties of these selections.

Creating Objects

Objects can be created using methods of the generic function drawGate or via
new("gate",
gateFun = ...., # function returning logical vector
colnames = .... # object of class character and length 2
logic = .... # object of class character
)

Slots

name:

A character vector for the name of the gate object. You can reference the object by its name for subsequent operations (e.g. plotting).

gateFun:

A function call together with necessary arguments to produce a logical vector when applied on the data.

colnames:

The colnames of the data matrix to which the gating function is to be applied.

logic:

A character object, either & or |. This specifies the logical operation that will be applied when combining the selection from the gate with other object of that class. See link{gateSet} for additional information on combining gates.

type:

A character giving the type of the object. This is currently not used but might become important in the future.

boundaries:

A matrix with two columns giving the boundaries of the gate in two dimensional space. Can be used to superimpose the gate boundaries on a plot using lines().

Methods

applyGate:

applyGate(x, data) applies the gating of object x on data objects of class cytoFrame or matrix. In the former case x may be of class gate, gateSet, character, numeric or logical. See vignette for details.

show

display summary.

names, names<-

access and replace slot name.

as.gateSet

Convert gate object to gateSet object

combineGates

Combine multiple gate objects to one gateSet object

lines

Draw the boundaries of the gate.

Author(s)

Florian Hahne

See Also

cytoFrame, gateSet

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
sampdat <- readFCS(system.file("extdata", "fas-Bcl2-plate323-04-04.A01",
                               package="prada"))
g1 <- new("gate", name="test1", gateFun=function(x)x[,"FSC-H"]<500, logic="&",
          colnames="FSC-H", type="misc")
g1
g2 <- new("gate", name="test2", gateFun=function(x)x[,"SSC-H"]>800, logic="&",
          colnames="SSC-H", type="misc")
gs1 <- combineGates(g1,g2)
gs2 <- as.gateSet(g2)
names(g1)
names(g1) <- "testName"
applyGate(sampdat, g1)
applyGate(exprs(sampdat), g2)
gate(sampdat) <- g1
applyGate(sampdat, 1)
applyGate(sampdat, "testName")
applyGate(sampdat, TRUE)

prada documentation built on April 28, 2020, 7:52 p.m.