GatingHierarchy and GatingSet classes

Classes for managing compensation, transformation, and gating of cytometry data (FCS files) and methods for creating them


Class GatingHierarchy


Class "GatingSet"


constructors for GatingSet


Class "GatingSetList"

`[`(<GatingSet>,<ANY>,<ANY>,<ANY>) `[[`(<GatingSet>,<numeric>)

Bracket operators on GatingSet and GatingSetList objects

identifier() `identifier<-`(<GatingSet>,<ANY>) `identifier<-`(<GatingSetList>,<character>)

Retrieve/replace the GUID of a GatingSet or GatingSetList

convert_legacy_gs() convert_legacy_gslist()

convert the legacy GatingSet archive (mixed with R and C++ files) to the new format (C++ only)

cytoframe and cytoset classes

Reference classes for efficiently managing the representation of data from FCS files (analagous to flowFrame and flowSet classes from the flowCore package)


cytoframe: A reference class for efficiently managing the data representation of a flowFrame


cytoset: a reference class for efficiently managing the data representation of a flowSet

cytoframe_to_flowFrame() flowFrame_to_cytoframe() cytoset_to_flowSet() flowSet_to_cytoset() cytoset_to_list()

Methods for conversion between flowCore and flowWorkspace data classes


Read a single FCS file in to a cytoframe

cf_get_uri() cf_get_h5_file_path()

Return the file path of the underlying h5 file


Save the cytoframe as h5 format


Read one or several FCS files in to a cytoset

save_cytoset() load_cytoset()

save/load a cytoset to/from disk. load_cytoset() can load a cytoset from either the archive previously saved by save_cytoset() call or from a folder that contains a collection of inidivudal cytoframe files (either in h5 format or tiledb format)


Add a cytoframe to a cytoset


update a cytoframe in a cytoset

cs_get_uri() cs_get_h5_file_path() gs_get_uri()

Return the path of the underlying data files

cf_flush_meta() cf_load_meta() cs_flush_meta() cs_load_meta()

Flush/load meta data (keywords, pData, channels/markers) to/from disk (only valid for on-disk cytoset/cytoframe)

cf_lock() cf_unlock() cs_lock() cs_unlock()

Lock/Unlock the cytoset/cytoframe by turning on/off its read-only flag


Append data columns to a flowFrame

cf_swap_colnames() cf_rename_channel() cf_rename_marker() cs_swap_colnames()

Methods to change channel and marker names for cytoframe and cytoset objects

cf_keyword_insert() cf_keyword_delete() cf_keyword_rename() cf_keyword_set() cs_keyword_insert() cs_keyword_delete() cs_keyword_rename() cs_keyword_set() gh_keyword_insert() gh_keyword_delete() gh_keyword_rename() gh_keyword_set() gs_keyword_insert() gs_keyword_delete() gs_keyword_rename() gs_keyword_set()

Methods to alter keywords in cytoframe, cytoset, GatingHierarchy, or GatingSet objects

Examining the hierarchical gating tree

Functions for examining the subpopulations resulting from applying gates to the data


plot a gating tree


visualize the tree structure differnece among the GatingSets

gs_get_pop_paths() gh_get_pop_paths()

Get the names of all nodes from a gating hierarchy.

gs_get_leaf_nodes() gh_get_leaf_nodes()

get all the leaf nodes


try to determine the redundant terminal(or leaf) nodes that can be removed


Remove the terminal leaf nodes that make the gating trees to be different from one another.


Retrieve the cluster labels from the cluster nodes


check if a node is clustering node


Extract the population name from the node path It strips the parent path and cluster method name.


convert the partial gating path to the full path

gs_pop_get_parent() gh_pop_get_parent() gs_pop_get_children() gh_pop_get_children()

Return the name of the parent population or a list of child populations of the current population in the GatingHierarchy


get all the descendant nodes for the given ancester

gs_pop_get_stats() gh_pop_get_stats()

Extract stats from populations(or nodes)

gs_pop_get_stats_tfilter() gh_pop_get_stats_tfilter()

Extract stats from populations(or nodes) within a restricted time window


Compare the stats(count/freq) between the version parsed from xml and the one recalculated/gated from R

gh_plot_pop_count_cv() gs_plot_pop_count_cv()

Plot the coefficient of variation between xml and openCyto population statistics for each population in a gating hierarchy.

gh_pop_get_proportion() gh_pop_get_count()

Get count or proportion from populations

gs_pop_get_count_fast() gs_pop_get_count_with_meta()

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

Accessing underyling data

Functions for accessing or altering the flowFrame or flowSet objects underlying the gating analysis. These can also be useful in preparing GatingSet objects for merging.

gs_is_persistent() gs_is_h5() isNcdf()

determine whether the flow data associated with a GatingSet is persistent(on-disk) or in-memory

gs_cyto_data() `gs_cyto_data<-`()

Fetch or replace the flowData object associated with a GatingSet .


