Here we will illustrate how to choose and use the appropriate gating methods that are pre-registered in openCyto package. And users can always define their own gating algorithms and register them as the plugin functions in openCyto framework, see ?registerPlugins for more details.

Note that all the function names illustrated below are prefixed with . indicating that they are simply the wrapper function registered in openCyto. The actual gating engine behind the wrapper can come from other packages (e.g. flowCore, flowClust). All these wrappers have these common interfaces: * fr: a flowFrame object * pp_res: an optional pre-preocessing result, which can be ignored in this document * channels: channel names used for gating * ...: any other gating parameters pass on to the actual gating engine

library(openCyto)
library(ggcyto)

gs <- load_gs(system.file("extdata/gs_bcell_auto", package = "flowWorkspaceData"))

1D gating methods

mindensity

The name of this gating function is self-explaining, that is to find the minimum as the cutpoint between negative and postive peaks in 1d density plot. It is fast,robust and extremely easy to use especially when there is a good separation between + and - populations/peaks.

For example, it is usually easy to gate on CD3 channel and no need to supply any arguments to the method.

fr <- getData(gs[[2]], "Live")
chnl <- "CD3"
g <- openCyto:::.mindensity(fr, channels = chnl)
autoplot(fr, chnl) + geom_gate(g)
autoplot(fr, chnl, "SSC-A") + geom_gate(g)