SPADE V1.0 - Spanning-tree Progression Analysis of Density-normalized Events

SPADE is a new analytical tool that uncovers an underlying cellular hierarchy from single-cell data. Flow cytometry provides measurements of multiple molecular markers for massive numbers of single cells. The recently developed mass cytometry technology (CyTOF) is able to measure 30+ markers simultaneously. To objectively analyze such complex data, we developed SPADE, which is able to extract underlying cellular hierarchy from single-cell data without requiring prior knowledge. The SPADE algorithm is described in the following paper:

SPADE was developed and implemented in MATLAB. In the following, we provide the source code that generated all figures in the above paper. We also provide one example data file, which is described in the paper. If you find any bugs, please contact Peng Qiu at

License conditions:   
The SPADE software is free for academic use. A patent for SPADE has been applied for on behalf of Stanford University. For license conditions, please contact the Office of Technology Licensing at Stanford (Kirsten Leute,

(1) Requirement: Matlab 7 or higher. Parallel computing toolbox is optional but preferred.
(2) Download our Matlab implementation of SPADE: (last updated on August 30, 2011)
(3) Unzip the downloaded file, and add the directory to matlab path.

(1) Create a new folder, copy to this new folder all the FCS files you want to analyze together. Data in the FCS files should be after compensation. A sample FCS file can be downloaded [here].

(2) Download the following file
process_all_FCSfiles_in_current_folder.m. Save this file to the same fold that contains the FCS files.

(3) Edit this script according to the comments embedded in the file. To process the above sample FCS file, no editting needed.

(4) Run this .m script. A series of intermediate .mat file will be generated.

(5) The last few lines of the .m generate figure files similar to the ones shown in the paper.

(6) We provide a graphical user interface for interactive exploration of the result
            Type "flow_analysis_GUI" in matlab. A graphical user interface will show-up
            Choose load result file in the upper left panel
            Browse and Load the file with the second longest .mat file (or the longest one if upsampling is not performed)
            The figures generated in (5) can be explored interactively using bottoms in the the right half the interface.

A newer and much more powerful version is now available SPADE2