View source: R/template_gating.R
generate_gate_template | R Documentation |
generate_gate_template()
iterates through samples groups in a
GatingSet to extract and store existing gates into an openCyto
gatingTemplate
that can be easily applied to new GatingSets using
gt_gating()
.
generate_gate_template(
x,
groupBy = NA,
nodes = NULL,
gatingTemplate = FALSE,
save_as = NULL,
...
)
x |
a |
groupBy |
a vector of variable names that exist in
|
nodes |
a vector of full node paths that exist in |
gatingTemplate |
logical to indicate whether a |
save_as |
name of the CSV file to which the gatingTemplate entries should be written, set to NULL to prevent the gatingTemplate from being written to a CSV file. |
... |
additional arguments passed to |
either a data.table
or gatingTemplate
object containing
the requested gatingTemplate entries for downstream templated gating using
gt_gating()
.
Dillon Hammill, Dillon.Hammill@ozette.com
## Not run:
# gs contains variable BioSampleType
pData(gs)$BioSampleType <- rep(c("cells", "beads"), each = 4)
# create gatingTemplate object
gt <- generate_gate_template(
gs,
groupBy = "BioSampleType",
gatingTemplate = TRUE,
save_as = "gatingTemplate.csv"
)
# gt is a gatingTemplate object
gt
# apply gt to a new GatingSet
gt_gating(
gt,
gs_new
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.