\name{flowWorkspace2flowCore} \alias{flowWorkspace2flowCore} \alias{flowWorkspace2flowCore-methods} \alias{flowWorkspace2flowCore,flowJoWorkspace-method} \alias{flowWorkspace2flowCore,GatingHierarchy-method} \alias{flowWorkspace2flowCore,GatingSet-method} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Convert the GatingHierarchies in a GatingSet to a flowCore workflow. } \description{ Extract the compensation matrices,transformation functions and all the gates from GatingHierarchies in a GatingSet generated by the flowWorkspace package, and convert them to the respective views and actionItems of workFlows defined by flowCore package. } \usage{ \S4method{flowWorkspace2flowCore}{GatingSet}(obj, ...) \S4method{flowWorkspace2flowCore}{GatingHierarchy}(obj, ...) \S4method{flowWorkspace2flowCore}{flowJoWorkspace}(obj, ...) } \arguments{ \item{obj}{ can be a \code{flowJoWorkspace},\code{GatingSet} or a \code{GatingHierarchy} } \item{\dots}{ Additional arugments. \code{path="character"} a file path to the fcs file or files. \code{groupId="integer"} a number indicating which group of the data (FlowFrame) should be processed when obj is a flowJoWorkspace. \code{isCompare} a logical flag indicating whether the gatingHierarchies should be compared and merged when they have the same structure if a flowJoWorkspace or GatingSet is provided as the input,default is TRUE } } \details{ When the function is applied to a flowJoWorkspace or GatingSet, it compares gating hierarchies and generate one workflow object for multiple samples if they have the same gating hierarchy structure. When \code{obj} is a flowJoWorkspace it first calls parseWorkspace function to parse the Workspace and generate \code{GatingSet} object and then convert the GatingSet to workflows. } \value{ Returns a workflow if \code{obj} is a GatingHierarchy. Returns a list of workflows if \code{obj} is a flowJoWorkspace or a GatingSet. } \references{ \url{http://www.rglab.org/} } \author{ Mike Jiang \email{wjiang2@fhcrc.org} } \seealso{ \code{\link{GatingSet-class}} \code{\link{GatingHierarchy-class}} \code{\link{flowJoWorkspace-class}} \code{\link{parseWorkspace}} } \examples{ ##locate workspace xml file and fcs files dataDir <- system.file("extdata", package = "flowWorkspace") wsfile<-list.files(dataDir,pattern="xml",full=TRUE)[1] ##open workspace xml file \dontrun{ ws<-openWorkspace(wsfile) ##Convert a flowWorkspace to workFlows wfs<-flowWorkspace2flowCore(ws,groupId=1,path=dataDir) plotWf(wfs[[1]]) ##parse workspace and convert a GatingSet to workFlows G <- parseWorkspace(ws,execute=TRUE,name=1,path=dataDir) wfs<-flowWorkspace2flowCore(G,isCompare=TRUE,path=dataDir) plotWf(wfs[[1]]) ##Convert a GatingHierarchy to workFlow wf <- flowWorkspace2flowCore(G[[1]],path=dataDir) plotWf(wf) } } \keyword{ manip }