Skip to main content

FeatureMAP

Project description

FeatureMAP Illustration

FeatureMAP: Feature-preserving Manifold Approximation and Projection

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.

Description

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. Bifurcation Embedding

Besides the two-dimensional visualization, FeatureMAP presents three core concepts:

  1. Gene Contribution: Estimating and projecting gene feature loadings. The arrow represents the direction and magnitude of one gene's change. Gene Contribution

  2. 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. Gene Variation Trajectory View 3D Plot

  3. 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. Core and Transition States

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.

Getting Started

Dependencies

  • Python 3.8 or higher
  • Required Python libraries: numpy, scipy, matplotlib, umap-learn, scikit-learn
  • Operating System: Any (Windows, macOS, Linux)

Installation

1. Install directly using pip:

pip install featuremap-learn

2. Installation via Conda

For users who prefer using Conda, especially for managing complex dependencies and environments in scientific computing.

conda install ???

How to use FeatureMAP

Data Visualization

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)

Parameters:

output_variation: bool (False by default). Decide to generate expression embedding or variation embedding.

Outputs

x_emb: expession embedding to show the clustering

v_emb: variation embedding to show the trajectory

Documentation

More tutorials are at https://featuremap.readthedocs.io/en/latest/index.html.

Citation

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).

License

The FeatureMAP package is under BSD-3-Clause license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

featuremap-learn-0.2.1.tar.gz (47.9 kB view details)

Uploaded Source

Built Distribution

featuremap_learn-0.2.1-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file featuremap-learn-0.2.1.tar.gz.

File metadata

  • Download URL: featuremap-learn-0.2.1.tar.gz
  • Upload date:
  • Size: 47.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.18

File hashes

Hashes for featuremap-learn-0.2.1.tar.gz
Algorithm Hash digest
SHA256 4ce6ed6d7c7f015bf2d5eb4a6e9d53655ae9ded74d16d3419e7c5a892bea6550
MD5 194b1660c3414cbd76e3da4c1636b7b9
BLAKE2b-256 e974a5233cd29a2b7a0c213d7d4559d3a48c483b709309990de9519f4f67445b

See more details on using hashes here.

File details

Details for the file featuremap_learn-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for featuremap_learn-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64c08c3c58a0eeee7687c334c6785d4b6a2594f87997623b94d325926fe07055
MD5 e3b0541f5202a397af4b5a219cd0c47b
BLAKE2b-256 b5f8b5b2fd616c693825c51208a09ff71f9fd1dbb4f9396d9e9eb343dce7f284

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page