View source: R/cyto_gate_draw.R
cyto_gate_draw | R Documentation |
cyto_gate_draw
allows to users to interactive draw gates around
populations which are returned as flowCore
gate objects. The flowFrame
and flowSet methods simply return the constructed gates as a list of
flowCore-compatible gate objects, whilst the GatingSet method automatically
applies the constructed gates to the GatingSet and saves the constructed
gates in an openCyto
gatingTemplate
for future use.
See cyto_gate_edit
, cyto_gate_remove
and
cyto_gate_rename
to manipulate constructed gates and modify
their entries in the gatingTemplate.
## S3 method for class 'GatingSet' cyto_gate_draw( x, parent = "root", alias = NULL, channels = NULL, type = NULL, gatingTemplate = NULL, overlay = NA, group_by = "all", select = NULL, negate = FALSE, display = 25000, axis = "x", label = TRUE, plot = TRUE, popup = TRUE, axes_limits = "machine", gate_point_shape = 16, gate_point_size = 1, gate_point_col = "red", gate_point_col_alpha = 1, gate_line_type = 1, gate_line_width = 2.5, gate_line_col = "red", gate_line_col_alpha = 1, ... ) ## S3 method for class 'flowSet' cyto_gate_draw( x, alias = NULL, channels = NULL, type = NULL, overlay = NA, group_by = "all", select = NULL, negate = FALSE, display = 25000, axis = "x", label = TRUE, plot = TRUE, popup = TRUE, axes_limits = "machine", gate_point_shape = 16, gate_point_size = 1, gate_point_col = "red", gate_point_col_alpha = 1, gate_line_type = 1, gate_line_width = 2.5, gate_line_col = "red", gate_line_col_alpha = 1, ... ) ## S3 method for class 'flowFrame' cyto_gate_draw( x, alias = NULL, channels = NULL, type = NULL, overlay = NA, negate = FALSE, display = 25000, axis = "x", label = TRUE, plot = TRUE, popup = TRUE, axes_limits = "machine", gate_point_shape = 16, gate_point_size = 1, gate_point_col = "red", gate_point_col_alpha = 1, gate_line_type = 1, gate_line_width = 2.5, gate_line_col = "red", gate_line_col_alpha = 1, ... )
x |
object of class |
parent |
name of the |
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. |
type |
vector of gate type names used to construct the gates. Multiple
gate types are supported but should be accompanied with an |
gatingTemplate |
name of |
overlay |
name(s) of the populations to overlay or a |
group_by |
vector of |
select |
designates which samples will be plotted and used for
determining the best location to set the drawn gate(s). Filtering steps
should be comma separated and wrapped in a list. Refer to
|
negate |
logical indicating whether a gatingTemplate entry should be made for the negated population (i.e. all events outside the constructed gates), set to FALSE by default. If negate is set to TRUE, a name for the negated population MUST be supplied at the end of the alias argument. |
display |
fraction or number of events to display in the plot during the gating process, set to 25 000 events by default. |
axis |
indicates whether the |
label |
logical indicating whether to include
|
plot |
logical indicating whether a plot should be drawn, set to
|
popup |
logical indicating whether the plot should be constructed in a pop-up window, set to TRUE by default. |
axes_limits |
options include |
gate_point_shape |
shape to use for selected gate points, set to
|
gate_point_size |
numeric to control the size of the selected gate points, set to 1 by default. |
gate_point_col |
colour to use for the selected gate points, set to "red" by default. |
gate_point_col_alpha |
numeric [0,1] to control the transparency of the selected gate points, set to 1 by default to use solid colours. |
gate_line_type |
integer [0,6] to control the line type of gates, set to
|
gate_line_width |
numeric to control the line width(s) of gates, set to
|
gate_line_col |
colour to use for gates, set to |
gate_line_col_alpha |
numeric [0,1] to control the transparency of the selected gate lines, set to 1 by default to use solid colours. |
... |
additional arguments for |
flowFrame
and flowSet
methods return a list of flowCore
gate objects per group in group_by, whilst the GatingSet
applies the
constructed gates directly to the GatingSet
and adds appropriate
entries into the specified gatingTemplate
. The GatingSet
method does not return the constructed gates but instead invisibly returns
the gatingTemplate
entries.
Dillon Hammill, Dillon.Hammill@anu.edu.au
cyto_plot
cyto_gate_edit
cyto_gate_remove
cyto_gate_rename
## Not run: # Gate drawing requires an interactive R session library(CytoExploreRData) # 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(fs)) gs <- transform(gs, trans) # Gate using cyto_gate_draw gt_gating(Activation_gatingTemplate, gs) # draw gates using cyto_gate_draw cyto_gate_draw(gs, parent = "Dendritic Cells", channels = c("Alexa Fluor 488-A", "Alexa Fluor 700-A"), alias = c("CD8+ DC", "CD4+ DC"), gatingTemplate = "Example-gatingTemplate.csv", type = "rectangle", contour_lines = 15 ) # Constructed gate applied directly to GatingSet cyto_nodes(gs) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.