Skip to main content

Optimal transport for time-course single cell data

Project description

WOT: Waddington-OT

Uses time-course data to infer how the probability distribution of cells in gene-expression space evolves over time, by using the mathematical approach of Optimal Transport (OT)


Python 3 is required.

pip install wot

Prepare Expression Matrix

Apply a pre-processing workflow to normalize and scale your data, and detect variable genes. Suggested tools include Seurat or Scanpy.

WOT Tools

WOT tools are run using the syntax wot tool. To see all tool options, type wot tool -h (e.g. wot optimal_transport -h)

Optimal Transport

wot optimal_transport calculates transport maps between consecutive time points and automatically learns cellular growth and death rates.

Common Options (required in bold)

Flag Description
matrix Normalized gene expression matrix.
cell_days Assigns days to cells
gene_set_scores Apoptosis and cell cycle scores used to compute growth rates. If not specified, a constant growth rate is used. The wot tool gene_set_scores can be used to compute gene set scores.
local_pca Use principal component analysis to reduce the dimensionality of the expression matrix locally in the space of consecutive days. Thirty components are used by default.
day_pairs Pairs of days to compute transport maps for
gene_filter File with one gene id per line to use for computing cost matrices (e.g. variable genes)
out Base name for output files

Optimal Transport Validation

wot optimal_transport_validation tests the performance of optimal transport by comparing interpolated distributions to held-out time points.

optimal_transport_validation has the same options as optimal_transport and

Flag Description
t_interpolate Interpolation fraction between two time points
covariate Two column file with headers "id" and "covariate" indicating cell ids and covariate value


wot force_layout generates a force-directed layout using the ForceAtlas2 algorithm. The tool can optionally perform dimensionality reduction using diffusion component embedding of the dataset. After you have generated the force layout coordinates, you can use wot wot_server to view trajectories and gene expression in the force layout.

Transition Table

wot transition_table generate a transition table from one cell set to another cell set. Options

Flag Description
dir Directory of transport maps as produced by optimal_transport
cell_set One or more gmt or gmx files containing cell sets. Each set id should end with _time (e.g. my_set_9).
start_time The start time for the cell sets to compute the transitions to cell sets at end_time
end_time The end time.

Gene Set Scores

wot gene_set_scores computes gene set scores for each cell given a gene expression matrix and gene sets.


Flag Description
matrix Normalized gene expression matrix to compute gene set scores (e.g. apoptosis and cell cycle scores) for each cell.

File Formats

Gene Expression matrix

Cells on rows and genes (features) on columns. Accepted formats are Market Exchange Format (MEX), HDF5 Gene-Barcode Matrix, Loom, and text

Example Text File:


Cell Days

Two column file with header "id" and "day".



Days Pairs

Two column file without header with pairs of days to compute transport maps for.



Cell Sets

Cell sets can be provided in gmt or gmx. Each set id should end with _day to indicate the day on which the cell set was created (e.g. my_set_9).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
wot-0.1.3-py2.py3-none-any.whl (62.8 MB) Copy SHA256 hash SHA256 Wheel py2.py3 Jun 14, 2018
wot-0.1.3.tar.gz (62.7 MB) Copy SHA256 hash SHA256 Source None Jun 14, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page