Learn R Programming

plateCore (version 1.30.0)

setControlGates: Create control gates for a flowPlate

Description

A function to estimate the threshold between positive and negative cells. This threshold corresponds to a one-dimensional gate, and cells above the gate are considered positive. The default value of numMads=5 generally works well on the linear scale, but will need to be adjusted for transformed data. If each well contains a large number of events for the cell type of interest (>1000), then using the 99.5th quantile usually gives similar values.

Usage

setControlGates(data, gateType, threshType="MAD", numMads=5, isoquantile=.995, ...)

Arguments

data
A flowPlate
gateType
The type of gate to be set. Currently only "Negative.Control" gates are supported.
threshType
Values can be either "MAD", for median absolute deviation based gating, or "isoQuant" for quantile based gating.
numMads
Number of median absolute deviations above the median to set the initial gate.
isoquantile
Quantile setting for "isoQuant" threshType.
...
optional arguments.

Value

Returns a flowPlate

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")

# There should now be a Negative.Control.Gate column in wellAnnotation
head(wellAnnotation(fp))

Run the code above in your browser using DataLab