Plot filters List of Gate Objects onto an Existing Plot

# S4 method for filters
cyto_plot_gate(x, channels, gate_line_type = 1,
  gate_line_width = 2.5, gate_line_col = "red", gate_point = FALSE,
  gate_point_shape = 16, gate_point_size = 1)

Arguments

x

an object of class filters containing objects of class rectangleGate, polygonGate or ellipsoidGate.

channels

fluorescent channels to used to construct the plot.

gate_line_type

integer [0,6] which controls the line type, set to 1 to draw solid lines by default.

gate_line_width

numeric to adjust line thickness of gates, set to 2.5 by default.

gate_line_col

indicates the colour of the gate to be constructed, set to "red" by default.

gate_point

logical indicating whether points should be included when plotting the gates, set to FALSE by default.

gate_point_shape

integer [0,25] passed to pch to control the shape of the points, set to 16 to draw filled circles by default. For other shapes refer to ?pch.

gate_point_size

numeric character expansion to control the size of the points in the drawn gate, set to 1 by default.

Value

gate object with modified co-ordinates for plotting.

See also

Examples

library(CytoRSuiteData) # Load in samples fs <- Activation gs <- GatingSet(fs)
#> .
#> .
#> .
#> .
#> done!
# 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 gating(Activation_gatingTemplate, gs)
#> Preprocessing for 'Cells'
#> Gating for 'Cells'
#> done.
#> Preprocessing for 'Single Cells'
#> Gating for 'Single Cells'
#> done.
#> Preprocessing for 'Live Cells'
#> Gating for 'Live Cells'
#> done.
#> Preprocessing for 'Dendritic Cells'
#> Gating for 'Dendritic Cells'
#> done.
#> Preprocessing for 'T Cells'
#> Gating for 'T Cells'
#> done.
#> Preprocessing for 'CD8 T Cells'
#> Gating for 'CD8 T Cells'
#> done.
#> Preprocessing for 'CD69+ CD8 T Cells'
#> Gating for 'CD69+ CD8 T Cells'
#> done.
#> Preprocessing for 'CD4 T Cells'
#> Gating for 'CD4 T Cells'
#> done.
#> Preprocessing for 'CD69+ CD4 T Cells'
#> Gating for 'CD69+ CD4 T Cells'
#> done.
#> finished.
# Plot cyto_plot(gs[[4]], parent = "Live Cells", channels = c("APC-Cy7-A", "PE-A"), axes_trans = trans )
# T Cells & Dendritic Cells gate cyto_plot_gate(filters(list( getGate(gs, "T Cells")[[1]], getGate(gs, "Dendritic Cells")[[1]] )), channels = c("APC-Cy7-A", "PE-A"), gate_line_col = c("green4", "orange") )