Learn R Programming

plateCore (version 1.30.0)

applyControlGates: Apply control gates to a flowPlate

Description

Once setControlGates has been used to create gates for a flowPlate object, gates are applied to test samples using applyControlGates. The applyControlGates function is separated from setControlGates since gates may need be changed outside of setControlGates.

Usage

applyControlGates(data, gateType="Negative.Control", ...)

Arguments

data
A flowPlate dataset.
gateType
The type of gate to be applied to the flowPlate. Currently only "Negative.Control" gates are supported.
...
optional arguments

Value

Returns a flowPlate where the wellAnnotation now contains additional columns corresponding to total number of events in a well (Total.Count), the percentage of cells above background (Percent.Positive), and the number of positive cells (Positive.Count).

See Also

See Also setControlGates

Examples

Run this code
library(plateCore)
data(plateCore)

## Get the lymphocytes
rectGate <- rectangleGate("FSC-H"=c(300,700),"SSC-H"=c(50,400))
pbmcPlate <- Subset(pbmcPlate, rectGate)

# Create a flowPlate from the sample data in plateCore
fp <- flowPlate(pbmcPlate,wellAnnotation,plateName="P1")

# Create a set of negative control gates and then apply them
fp <- setControlGates(fp,gateType="Negative.Control")
fp <- applyControlGates(fp,gateType="Negative.Control")

# Percent Positive and Counts columns are now in the wellAnnotation
head(wellAnnotation(fp))

Run the code above in your browser using DataLab