Learn R Programming

prada (version 1.48.0)

gateSet-class: 'gateSet': a class for subsetting flow-cytometry data by defining multiple regions in two-dimesional projections of the data

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 for several of these selections

Arguments

Creating Objects

Objects can be created using methods of the generic function drawGate or via new("gateSet", glist = ...., # object of class list )

Slots

name:
Object of class character giving the name of the object. You can reference the object by its name for subsequent operations (e.g. plotting).
glist:
Object of class "list" with items of class gate. The individual gate objects will be combined according to the value of their slot logic.

Methods

applyGate:
applyGate(x, data) applies the gating of object x on data objects of class cytoFrame or matrix
length
length of slot glist
show
display summary
names, names<-
extract or replace the names of the individual gate objects.
[
subset to gateSet objects.
[[
subset to individual gate objects.
appendGates
append a gate or gateSet to a cytoFrame

See Also

cytoFrame, gate

Examples

Run this code
sampdat <- readFCS(system.file("extdata", "fas-Bcl2-plate323-04-04.A01",
                               package="prada"))
g1 <- new("gate", name="G1", gateFun=function(x)x[,"FSC-H"]<500, logic="&",
          colnames="FSC-H")
g2 <- new("gate", name="G2", gateFun=function(x)x[,"SSC-H"]>800, logic="&",
          colnames="SSC-H")
g3 <- new("gate", name="G3", gateFun=function(x)x[,"FL1-H"]>800, logic="&",
          colnames="FL1-H")
gs <- new("gateSet", name="Set1", glist=list(G1=g1, G2=g2))
length(gs)
gs[[1]]
gs[1]
gsnames <- names(gs)
names(gs) <- gsnames
applyGate(sampdat, gs)
applyGate(exprs(sampdat), gs)
gate(sampdat) <- gs
applyGate(sampdat, 1)
applyGate(sampdat, "G1")
applyGate(sampdat, TRUE)
appendGates(sampdat, g3)

Run the code above in your browser using DataLab