featuremap-learn


Namefeaturemap-learn JSON
Version 1.0.3 PyPI version JSON
download
home_pagehttps://github.com/YYT1002/FeatureMAP
SummaryFeatureMAP
upload_time2024-06-04 06:39:17
maintainerYang Yang
docs_urlNone
authorNone
requires_pythonNone
licenseGPL
keywords dimensionality reduction manifold learning tangent space embedding
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![FeatureMAP Illustration](./figures/featureMAP.png)

# 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](https://github.com/Murali-group/Beeline)) with a bifurcation model. Compared with UMAP, FeatureMAP-GEX better preserves density, and FeatureMAP-GVA shows trajectories.
![Bifurcation Embedding](./figures/bifurcation_embedding.png)

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](./figures/gene_contribution.png)

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](./figures/gene_variation_trajectory.png)
    [View 3D Plot](https://YYT1002.github.io/FeatureMAP/figures/3d_plot.html)
   
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](./figures/core_trans_states.png)
   

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:

```bash
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.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/YYT1002/FeatureMAP",
    "name": "featuremap-learn",
    "maintainer": "Yang Yang",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "yangyangnwpu@gmail.com",
    "keywords": "dimensionality reduction, manifold learning, tangent space embedding",
    "author": null,
    "author_email": "Yang Yang <yangyangnwpu@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/97/81/e301c8a13694d91bf4175b50df8a639a80dfbf35ea049b23d56b4b366765/featuremap-learn-1.0.3.tar.gz",
    "platform": null,
    "description": "![FeatureMAP Illustration](./figures/featureMAP.png)\n\n# FeatureMAP: Feature-preserving Manifold Approximation and Projection\n\nVisualizing 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.\n\n## Description\n\nFeatureMAP introduces a novel approach by enhancing manifold learning with pairwise tangent space embedding, aiming to retain crucial aspects of cellular data.\nWe introduce two visualization plots by FeatureMAP: expression (GEX) and variation (GVA) embedding.\nHere is an example over one synthetic dataset ([BEELINE](https://github.com/Murali-group/Beeline)) with a bifurcation model. Compared with UMAP, FeatureMAP-GEX better preserves density, and FeatureMAP-GVA shows trajectories.\n![Bifurcation Embedding](./figures/bifurcation_embedding.png)\n\nBesides the two-dimensional visualization, FeatureMAP presents three core concepts:\n\n1. **Gene Contribution**: Estimating and projecting gene feature loadings. The arrow represents the direction and magnitude of one gene's change. \n    ![Gene Contribution](./figures/gene_contribution.png)\n\n2. **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.\n    ![Gene Variation Trajectory](./figures/gene_variation_trajectory.png)\n    [View 3D Plot](https://YYT1002.github.io/FeatureMAP/figures/3d_plot.html)\n   \n3. **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.\n    ![Core and Transition States](./figures/core_trans_states.png)\n   \n\nThese 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.\n\n\n## Getting Started\n\n### Dependencies\n\n- Python 3.8 or higher\n- Required Python libraries: numpy, scipy, matplotlib, umap-learn, scikit-learn\n- Operating System: Any (Windows, macOS, Linux)\n\n### Installation\n\n### 1. Install directly using pip:\n\n```bash\npip install featuremap-learn\n```\n\n### 2. Installation via Conda\nFor users who prefer using Conda, especially for managing complex dependencies and environments in scientific computing.\n```\nconda install ???\n```\n\n## How to use FeatureMAP\n\n### Data Visualization\nFor data visualization, FeatureMAP introduces expression embedding and variation embedding. Here is one example by MNIST datasets.\n```\nimport featuremap\nfrom sklearn.datasets import fetch_openml\nfrom sklearn.utils import resample\n\ndigits = fetch_openml(name='mnist_784')\nsubsample, subsample_labels = resample(digits.data, digits.target, n_samples=7000, stratify=digits.target, random_state=1)\n\nx_emb = featuremap.featureMAP().fit_transform(subsample)\nv_emb = featuremap.featureMAP(output_variation=True).fit_transform(subsample)\n\n```\n\n#### Parameters:\noutput_variation: bool (False by default). Decide to generate expression embedding or variation embedding. \n\n#### Outputs\nx_emb: expession embedding to show the clustering\n\nv_emb: variation embedding to show the trajectory\n\n\n## Documentation\nMore tutorials are at https://featuremap.readthedocs.io/en/latest/index.html.\n\n## Citation\nOur FeatureMAP alogrithm is based on the paper\n\nYang, Yang, et al. \"Interpretable Dimensionality Reduction by Feature Preserving Manifold Approximation and Projection.\" arXiv preprint arXiv:2211.09321 (2022).\n\n## License\nThe FeatureMAP package is under BSD-3-Clause license.\n\n",
    "bugtrack_url": null,
    "license": "GPL",
    "summary": "FeatureMAP",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/YYT1002/FeatureMAP"
    },
    "split_keywords": [
        "dimensionality reduction",
        " manifold learning",
        " tangent space embedding"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7c38ca99abcc351e70ae6f95ae52f7431d9b3c012852de55b73906fbe45c523",
                "md5": "cc90fe1648548467038b7f8e4ff5d098",
                "sha256": "93d6f6b7dd11a202758762b7edc110ef2b57832387cf7a5962022650da711d79"
            },
            "downloads": -1,
            "filename": "featuremap_learn-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cc90fe1648548467038b7f8e4ff5d098",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 47536,
            "upload_time": "2024-06-04T06:39:13",
            "upload_time_iso_8601": "2024-06-04T06:39:13.867804Z",
            "url": "https://files.pythonhosted.org/packages/e7/c3/8ca99abcc351e70ae6f95ae52f7431d9b3c012852de55b73906fbe45c523/featuremap_learn-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9781e301c8a13694d91bf4175b50df8a639a80dfbf35ea049b23d56b4b366765",
                "md5": "0010134be66c529c7bc3575ea65e3afd",
                "sha256": "4673b248615049ad9065c3373e7061c04e067e002e29a65c41cbdf270e995961"
            },
            "downloads": -1,
            "filename": "featuremap-learn-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0010134be66c529c7bc3575ea65e3afd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 48073,
            "upload_time": "2024-06-04T06:39:17",
            "upload_time_iso_8601": "2024-06-04T06:39:17.102635Z",
            "url": "https://files.pythonhosted.org/packages/97/81/e301c8a13694d91bf4175b50df8a639a80dfbf35ea049b23d56b4b366765/featuremap-learn-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-04 06:39:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "YYT1002",
    "github_project": "FeatureMAP",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "featuremap-learn"
}
        
Elapsed time: 0.30545s