gate_web_draw: Draw Web Gates Around Populations.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/gating-functions.R

Description

gate_web_draw is a variation of drawQuadrant which allows more flexibility with gate co-ordinates (angled lines) and supports any number of gates as indicated by the alias argument. To construct the gate simply select the center point and surrounding divider points on plot edge. gate_web_draw will construct the polygonGate objects and store them in a filters list.

Usage

1
2
gate_web_draw(fr, alias = NULL, channels, plot = TRUE, label = TRUE,
  ...)

Arguments

fr

a flowFrame object containing the flow cytometry data for plotting and gating.

alias

the name(s) of the populations to be gated. If multiple population names are supplied (e.g. c("CD3","CD4")) multiple gates will be returned. alias is NULL by default which will halt the gating routine. Recommended for 3 or more populations.

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.

label

logical indicating whether to include cyto_plot_label for the gated population(s), TRUE by default.

...

additional arguments for cyto_plot,flowFrame-method.

Value

afilters list containing the constructed polygonGate object(s).

Author(s)

Dillon Hammill (Dillon.Hammill@anu.edu.au)

See Also

cyto_plot,flowFrame-method

gate_draw

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## 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 web gates using gate_web_draw
wg <- gate_web_draw(fs[[4]],
  alias = c("DN", "CD4", "CD8"),
  channels = c("Alexa Fluor 700-A", "Alexa Fluor 488-A")
)

# wg is a filters object - extract each polygonGate using `[[`
wg[[4]]

## End(Not run)

DillonHammill/cytoSuite documentation built on March 7, 2019, 10:09 a.m.