Skip to content

Latest commit

 

History

History
100 lines (71 loc) · 2.99 KB

README.rst

File metadata and controls

100 lines (71 loc) · 2.99 KB

DEMaP

Nature Biotechnology Publication

Twitter

GitHub stars

Denoised Embedding Manifold Preservation (DEMaP) is a metric for measuring the quality of dimensionality reduction for visualization.

DEMaP Performance Schematic

Install

Install DEMaP with pip:

pip install git+https://github.com/scottgigante/DEMaP

To install with all optional dependencies:

git clone https://github.com/scottgigante/DEMaP
cd DEMaP
pip install .[scripts]

To run the Splatter simulation, you will need to have R >=3.4 and the Python package rpy2 installed. (Note: if running R 3.4, you will need to install Splatter 1.8 from Bioconductor 3.9: see https://www.bioconductor.org/install/#Legacy for details.)

Run

If you have installed R and rpy2, you can run DEMaP on Splatter as follows:

# generate data
import demap
import scprep
scprep.run.install_bioconductor("splatter")
data_true = demap.splatter.paths(bcv=0, dropout=0, seed=42)
data_noisy = demap.splatter.paths(bcv=0.2, dropout=0.5, seed=42)

# run demap
embedding_phate = demap.embed.PHATE(data_noisy)
demap_phate = demap.DEMaP(data_true, embedding_phate)
embedding_tsne = demap.embed.TSNE(data_noisy)
demap_tsne = demap.DEMaP(data_true, embedding_tsne)
demap_phate, demap_tsne

Reproduce

Scripts to reproduce results in the PHATE paper are provided. Either run in series:

# setup
git clone https://github.com/scottgigante/DEMaP
cd DEMaP
pip install .[scripts]
cd scripts

# this takes a LONG time
mkdir ../results
python scripts/run_demap_splatter.py

# summarize the results
mkdir ../output
python scripts/plot_demap_splatter.py
python scripts/summarize_demap_splatter.py

or run in parallel (e.g. on a HPC cluster):

for i in {0..399}; do
    python run_demap_splatter.py $i &
done

Results

Below are the results from our Nature Biotechnology publication.

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

Detailed results

Contributing

If you wish to add your method to the comparison or improve the way we run a method, please submit a pull request.