cytofkit-package: cytofkit: an integrated mass cytometry data analysis pipeline

Description Details Author(s) References See Also Examples


This package is designed to facilitate the analysis workflow of mass cytometry data with automatic subset identification and mapping of cellular progression. Both command line and a GUI client are provided for executing the workflow easily.


This package integrates merging methods of multiple FCS files, dimension reduction methods (PCA, t-SNE and ISOMAP) and clustering methods (DensVM, ClusterX, and Rphenograph) for rapid subset detection. Analysis results can be visualized and explored interactively using a specially designed shiny web APP, see cytofkitShinyAPP. Moreover, the method isomap is provided to map the cellular progression. This workflow can be easily executed with the main function cytofkit or through the GUI client cytofkit_GUI.


Using function cytof_exprsMerge, one or multiple FCS files will be loaded via the *read.FCS* function in the *flowCore* package. Then transformation will be applied to the expression value of each FCS file. Transformation methods include autoLgcl, cytofAsinh, logicle and arcsinh, where cytofAsinh is the default.Then mutilple FCS files are merged using one of the merging methods all, min, fixed or ceil.

Dimensionality reduction

Using function cytof_dimReduction, t-Distributed Stochastic Neighbor Embedding (tsne) is suggested for dimensionality reduction with selected markers, although we also provide methods like isomap and pca.


Using function cytof_cluster, three cluster method are provided, DensVM, ClusterX Rphenograph and FlowSOM. DensVM, densityClustX are performend on the dimension reduced data, while Rphenograph works directed on the high dimensional expression data. Method FlowSOM is integrated from FlowSOM package (


- Using function cytof_clusterPlot to visualize the cluster results in a scatter plot, in which dots represent cells, colours indicate their assigned clusters and point shapes represent their belonging samples.

- Using function cytof_heatmap to generate heat map to visualize the mean expression of every marker in every cluster. This heat maps is useful to interrogate marker expression to identify each cluster's defining markers.

- Using function cytof_progressionPlot to visualize the expression pattern of selected markers against the estimated cellular progression order.

- Using function cytof_addToFCS to add any dimension reduced data, cluster results, progression data into the original FCS files, new FCS files will be saved for easy checking with other softwares like FlowJo.

All the above post processing can be automatically implemented and saved using one function cytof_writeResults.


Hao Chen, Jinmiao Chen


See Also

cytofkit, cytofkit_GUI


## Run on GUI
#cytofkit_GUI()  # remove the hash symbol to launch the GUI

## Run on command
dir <- system.file('extdata',package='cytofkit')
file <- list.files(dir, pattern='.fcs$', full=TRUE)
parameters <- list.files(dir, pattern='.txt$', full=TRUE)
## remove the hash symbol to run the following command
#results <- cytofkit(fcsFile = file, markers = parameters)   

## Checking the vignettes for more details 
if(interactive()) browseVignettes(package = 'cytofkit')

cytofkit documentation built on Nov. 1, 2018, 3:50 a.m.