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
A flowJoWorkspace is generated with a call to
openWorkspace(), passing the name of the xml workspace file. This returns a
flowJoWorkspace, which can be parsed using the
parseWorkspace() 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 <- openWorkspace(f) #parse the second group gs <- parseWorkspace(ws, name = 2); #assume that the fcs files are under the same folder as workspace gs <- parseWorkspace(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 <- parseWorkspace(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 <- parseWorkspace(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 <- parseWorkspace(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.