Skip to main content

A generalization of t-SNE and UMAP to single-cell multimodal omics

Project description

Emerging single-cell technologies profile multiple types of molecules within individual cells. A fundamental step in the analysis of the produced high-dimensional data is their visualization using dimensionality reduction techniques such as t-SNE and UMAP. We introduce j-SNE and j-UMAP as their natural generalizations to the joint visualization of multimodal omics data. Our approach automatically learns the relative contribution of each modality to a concise representation of cellular identity that promotes discriminative features but suppresses noise. On eight datasets, j-SNE and j-UMAP produce unified embeddings that better agree with known cell types and that harmonize RNA and protein velocity landscapes. j-SNE and j-UMAP are available in the JVis Python package.

The details for the underlying mathematics can be found in https://genomebiology.biomedcentral.com/articles/10.1186/s13059-021-02356-5.

Van Hoan Do and Stefan Canzar. A generalization of t-SNE and UMAP to single-cell multimodal omics. Genome Biology. 2021;22(1):130. doi:10.1186/s13059-021-02356-5

Installing

Requirements:

  • Python 3.6 or greater

  • numpy

  • scipy

  • scikit-learn >= 0.23.0

  • numba

Install Options

PyPI install, presuming you have numba and sklearn and all its requirements (numpy and scipy) installed:

pip install Jvis-learn

If you have a problem with pip installation then we’d suggest installing the dependencies manually using anaconda followed by pulling umap from pip:

conda install numpy scipy
conda install scikit-learn==0.24.1
conda install numba
pip install Jvis-learn

How to use Jvis

The Jvis package inherits from sklearn TSNE, and UMAP. Therefore, all parameters of tSNE and UMAP are naturally extended for Jvis.

An example of making use of these options:

from Jvis import JUMAP, JTSNE
import numpy as np

# Create a toy example from a random distribution (n_cells = 500)
rna_rand = np.random.rand(500, 100)
adt_rand = np.random.rand(500, 15)
data = {'rna': rna_rand, 'adt': adt_rand} # create a dictionary of modalities.

# Run joint TSNE of the two "random" modalities.
embedding_jtsne = JTSNE(n_components=2).fit_transform(data)

# Run joint UMAP of the two "random" modalities.
embedding_jumap = JUMAP(n_neighbors=20,
                        min_dist=0.3,
                        metric='correlation').fit_transform(data)

For more realistic examples and Python scripts to reproduce the results in our paper are available at GitHub: https://github.com/canzarlab/JVis_paper

Tunning parameters of t-SNE and UMAP can be found here: https://scikit-learn.org/stable/modules/generated/sklearn.manifold.TSNE.html

https://umap-learn.readthedocs.io/en/latest/api.html

License

The JVis package is 3-clause BSD licensed.

Jvis package is inherited from scikit-learn and UMAP package under 3-clause BSD license.

This code was tested on Python 3.6, 3.7; scikit-learn version 0.24.1; numpy version 1.19.2; scipy version 1.5.3; numba version 0.52.0

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

Jvis-learn-0.0.12.tar.gz (263.4 kB view details)

Uploaded Source

Built Distribution

Jvis_learn-0.0.12-py3-none-any.whl (84.0 kB view details)

Uploaded Python 3

File details

Details for the file Jvis-learn-0.0.12.tar.gz.

File metadata

  • Download URL: Jvis-learn-0.0.12.tar.gz
  • Upload date:
  • Size: 263.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for Jvis-learn-0.0.12.tar.gz
Algorithm Hash digest
SHA256 d856c59724c8472684f15530158baf627bc2cb450dd70e0cb079373c31ff15c1
MD5 3c3e729466401d04ed92a4cc10e82a62
BLAKE2b-256 26f447e6c23a714f14888d84cb1264a38c97e114ca2b43b0cf064312a18101db

See more details on using hashes here.

File details

Details for the file Jvis_learn-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: Jvis_learn-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 84.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1.post20200622 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.3

File hashes

Hashes for Jvis_learn-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 610a21de40a687b0d5bd8d53b8048038998b90553baa2ec02231511eb66c0d27
MD5 26af2e2203b9d7d3e0b1d0ea95157f31
BLAKE2b-256 b680f01f10165e11d33b9cf6952c691d6b33249629053f60b3ef84ef3d25e1d9

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