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)
- Install
- Prepare Gene Expression Matrix
- Optimal Transport
- Visualization
- Optimal Transport Trajectory
- Optimal Transport Transition Table
- Optimal Transport Validation
- Gene Set Scores
- File Formats
Python 3 is required.
Optionally install dependencies using conda:
conda install cython h5py flask gunicorn numexpr numpy pandas scikit-learn scipy simplejson psutil
conda install -c conda-forge pot
Install WOT:
pip install wot
Apply a pre-processing workflow to normalize and scale your data, and detect variable genes. Suggested tools include Seurat or Scanpy.
WOT tools are run using the syntax wot tool. To see all tool options, type wot tool -h (e.g. wot optimal_transport -h)
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 |
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.
Trajectory Trends plots the expression of a gene over time based on the transport maps
wot trajectory generate ancestors and descendants given a starting cell cet and transport maps. Options
Flag | Description |
---|---|
tmap | Directory of transport maps as produced by optimal_transport |
cell_set | Assigns cells to cell sets |
cell_days | Assigns days to cells |
wot transition_table generate a transition table from one cell set to another cell set. Options
Flag | Description |
---|---|
tmap | Directory of transport maps as produced by optimal_transport |
cell_set | Assigns cells to cell sets |
cell_days | Assigns days to cells |
start_time | The start time for the cell sets to compute the transitions to cell sets at end_time |
end_time | The end time. |
wot gene_set_scores computes gene set scores for each cell given a gene expression matrix and gene sets.
Options
Flag | Description |
---|---|
matrix | Normalized gene expression matrix to compute gene set scores (e.g. apoptosis and cell cycle scores) for each cell. |
Cells on rows and genes (features) on columns. Accepted formats are Market Exchange Format (MEX), HDF5 Gene-Barcode Matrix, loom, h5ad, and text
Example Text File:
id | gene_1 | gene_2 | gene_3 |
cell_1 | 1.2 | 12.2 | 5.4 |
cell_2 | 2.3 | 4.1 | 5.0 |
Two column file with header "id" and "day".
Example:
id | day |
cell_1 | 1 |
cell_2 | 2.5 |
Two column file without header with pairs of days to compute transport maps for.
Example:
0 | 2 |
2 | 4 |
4 | 6 |