gate_interval_draw
constructs an interactive plotting window for user
to select the lower and upper bounds of a population (through mouse click)
which is constructed into a
rectangleGate
object and stored
in a filters
list. Both 1-D and 2-D
interval gates are supported, for 2-D interval gates an additional argument
axis
must be supplied to indicate which axis should be gated.
gate_interval_draw(fr, alias = NULL, channels, plot = TRUE, axis = "x", label = TRUE, ...)
fr | a |
---|---|
alias | the name(s) of the populations to be gated. If multiple
population names are supplied (e.g. |
channels | vector of channel names to use for plotting, can be of length 1 for 1-D density histogram or length 2 for 2-D scatter plot. |
plot | logical indicating whether the data should be plotted. This feature allows for constructing gates of different types over existing plots which may already contain a different gate type. |
axis | indicates whether the |
label | logical indicating whether to include
|
... | additional arguments for |
afilters
list containing the
constructed rectangleGate
object(s).
# NOT RUN { # Copy and paste into console to interactively draw gates library(CytoRSuiteData) # Load in samples to flowSet fs <- Activation # Transform fluorescent channels fs <- transform(fs, estimateLogicle(fs[[4]], cyto_fluor_channels(fs))) # Get 1-D interval gate using gate_interval_draw - overlay control ig <- gate_interval_draw(fs[[4]], alias = "Cells", channels = "PE-A", overlay = fs[[1]], density_stack = 0.5 ) # ig is a filters object - extract rectangleGate using `[[` ig[[1]] # Get 2-D interval gate on y axis using gate_interval_draw ig <- gate_interval_draw(fs[[4]], alias = "Cells", channels = c("PE-A", "Alexa Fluor 488-A"), axis = "y" ) # ig is a filters object - extract rectangleGate using `[[` ig[[1]] # }