The complete FlowSOM package known from R and Bioconductor, now available in Python with scverse integration!
FlowSOM is a clustering and visualization algorithm originally based on a self-organizing map (SOM). FlowSOM is used to distinguish cell populations from cytometry data in an unsupervised way and can help to gain deeper insights in fields such as immunology and oncology.
Please refer to the documentation. In particular, the following resources are available:
You need to have Python 3.9 or newer installed on your system. There are several options to install FlowSOM:
Recommended installation: install the latest release of FlowSOM from PyPI:
pip install flowsom
Alternative 1: install the development version from the GitHub repository:
pip install git+https://github.com/saeyslab/FlowSOM_Python
Alternative 2: install the FlowSOM Conda package via the Conda package manager:
conda install -c conda-forge flowsom
Starting from an FCS file that is properly transformed, compensated and checked for quality, the following code can be used to run the FlowSOM algorithm:
# Import the FlowSOM package
import flowsom as fs
# Load the FCS file
ff = fs.io.read_FCS("./tests/data/ff.fcs")
# Run the FlowSOM algorithm
fsom = fs.FlowSOM(
ff, cols_to_use=[8, 11, 13, 14, 15, 16, 17], xdim=10, ydim=10, n_clusters=10, seed=42
)
# Plot the FlowSOM results
p = fs.pl.plot_stars(fsom, background_values=fsom.get_cluster_data().obs.metaclustering)
p.show()
See the changelog.
For questions and help requests or if you found a bug, please use the issue tracker.
If you use FlowSOM
in your work, please cite the following papers:
A. Couckuyt, B. Rombaut, Y. Saeys, and S. Van Gassen, “Efficient cytometry analysis with FlowSOM in Python boosts interoperability with other single-cell tools,” Bioinformatics, vol. 40, no. 4, p. btae179, Apr. 2024, doi: 10.1093/bioinformatics/btae179.
S. Van Gassen et al., “FlowSOM: Using self-organizing maps for visualization and interpretation of cytometry data,” Cytometry Part A, vol. 87, no. 7, pp. 636–645, 2015, doi: 10.1002/cyto.a.22625.