PHATE
Project description
PHATE is a tool for visualizing high dimensional single-cell data with natural progressions or trajectories. PHATE uses a novel conceptual framework for learning and visualizing the manifold inherent to biological systems in which smooth transitions mark the progressions of cells from one state to another. To see how PHATE can be applied to single-cell RNA-seq datasets from hematopoietic stem cells, human embryonic stem cells, and bone marrow samples, check out our preprint on BioRxiv.
PHATE has been implemented in Python (2.7 and >=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 tree_data, tree_clusters = phate.tree.gen_dla() phate_operator = phate.PHATE(k=15, t=100) tree_phate = phate_operator.fit_transform(tree_data) phate.plot.scatter2d(phate_operator, c=tree_clusters) # or phate.plot.scatter2d(tree_phate, c=tree_clusters) phate.plot.rotate_scatter3d(phate_operator, 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file phate-0.2.10.tar.gz
.
File metadata
- Download URL: phate-0.2.10.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64098b028977dd6c54afbae70865d266395bfc1dc05c51b9219b47ebb2a4350b |
|
MD5 | 10e291461c622e89b77407602bc82093 |
|
BLAKE2b-256 | 66e6cb703ab1da0237997bc39f26b8d9498b267fe68bd7581b3e1b311efde98d |
File details
Details for the file phate-0.2.10-py3-none-any.whl
.
File metadata
- Download URL: phate-0.2.10-py3-none-any.whl
- Upload date:
- Size: 24.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7014c2dd036d2b56b4cf792f67e89944b954ab24f7259ae4cc8c48c773cbd600 |
|
MD5 | 2c0e0768dc3b346e521173539cf65300 |
|
BLAKE2b-256 | 8ac9505c0d57986162c33196842fe54605846821106685f5d9c05dcb3ad04a4d |