Giter Site home page Giter Site logo

cantinilab / ot-scomics Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 7.0 30.82 MB

This Python package will allow you to replicate the experiments from our research on applying Optimal Transport as a similarity metric in between single-cell omics data.

Home Page: https://ot-scomics.rtfd.io

License: GNU General Public License v3.0

Python 100.00%
biology single-cell optimal-transport gpu

ot-scomics's Introduction

PyPI version Documentation Status DOI

Optimal Transport improves cell-cell similarity inference in single-cell omics data

This Python package will allow you to replicate the experiments from our research on applying Optimal Transport as a similarity metric in between single-cell omics data.

image

Optimal Transport for single-cell omics

We propose the use of Optimal Transport (OT) as a cell-cell similarity metric for single-cell omics data. The code in this repository implements entropic-regularized OT distance computation with PyTorch, and applies it to public datasets of single-cell omics data. We compare the results to commonly used metrics like the euclidean distance or Pearson correlation, and demonstrate that OT increases performances in cell-cell similarity inference.

How many cells can I use?

Computing pairwise distance matrices is expensive (O(n²) operations for n cells), so we advise users of the package to limit the number of cells studied to a few thousand.

Installing the package

pip install otscomics

Documentation

https://ot-scomics.rtfd.io

Jupyter Notebook

The documentation includes a Jupyter Notebook demonstrating the package. While this notebook can be run un CPU, computations will be faster on GPU.

If you do not have access to a GPU you may want to use the (free) Google Colab platform to run this notebook: colab.research.google.com/github/ComputationalSystemsBiology/.../OT_scOmics.ipynb.

Please make sure that the GPU is enabled. Navigate to "Edit→Notebook Settings" and select "GPU" from the "Hardware Accelerator" drop-down.

Citing us

The paper describing OT-scOmics has been published on Bioinformatics.

Open Access link (Huizing, Peyré, Cantini, 2022)

@article{10.1093/bioinformatics/btac084,
	author = {Huizing, Geert-Jan and Peyré, Gabriel and Cantini, Laura},
	title = "{Optimal transport improves cell–cell similarity inference in single-cell omics data}",
	journal = {Bioinformatics},
	volume = {38},
	number = {8},
	pages = {2169-2177},
	year = {2022},
	month = {02},
	issn = {1367-4803},
	doi = {10.1093/bioinformatics/btac084},
	url = {https://doi.org/10.1093/bioinformatics/btac084},
	eprint = {https://academic.oup.com/bioinformatics/article-pdf/38/8/2169/43370259/btac084.pdf},
}

ot-scomics's People

Contributors

gjhuizing avatar lcan88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ot-scomics's Issues

Pip installable

Hi! We've been using your package as part of a benchmarking pipeline, however, when packaging our pipeline it is non-trivial to include a non-pip installable package like otscomics (currently we have a not so nice workaround so would be great to be able to just pip install otscomics).
The process is: 1) sign up to pip: https://pypi.org/account/register/, 2) in your OT-scOmics directory run: python setup.py sdist bdist_wheel, 3) check your built package (e.g. create a fresh env and try running your notebooks), 4) use twine (install via https://pypi.org/project/twine/) to check the package: twine check dist/* finally, 5) upload to pip: twine upload dist/*. Perhaps a thought would be to provide two builds (with and without cuda enabled) to make it accessible to different envs. Let me know if you have issues and please let me know when it becomes available, cheers!

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.