Skip to main content

PHATE

Project description

Latest PyPi version Latest Conda version Latest CRAN version Travis CI Build Read the Docs Nature Biotechnology Publication Twitter GitHub stars

PHATE (Potential of Heat-diffusion for Affinity-based Trajectory Embedding) is a tool for visualizing high dimensional data. PHATE uses a novel conceptual framework for learning and visualizing the manifold to preserve both local and global distances.

To see how PHATE can be applied to datasets such as facial images and single-cell data from human embryonic stem cells, check out our Nature Biotechnology publication.

Moon, van Dijk, Wang, Gigante et al. **Visualizing Transitions and Structure for Biological Data Exploration**. 2019. *Nature Biotechnology*.

PHATE has been implemented in Python >=3.5, R and MATLAB.

Python installation and dependencies

Installation with pip

The Python version of PHATE can be installed using:

pip install --user phate

Installation from source

The Python version of PHATE can be installed from GitHub by running the following from a terminal:

git clone --recursive git://github.com/KrishnaswamyLab/PHATE.git
cd Python
python setup.py install --user

Quick Start

If you have loaded a data matrix data in Python (cells on rows, genes on columns) you can run PHATE as follows:

import phate
phate_op = phate.PHATE()
data_phate = phate_op.fit_transform(data)

PHATE accepts the following data types: numpy.array, scipy.spmatrix, pandas.DataFrame and anndata.AnnData.

Usage

PHATE has been implemented with an API that should be familiar to those with experience using scikit-learn. The core of the PHATE package is the PHATE class which is a subclass of sklearn.base.BaseEstimator. To get started, import phate and instantiate a phate.PHATE() object. Just like most sklearn estimators, PHATE() objects have both fit() and fit_transform() methods. For more information, check out our notebook below.

If you want to try running our test script on a DLA fractal tree, run the following in a Python interpreter:

import phate
import scprep
tree_data, tree_clusters = phate.tree.gen_dla()
phate_operator = phate.PHATE(k=15, t=100)
tree_phate = phate_operator.fit_transform(tree_data)
scprep.plot.scatter2d(tree_phate, c=tree_clusters)
phate_operator.set_params(n_components=3)
tree_phate = phate_operator.transform()
scprep.plot.rotate_scatter3d(tree_phate, c=tree_clusters)

Jupyter Notebooks

A demo on PHATE usage and visualization for single cell RNA-seq data can be found in this Jupyter notebook. A second tutorial is available here which works with the artificial tree shown above in more detail. You can also access interactive versions of these tutorials on Google Colaboratory: single cell RNA seq, artificial tree.

Help

If you have any questions or require assistance using PHATE, please contact us at https://krishnaswamylab.org/get-help

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

phate-1.0.2.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

phate-1.0.2-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file phate-1.0.2.tar.gz.

File metadata

  • Download URL: phate-1.0.2.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.7

File hashes

Hashes for phate-1.0.2.tar.gz
Algorithm Hash digest
SHA256 91f288e941e27573f14638d9da6cc593d059df6c935e3a5005d6a48d2d3ce262
MD5 84ff249cba524c19f897e22ea91898c0
BLAKE2b-256 57999e9c1792ee1a0f33be293d214da02f26696495f8c063a530398e7c392d03

See more details on using hashes here.

File details

Details for the file phate-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: phate-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.6.7

File hashes

Hashes for phate-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cee3a8b2c081bddc3e60fee296257513fb8c8b145b59dbff76f73d578a8a393a
MD5 3dbbecbaad32980ea5ec7f25c11593e5
BLAKE2b-256 4a0c2f2850b6afd5ba9b58020b15c0fb0daf903fc9c8dc7653eab16ad2683bd5

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