Function to parse a flowJo Workspace, generate a
GatingSet object, and associated flowCore gates. The data are not loaded or acted upon until an explicit call to
recompute() is made on the
GatingHierarchy objects in the
1 2 3 4 5 6 7 8
## S4 method for signature 'flowjo_workspace' parseWorkspace(obj, ...) flowjo_to_gatingset(obj, name = NULL, subset = NULL, requiregates = TRUE, sampNloc = "keyword", additional.keys = "$TOT", additional.sampleID = FALSE, keywords = NULL, keywords.source = "XML", execute = TRUE, path = obj@path, keyword.ignore.case = FALSE, ...)
A flowjo_workspace is generated with a call to
open_flowjo_xml(), passing the name of the xml workspace file. This returns a
flowjo_workspace, which can be parsed using the
flowjo_to_gatingset() method. The function can be called non-interactively by passing the index or name of the group of samples to be imported via
x is either the numeric index, or the name.
subset argument allows one to select a set of files from the chosen sample group. The routine will take the intersection of the files in the sample group, the files specified in
subset and the files available on disk, and import them.
GatingSet, which is a wrapper around a list of
GatingHierarchy objects, each representing a single sample in the workspace. The
GatingHierarchy objects contain
graphNEL trees that represent the gating hierarchy of each sample. Each node in the
GatingHierarchy has associated data, including the population counts from flowJo, the parent population counts, the
flowCore gates generated from the flowJo workspace gate definitions. Data are not yet loaded or acted upon at this stage. To execute the gating of each data file, a call to
execute() must be made on each
GatingHierarchy object in the
GatingSet. This is done automatically by default, and there is no more reason to set this argument to FALSE.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
## Not run: #f is a xml file name of a flowJo workspace ws <- open_flowjo_xml(f) #parse the second group gs <- flowjo_to_gatingset(ws, name = 2); #assume that the fcs files are under the same folder as workspace gs <- flowjo_to_gatingset(ws, name = 4 , path = dataDir #specify the FCS path , subset = "CytoTrol_CytoTrol_1.fcs" #subset the parsing by FCS filename , isNcdf = FALSE)#turn off cdf storage mode (normally you don't want to do this for parsing large dataset) gs <- flowjo_to_gatingset(ws, path = dataDir, name = 4 , keywords = c("PATIENT ID", "SAMPLE ID", "$TOT", "EXPERIMENT NAME") #tell the parser to extract keywords as pData , keywords.source = "XML" # keywords are extracted from xml workspace (alternatively can be set to "FCS") , additional.keys = c("PATIENT ID") #use additional keywords together with FCS filename to uniquely identify samples , execute = F) # parse workspace without the actual gating (can save time if just want to get the info from xml) #subset by pData (extracted from keywords) gs <- flowjo_to_gatingset(ws, path = dataDir, name = 4 , subset = `TUBE NAME` %in% c("CytoTrol_1", "CytoTrol_2") , keywords = "TUBE NAME") #overide the default compensation defined in xml with the customized compenstations gs <- flowjo_to_gatingset(ws, name = 2, compensation = comps); #comp is either a compensation object or a list of compensation objects ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.