faro1219 / wot

Optimal transport for time-course single cell data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

Install

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

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

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.

File Formats

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:

idgene_1gene_2gene_3
cell_11.212.25.4
cell_22.34.15.0

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

Example:

idday
cell_11
cell_22.5

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

Example:

02
24
46

Cell sets can be provided in gmt or gmx.

About

Optimal transport for time-course single cell data

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 78.4%Language:JavaScript 13.5%Language:HTML 2.4%Language:Makefile 2.3%Language:Batchfile 2.2%Language:Java 1.0%Language:Dockerfile 0.2%Language:Shell 0.0%