Edit Existing Gate(s).

gate_edit(x, select = NULL, parent = NULL, alias = NULL,
  overlay = NULL, type = NULL, gatingTemplate = NULL,
  display = NULL, ...)

Arguments

x

an object of class GatingSet.

select

vector containing the indicies of samples within gs to use for plotting.

parent

name of the parental population.

alias

name(s) of the gate to edit (e.g. "Single Cells").

overlay

name(s) of the population(s) to overlay onto the plot.

type

vector of gate type names used to construct the gates. Multiple types are supported but should be accompanied with an alias argument of the same length (i.e. one type per alias). Supported gate_types are polygon, rectangle, ellipse, threshold, boundary, interval, quadrant and web which can be abbreviated as upper or lower case first letters as well. Default type is "polygon".

gatingTemplate

name of the gatingTemplate csv file (e.g. "gatingTemplate.csv") where the gate is saved.

display

numeric [0,1] to control the percentage of events to be plotted. Specifying a value for display can substantial improve plotting speed for less powerful machines.

...

additional arguments passed to cyto_plot, see ?cyto_plot for details.

Value

an object of class GatingSet with edited gate applied, as well as gatingTemplate file with edited gate saved.

Examples

# NOT RUN {
library(CytoRSuiteData)

# Load in samples
fs <- Activation
gs <- GatingSet(fs)

# Apply compensation
gs <- compensate(gs, fs[[1]]@description$SPILL)

# Transform fluorescent channels
trans <- estimateLogicle(gs[[4]], cyto_fluor_channels(gs))
gs <- transform(gs, trans)

# Gate using gate_draw
gt <- Activation_gatingTemplate
gating(gt, gs)

# Edit CD4 T Cells Gate - replace gatingTemplate name
gate_edit(gs,
  parent = "T Cells",
  alias = "CD4 T Cells",
  gatingTemplate = "gatingTemplate.csv"
)
# }