Skip to main content Skip to secondary navigation
Main content start

Self-Assembling Manifold (SAM)

self-assembling manifold

SAM is a single-cell RNAseq data analysis method, implemented in Python. It is built on an iterative soft feature selection strategy to quantify gene relevance and improve dimensionality reduction. In our original paper (Tarahshansky et al. eLife, 2019), we demonstrated that SAM outperforms other methods in a variety of biological and quantitative benchmarks using a total of 56 published datasets. Its advantages are especially apparent on datasets in which cell states or types are only distinguishable through subtle differences in gene expression.

The SAM source code and tutorials can be found at Github or through Scanpy. We have included a number of tutorials describing in detail the various functions, parameters, attributes, and data structures of the SAM package, and provided the documentation for all functions available to the users. In addition, we have developed an interactive user interface that facilitates the convenient exploration of single cell data and SAM parameters. A Jupyter notebook tutorial explaining how to use the interface is provided as well.

Questions or requests?

Please post on Github, or email or



SAMap builds on SAM to map single-cell transcriptomic atlases of different species by explicitly taking into account complex gene evolutionary history. As demonstrated in our original paper (Tarahshansky et al. eLife, 2021), SAMap is the first computational method that can use single-cell RNAseq data to identify homologous cell types with shared gene expression programs across animal phyla. The method is robust to technical batch effects between datasets that are collected through different platforms.

The SAMap tools can be found at Github. We also provide a wrapper function to launch a graphical user interface provided by the SAM package to interactively explore both datasets in the combined manifold.

Mechanical Expansion Microscopy

Mechanical Expansion Microscopy

Expansion microscopy relies on simple chemistry in which cells and tissues are anchored to a crosslinked polyelectrolyte hydrogel network and then expanded by the electrostatic repulsion between polymer chains. Images of expanded structures are then converted back to the original size for improved resolution. Building upon this idea, we have developed two mechanical expansion microscopy methods. The first method, mechanically resolved expansion microscopy, uses non-uniform expansion samples to provide the imaging contrast that resolves local mechanical properties. Examining bacterial cell wall with this method, we were able to distinguish bacterial species in mixed populations based on their distinct cell wall rigidity and detect cell wall damage caused by various physiological and chemical perturbations (Lim et al. PLOS Biology, 2019).

The second method is mechanically locked expansion microscopy, in which we use a mechanically stable gel network to prevent the original polyacrylate hydrogel network from shrinking in ionic buffers. This method allows us to use anti-photobleaching buffers in expansion microscopy, enabling detection of novel ultra-structures under the optical diffraction limit through super-resolution single molecule localization microscopy on bacterial cells and whole-mount immunofluorescence imaging in thick animal tissues.

Step-by-step protocols and applications tips are available at Fan et al. Methods in Cell Biology, 2021.

Expansion Spatial Transcriptomics

Many spatial transcriptomic methods rely on capturing RNA on spatially barcoded arrays, with their resolution limited by the dimension of the array spots. To overcome this limit, we have developed a method, Expansion Spatial Transcriptomics (Ex-ST), which expands tissues prior to sequencing. As detailed in our paper (Fan et al. Nature Methods, 2023), we first anchor RNA in a polyelectrolyte gel, and then expand the gel before transferring the RNA to the capture array in order to improve spatial resolution. We also provide an optimized protocol based on the 10x Visium technology to enhance RNA capture efficiency. Combining these two advances allows us to resolve fine tissue structures, map rare genes, distinguish spatially-mixed sub-cell types, and measure sub-cellular mRNA distributions, as demonstrated in several mouse brain regions.