Learn R Programming

⚠️There's a newer version (3.18.6) of this package.Take me there.

flowWorkspace: An infrastructure tool for the hierarchical gated flow cytometry data.

This package is designed to store, query and visualize the hierarchical gated flow data.

It also facilitates the comparison of automated gating methods against manual gating by

importing basic flowJo workspaces into R and replicate the gating from flowJo using the flowCore functionality. Gating hierarchies,

groups of samples, compensation, and transformation are performed so that the output matches the flowJo analysis.

INSTALLATION

# First, install it from bionconductor so that it will pull all the dependent packages automatically
library(BiocInstalller)
bicLite(flowWorkspace) # may be older
# Then, install the latest version from github using devtools package 
install.packages("devtools") 
library(devtools) #load it
install_github("flowWorkspace","RGLab",branch="master")

Import flowJo workspace

library(flowWorkspace)
dataDir <- system.file("extdata",package="flowWorkspaceData")
wsfile <- list.files(dataDir, pattern="manual.xml",full=TRUE)
ws <- openWorkspace(wsfile);
gs <- parseWorkspace(ws, path = dataDir, name = 4, subset = "CytoTrol_CytoTrol_1.fcs")
gs

#get the first sample
gh <- gs[[1]]
#plot the hierarchy tree
plot(gh)
#show all the cell populations(/nodes)
getNodes(gh)
#show the population statistics
getPopStats(gh)
#plot the gates
plotGate(gh) 

More examples:

Copy Link

Version

Version

3.16.0

License

Artistic-2.0

Maintainer

Greg Finak

Last Published

February 15th, 2017

Functions in flowWorkspace (3.16.0)

filterObject,rectangleGate-method

convert flowCore filter to a list
flowData,GatingSet-method

Fetch or replace the flowData object associated with a GatingSet .
GatingSet-class

Class "GatingSet"
GatingSet,character,character-method

constructors for GatingSet
getParent,GatingSet,character-method

Return the name of the parent population or a list of child populations of the current population in the GatingHierarchy
plot,GatingSet,missing-method

plot a gating tree
pData,GatingHierarchy-method

read/set pData of flow data associated with GatingSet or GatingSetList
getProp,GatingHierarchy,character-method

Return a table of population statistics for all populations in a GatingHierarchy/GatingSet or the population proportions or the total number of events of a node (population) in a GatingHierarchy
updateChannels

Update the channel information of a GatingSet (c++ part)
add,GatingSet,list-method

Create a GatingSet and add/remove the flowCore gate(or population) to/from a GatingHierarchy/GatingSet.
archive

archive/unarchive to/from a tar file
getKeywords,flowJoWorkspace,character-method

Get Keywords
getNodes,GatingSet-method

Get the names of all nodes from a gating hierarchy.
keyword,GatingHierarchy,character-method

Retrieve a specific keyword for a specific sample in a GatingHierarchy or or set of samples in a GatingSet or GatingSetList
lapply,GatingSet-method

apply FUN to each sample (i.e. GatingHierarchy)
GatingSetList-class

Class "GatingSetList"
getCompensationMatrices,GatingHierarchy-method

Retrieve the compensation matrices from a GatingHierarchy
getIndices,GatingSet,name-method

routine to return the indices by specify boolean combination of reference nodes:
length,GatingSet-method

Methods to get the length of a GatingSet
getIndices,GatingHierarchy,character-method

Get the membership indices for each event with respect to a particular gate in a GatingHierarchy
getLoglevel

get/set the log level
setGate,GatingHierarchy,character,filter-method

update the gate
setNode,GatingHierarchy,character,character-method

Update the name of one node in a gating hierarchy/GatingSet.
flowWorkspace-package

Import and replicate flowJo workspaces and gating schemes using flowCore.
flowJoTrans

construct the flowJo-type biexponentioal transformation function
flowJoWorkspace-class

An R representation of a flowJo workspace.
getGate,GatingHierarchy,character-method

Return the flowCore gate definition associated with a node in a GatingHierarchy/GatingSet.
getIndiceMat

Return the single-cell matrix of 1/0 dichotomized expression
getSampleGroups,flowJoWorkspace-method

Get a table of sample groups from a flowJo workspace
getSamples,flowJoWorkspace-method

Get a list of samples from a flowJo workspace
mkformula

make a formula from a character vector
ncFlowSet

Fetch the flowData object associated with a GatingSet .
plotGate

Plot gates and associated cell population contained in a GatingHierarchy or GatingSet
plotPopCV,GatingHierarchy-method

Plot the coefficient of variation between flowJo and flowCore population statistics for each population in a gating hierarchy.
transform,GatingSet-method

tranform the flow data asssociated with the GatingSet
subset.GatingSet

subset the GatingSet/GatingSetList based on 'pData'
flowWorkspace.par.set

flowWorkspace.par.set sets a set of parameters in the flowWorkspace package namespace.
flowWorkspace.par.init

workspace version is parsed from xml node '/Workspace/version' in flowJo workspace and matched with this list to dispatch to the one of the three workspace parsers
GatingHierarchy-class

Class GatingHierarchy
openWorkspace,character-method

Open/Close a flowJo workspace
getSingleCellExpression,GatingSet,character-method

Return the cell events data that express in any of the single populations defined in y
getTransformations,GatingHierarchy-method

Return a list of transformations or a transformation in a GatingHierarchy
parseWorkspace,flowJoWorkspace-method

Parse a flowJo Workspace
prettyAxis

Determine tick mark locations and labels for a given channel axis
recompute,GatingSet-method

Compute the cell events by the gates stored within the gating tree
clone

clone a GatingSet
booleanFilter-class

A class describing logical operation (& or |) of the reference populations
getFJWSubsetIndices

Fetch the indices for a subset of samples in a flowJo workspace, based on a keyword value pair
insertGate

insert a dummy gate to the GatingSet
getData,GatingHierarchy,missing-method

get gated flow data from a GatingHierarchy/GatingSet/GatingSetList
isNcdf

determine the flow data associated with a Gating Hiearchy is based on `ncdfFlowSet` or `flowSet`
sampleNames,GatingHierarchy-method

Get/update sample names in a GatingSet
save_gs

save/load a GatingSet/GatingSetList to/from disk.