Skip to main content

PHATE - Potential of Heat-diffusion for Affinity-based Trajectory Embedding

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

Metadata

Release files for phate 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for phate 1.0.3
File Size Uploaded Provenance Actions
phate-1.0.3.tar.gz 20.9 kB Without provenance Details for phate-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for phate 1.0.3
File Interpreter ABI Platform Actions
phate-1.0.3-py3-none-any.whl Python 3 none any Details for phate-1.0.3-py3-none-any.whl

Total release size: 44.0 kB

Release files / phate-1.0.3.tar.gz

Download URL phate-1.0.3.tar.gz
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1df2be86665610bfc234c5847a86d5c79f6814596f27ce234b3055775e9cdfbe
BLAKE2b-256 checksum
How to use checksums
31879229638807474d77c4fee8aae43807ae84ec46ef723c5efcb734682f3155
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

Release files / phate-1.0.3-py3-none-any.whl

Download URL phate-1.0.3-py3-none-any.whl
Size 23.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24b0de85538eab4bdb863ebe2f641c3f2e9abbc49809d8d1b7a66a225db820e2
BLAKE2b-256 checksum
How to use checksums
53f4886ba99f02a575f799db74e957df93da01e1352ef35e1a4484143a1c064f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7

Security for phate 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page