The purpose of this package is to provide the infrastructure to store, represent and exchange gated flow data. By this we mean accessing the samples, groups, transformations, compensation matrices, gates, and population statistics in the gating tree, which is represented as a GatingSet
object in R
.
There are several ways to generate a GatingSet
: * built from scratch within R
(which will be demonstrated later) * imported from the XML workspace files exported from other software (e.g. FlowJo, Diva, CytoBank). Details on the importing xml are documented in CytoML package. * generated by automated gating framework from openCyto package * loaded from the existing GatingSet archive (that was previously saved by save_gs()
call)
Here we simply load an example GatingSet
archive to illustrate how to interact with a GatingSet
object.
library(flowWorkspace)
dataDir <- system.file("extdata",package="flowWorkspaceData")
gs_archive <- list.files(dataDir, pattern = "gs_bcell_auto",full = TRUE)
gs <- load_gs(gs_archive)
gs
## A GatingSet with 2 samples
We have loaded a GatingSet
with 2 samples, each of which has 14 associated gates.
To list the samples stored in GatingSet
:
sampleNames(gs)
## [1] "12828_1_Bcell_C01.fcs" "12828_2_Bcell_C02.fcs"
Subsets of a GatingSet
can be accessed using the standard R subset syntax [
.
gs[1]
## A GatingSet with 1 samples
We can plot the gating tree:
plot(gs, bool = TRUE)