This library runs code associated with the TrajectoryNet paper.
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
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:
- An embedding matrix titled
[embedding_name]
(Cells x Dimensions) - A sample labels array titled
sample_labels
(Cells) - (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.
[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}
}