Description Creating Objects Slots Methods Author(s) See Also Examples
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.
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
)
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()
.
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.
display summary.
access and replace slot name.
Convert gate
object to gateSet
object
Combine multiple gate
objects to
one gateSet
object
Draw the boundaries of the gate.
Florian Hahne
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.