Visualizing single-cell data is crucial for understanding cellular heterogeneity and dynamics. Traditional methods like UMAP and t-SNE are effective for clustering but often miss critical gene information. FeatureMAP innovatively combines UMAP and PCA concepts to preserve both clustering structures and gene feature variations within a low-dimensional space.
FeatureMAP introduces a novel approach by enhancing manifold learning with pairwise tangent space embedding, aiming to retain crucial aspects of cellular data. We introduce two visualization plots by FeatureMAP: expression (GEX) and variation (GVA) embedding. Here is an example over one synthetic dataset (BEELINE) with a bifurcation model. Compared with UMAP, FeatureMAP-GEX better preserves density, and FeatureMAP-GVA shows trajectories.
Besides the two-dimensional visualization, FeatureMAP presents three core concepts:
-
Gene Contribution: Estimating and projecting gene feature loadings. The arrow represents the direction and magnitude of one gene's change.
-
Gene Variation Trajectory: Tracking the cell differentiation across states. There are clear paths (transition states) connecting cell states (core states) in a knot-and-thread way. View 3D Plot
-
Core and Transition States: Defined computationally through cell density and cell variation properties. Core states are cells with higher cell density and smaller cell variation, while transition states are lower cell density and larger cell variation.
These enhancements allow for differential gene variation (DGV) analysis, highlighting key regulatory genes that drive transitions between cellular states. Tested on both synthetic and real single-cell RNA sequencing (scRNA-seq) data, including studies on pancreatic development and T-cell exhaustion (Tutorials in ??), FeatureMAP provides a more detailed understanding of cellular trajectories and regulatory mechanisms.
- Python 3.8 or higher
- Required Python libraries: numpy, scipy, matplotlib, umap-learn, scikit-learn
- Operating System: Any (Windows, macOS, Linux)
pip install featuremap-learn
For data visualization, FeatureMAP introduces expression embedding and variation embedding. Here is one example by MNIST datasets.
import featuremap
from sklearn.datasets import fetch_openml
from sklearn.utils import resample
digits = fetch_openml(name='mnist_784')
subsample, subsample_labels = resample(digits.data, digits.target, n_samples=7000, stratify=digits.target, random_state=1)
x_emb = featuremap.featureMAP().fit_transform(subsample)
v_emb = featuremap.featureMAP(output_variation=True).fit_transform(subsample)
output_variation: bool (False by default). Decide to generate expression embedding or variation embedding.
x_emb: expession embedding to show the clustering
v_emb: variation embedding to show the trajectory
More tutorials are at https://featuremap.readthedocs.io/en/latest/index.html.
Our FeatureMAP alogrithm is based on the paper
Yang, Yang, et al. "Interpretable Dimensionality Reduction by Feature Preserving Manifold Approximation and Projection." arXiv preprint arXiv:2211.09321 (2022).
The FeatureMAP package is under BSD-3-Clause license.