Skip to main content

Optimal transport for time-course single cell data

Project description

WOT: Waddington-OT

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

Waddington-OT depends on Python 3.

Dependencies

You can install dependencies for wot with conda :

conda install numpy pandas h5py cython scikit-learn scipy matplotlib
conda install -c conda-forge pot

Install the wot package

pip install --user wot

Usage

Initializing an OT Model

wot uses an OTModel as its interface for computing transport maps.

You can initialize an OT Model in python with :

ot_model = wot.ot.initialize_ot_model('matrix.txt', 'days.txt')

All Optimal Transport parameters can be customized when initializing the model. For instance, you could explicitely specify the defaults :

ot_model = wot.ot.initialize_ot_model('matrix.txt', 'days.txt', tmap_prefix='tmaps',
    epsilon=.05, lambda1=10, lambda2=50, batch_size=50, tolerance=1e-2)

You can compute all transport maps with :

ot_model.compute_all_transport_maps()

Loading Transport Maps

Once the transport maps have been created, you can operate on the transport maps using the TransportMapModel interface :

tmap_model = wot.tmap.TransportMapModel.from_directory('.')

All previously computed transport maps will be available.

Changing parameters

If you want to keep the previously computed transport maps, simply initialize a new model with a different prefix. Any model will only affect files that use its tmap_prefix, there is no interaction between models with different prefixes.

Using wot.commands

All data-processing functions are located in the wot.commands subpackage. These include :

  • ancestor census
  • gene set scores
  • gene regulatory networks (grn)
  • local enrichment
  • optimal transport validation
  • trajectory
  • trajectory trends
  • convert matrix
  • force layout
  • wot server (interactive version of wot)

All of these are documented on wot's github pages website, with examples using simulated data to show how to use and plot the results of these commands.

Documentation

The full documentation for wot is available on Github Pages : http://broadinstitute.github.io/wot

For more advanced usage, you may also browse the source code to read each function's documentation. Most of wot's internal functions have docstrings with a description of their parameters, output and examples on how to use them.

Developer Notes

For more information about the internal functionning of wot, please refer to the Developer Notes

Project details


Download files

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

Source Distribution

wot-0.5.4.tar.gz (8.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wot-0.5.4-py2.py3-none-any.whl (8.4 MB view details)

Uploaded Python 2Python 3

File details

Details for the file wot-0.5.4.tar.gz.

File metadata

  • Download URL: wot-0.5.4.tar.gz
  • Upload date:
  • Size: 8.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for wot-0.5.4.tar.gz
Algorithm Hash digest
SHA256 2aa2c87066becb550ad747b601189e2baebca4d7636fb6fbdaca0f540f0c50ba
MD5 47753e6ea2eb25bee98d9e3f2e7f8005
BLAKE2b-256 004e8ad95394fa0685b3cf76d54e46602aceaf7954b2def26af747fcbe79110f

See more details on using hashes here.

File details

Details for the file wot-0.5.4-py2.py3-none-any.whl.

File metadata

  • Download URL: wot-0.5.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.4 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for wot-0.5.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 67f3aefe0278fd6378d0b21c3f90e103fa6f93b8602d9f6d312c21185be98e50
MD5 cf522062177ab5524b990da17490f46c
BLAKE2b-256 3612fb245268687f063281c7ee15beea440f64eeba3c7149ad8fa3e50e426094

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page