R/cyto-helpers.R
cyto_setup.Rd
cyto_setup
takes care of all the data loading and annotation steps to
prepare your cytometry data for downstream analyses. The .fcs files are first
read into a cytoset
using
cyto_load
which is then added to a
GatingSet
.
cyto_setup( path = ".", gatingTemplate = NULL, restrict = FALSE, clean = FALSE, markers = TRUE, parse_names = FALSE, details = TRUE, sample = FALSE, ... )
path | points to the location of the .fcs files to read in (e.g. name of a folder in current working directory). |
---|---|
gatingTemplate | name of a gatingTemplate csv file to be used for gate saving. |
restrict | logical indicating whether unassigned channels should be
dropped from the returned cytoset, set to FALSE by default. Alternatively,
users can supply a vector of channels to remove, see
|
clean | logical indicating whether the loaded data should be cleaned
using |
markers | logical indicating whether a call should be made to
|
parse_names | logical indicating whether the file names should be parsed
into experiment details using |
details | logical indicating whether a call should be made to
|
sample | logical indicating whether all samples should be downsampled to the minimum number of events in a sample, set to FALSE by default. Alternatively, users can supply a numeric to indicate the desired number of events to keep in each sample. |
... | additional arguments passed to
|
object of class
GatingSet
.
Calls are then made to cyto_markers_edit
and
cyto_details_edit
to update the GatingSet with the details of
the experiment. These details can be modified later with additional calls to
cyto_markers_edit
and/or cyto_details_edit
.
Through the clean
argument, the data can then be optionally cleaned
using flow_auto_qc
to automatically remove
anomalies in the recorded data.
Users can optionally provide a name for a gatingTemplate csv file which will be created if necessary and assigned as the active gatingTemplate.
Dillon Hammill, Dillon.Hammill@anu.edu.au
if (FALSE) { # Load in CytoExploreRData to access data library(CytoExploreRData) # Get path to Activation .fcs files in CytoExploreRData datadir <- system.file("extdata", package = "CytoExploreRData") path <- paste0(datadir, "/Activation") # Load in .fcs files into an annotated GatingSet gs <- cyto_setup(path) # Markers have been assigned cyto_extract(gs, "root")[[1]] # Experiment details have been updated cyto_details(gs) }