get gated flow data from a GatingHierarchy/GatingSet/GatingSetList

gh_get_compensations() gs_get_compensations()

Retrieve the compensation matrices from a GatingHierarchy or GatingSet


extract compensation object from GatingSet


Return a list of transformations or a transformation in a GatingHierarchy


compensate the flow data asssociated with the GatingSet


tranform the flow data asssociated with the GatingSet

length(<GatingSet>) show(<GatingSet>)

Methods to get the length of a GatingSet

sampleNames() `sampleNames<-`()

Get/update sample names in a GatingSet

markernames(<GatingHierarchy>) `markernames<-`(<GatingHierarchy>) colnames(<GatingHierarchy>) `colnames<-`(<GatingHierarchy>)

Get/set the column(channel) or marker names

pData() `pData<-`()

read/set pData of flow data associated with GatingHierarchy, GatingSet, or GatingSetList

keyword(<GatingHierarchy>,<character>) keyword(<GatingHierarchy>,<missing>)

Retrieve a specific keyword for a specific sample in a GatingHierarchy or or set of samples in a GatingSet or GatingSetList

Perform gating analysis

Functions for accessing, altering, adding, and removing gate definitions and their resulting subpopulations. These can also be useful in preparing GatingSet objects for merging.

gh_pop_is_gated() gh_pop_is_negated() gh_pop_is_hidden() gh_pop_is_bool_gate()

The flags of gate nodes

gh_pop_set_visibility() gs_pop_set_visibility()

hide/unhide a node


save the event counts parsed from xml into c++ tree structure

gh_pop_get_gate() gs_pop_get_gate()

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

gh_pop_set_gate() gs_pop_set_gate()

update the gate


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

gh_pop_set_name() gs_pop_set_name()

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


Simplified geometric transformations of gates associated with nodes


Simplified geometric rotation of gates associated with nodes


Simplified geometric scaling of gates associated with nodes


Simplified geometric translation of gates associated with nodes


subset the GatingSet/GatingSetList based on 'pData'


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


Return the single-cell matrix of 1/0 dichotomized expression


directly update event indices without changing gates

gs_get_singlecell_expression() gs_get_singlecell_expression_by_gate()

Return the cell events data that express in any of the single populations defined in y


built-in stats functions.

pop_add() gh_pop_remove()

Add populations to a GatingHierarchy

gs_pop_add() gs_pop_remove()

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


move a node along with all of its descendant nodes to the given ancester


Copy a node along with all of its descendant nodes to the given ancestor


Construct a GatingSet using a template and FCS files


The tools to standardize the tree structures and channel names.


Update the channel information of a GatingSet (c++ part)


Remove the channels from flow data that are not used by gates


split GatingSets into groups based on their flow channels


split GatingSets into groups based on their gating schemes Be careful that the splitted resluts still points to the original data set!!


Merge a list of GatingSets into a single GatingSet


apply FUN to each sample (i.e. GatingHierarchy or cytoframe) in a GatingSet or cytoset


Merge a GatingSetList into a single GatingSet

Helpers to generate transformations and filters

Functions for quickly constructing transformations or filters or converting them to a form that can be applied to data in a GatingHierachy or GatingSet


helper function to generate a trans objects Used by other specific trans constructor


Constructor for transformerList object


Compute logicle transformation from the flowData associated with a GatingHierarchy


convert flowCore filter to a list It convert the flowCore gate to a list whose structure can be understood by underlying c++ data structure.


inverse hyperbolic sine transform function generator (GatingML 2.0 version)


Inverse hyperbolic sine transformation.


logicle transformation.


GatingML2 version of logicle transformation.


Gating-ML 2.0 Log transformation.

flowjo_fasinh() flowjo_fsinh()

inverse hyperbolic sine transform function

flowjo_fasinh_trans() flowJo_fasinh_trans()

flowJo inverse hyperbolic sine transformation.


flog transform function


construct the flowJo-type biexponentioal transformation function

flowjo_biexp_trans() flowJo_biexp_trans()

flowJo biexponential transformation.

booleanFilter() char2booleanFilter()

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

Read/write GatingSet objects

Functions to read save GatingSet objects to disk or read them in to an R session

save_gs() load_gs() sampleNames(<character>) save_gslist() load_gslist()

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

Plotting functions

Methods for plotting the hierarchical gating tree and gates. More dedicated plotting methods for GatingSet and GatingHierarchy objects are provided by the ggcyto package,


plot a gating tree


Plot gates and associated cell population contained in a GatingHierarchy or GatingSet


Determine tick mark locations and labels for a given channel axis

Miscellaneous helper functions

Functions whose role does not easily fit in to one of the above categories

get_log_level() set_log_level()

get/set the log level


Generate the breaks that makes sense for flow data visualization


Swap the colnames Perform some validity checks before returning the updated colnames

cf_cleanup_temp() cs_cleanup_temp() gh_cleanup_temp() gs_cleanup_temp()

Remove temporary files associatated with flowWorkspace data classes