Code Monkey home page Code Monkey logo

trajectorynet's Introduction

Pytorch Implementation of TrajectoryNet

This library runs code associated with the TrajectoryNet paper.

Installation

Download code

git clone http://github.com/KrishnaswamyLab/TrajectoryNet.git

Install required packages

pip install -r requirements.txt

This code was tested with python 3.8

Example

EB PHATE Scatterplot Trajectory of density over time

Basic Usage

Run with

python main.py --dataset EB

To use a custom dataset expose the coordinates and timepoint information according to the example jupyter notebooks in the /notebooks/ folder.

TrajectoryNet requires the following:

  1. An embedding matrix titled [embedding_name] (Cells x Dimensions)
  2. A sample labels array titled sample_labels (Cells)
  3. (Optionally) a delta embedding representing RNA velocity titled delta_[embedding_name] (Cells x Dimensions)

To run TrajectoryNet with a custom dataset use:

python main.py --dataset [PATH_TO_NPZ_FILE] --embedding_name [EMBEDDING_NAME]

See notebooks/EB-Eval.ipynb for an example on how to use TrajectoryNet on a PCA embedding to get trajectories in the gene space.

References

[1] Tong, A., Huang, J., Wolf, G., van Dijk, D., and Krishnaswamy, S. TrajectoryNet: A Dynamic Optimal Transport Network for Modeling Cellular Dynamics. In International Conference on Machine Learning, 2020. [arxiv] [ICML]


If you found this library useful, please consider citing

@inproceedings{tong2020trajectorynet,
  title = {TrajectoryNet: A Dynamic Optimal Transport Network for Modeling Cellular Dynamics},
  shorttitle = {{{TrajectoryNet}}},
  booktitle = {Proceedings of the 37th International Conference on Machine Learning},
  author = {Tong, Alexander and Huang, Jessie and Wolf, Guy and {van Dijk}, David and Krishnaswamy, Smita},
  year = {2020}
}

trajectorynet's People

Contributors

atong01 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.