applyControlGates {plateCore} | R Documentation |
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.
applyControlGates(data, gateType="Negative.Control", ...)
data |
A flowPlate dataset. |
gateType |
The type of gate to be applied to the flowPlate. Currently only "Negative.Control" gates are supported. |
... |
optional arguments |
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).
Errol Strain
See Also setControlGates
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))