Description Usage Arguments Value Author(s) Examples
DrawGate
allows the user to draw polygon gates directly onto plots of flow cytometry data.
Simply left click to gate and right click to close the gate.
1 2 3 4 |
fr |
a |
pp_res |
output of preprocessing function. |
channels |
a vector of length 2 indicating the channels used to construct the 2D plot. |
filterId |
gate name assigned by openCyto from the |
gate_range |
range in which gate should be constructed (only needed for autogating functions). |
min |
argument passed to |
max |
argument passed to |
gate_type |
type of gate to be constructed, supported types include
|
N |
an integer indicating the number of gates to construct, set to 1 by default. |
axis |
indicates the axis to use for gating for |
adjust |
numeric smoothing factor used for 1D density plots. |
... |
additional arguments passsed to |
a polygonGate
constructed from coordinates supplied by DrawGate
.
Dillon Hammill (Dillon.Hammill@anu.edu.au)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | {
library(openCyto)
registerPlugins(fun = gate_draw, methodName = "DrawGate")
listgtMethods() # check plugin has been registered with openCyto
fs <- read.flowSet(path = "Samples", pattern = ".fcs") # load in .fcs files
gs <- GatingSet(fs) # add flowSet to GatingSet
template <- add_pop(
gs, alias = "Lymphocytes", pop = "+", parent = "root", dims = "FSC-A,SSC-A", gating_method = "DrawGate", gaating_args = "gate_type='ellipse'",
gating_args = "subSample=10000", collapseDataForGating = TRUE, groupBy = 2
)
# gating window will open to construct gate left click vertices on plot and close gate by right click and selecting "stop".
ggcyto(gs[[1]], subset = "root", aes(x = "FSC-A",y = "SSC-A")) + geom_hex(bins = 100) + geom_stats()
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.