Skip to main content

Reconstruction of flows from kymographs with optimal transport

Project description

optiflow

drawing

optiflow is an algorithm designed to reconstruct velocity fields from kymographs with optimal transport. Indeed, optimal transport computes the velocity field of minimal work, which is relevant under a wide array of situations and does not necessitates hard physical assumptions, except for the conservation of the physical quantity that we are measuring across time. This software is designed to offer cell biologists a simple method to obtain flow fields around a membrane contour (taking into account boundary conditions) for free, offering a quantitative measurement for a flow that can only be observed visually otherwise.


Example

drawing
pip install optiflow
from optiflow import define_matrices, compute_displacements_from_kymograph,plot_vector_field

## Load the kymograph
K = np.load("Kymograph_example.npy")
nt =  len(K)

#Define the distance matrices (we use circular boundary condition) and compute the displacements
C,D = define_matrices(npoints = nt,plot=True)
V = compute_displacements_from_kymograph(K,C,D)

#Visualize 
vmin = min(np.abs(V.min()),V.max())
plt.imshow(V.clip(-vmin,vmin),plt.cm.bwr,extent = (0,1,0,1))
plot_vector_field(V,t=7,pool_size = 25)

API and Documentation

The kymograph K

By convention, the kymograph K is a nb * nt matrix, where nb is the number of bins used to discretize the space, and nt is the number of time points.

  • define_matrices(npoints, plot=False) computes the distance and cost matrices according to the kymograph.
    • return C,D, where C is the cost matrix and D is the distance matrix

Computation of displacement fields from kymographs

  • compute_displacements_from_kymograph(K,C,D) compute the displacement field using optimal transport
    • return V, a nb * (nt-1) matrix of the velocity fields inferred.

optiflow was created by Sacha Ichbiah during his PhD in Turlier Lab, and originated from a collaboration with Henry de Belly, with the labs of Orion Weiner and Carlos Bustamante. It is maintained by Sacha Ichbiah and Hervé Turlier. For support, please open an issue. A preprint of the paper using this method is available on BiorXiv. The data used in the paper are available in this repo. If you use our library in your work please cite the paper :

@article {De Belly2022.09.07.507005,
	author = {De Belly, Henry and Yan, Shannon and Borja da Rocha, Hudson and Ichbiah, Sacha and Town, Jason P and Turlier, Herv{\'e} and Bustamante, Carlos J and Weiner, Orion D},
	title = {Actin-driven protrusions generate rapid long-range membrane tension propagation in cells},
	elocation-id = {2022.09.07.507005},
	year = {2022},
	doi = {10.1101/2022.09.07.507005},
	publisher = {Cold Spring Harbor Laboratory},
	abstract = {Membrane tension is thought to be a long-range integrator of cell physiology. This role necessitates effective tension transmission across the cell. However, the field remains strongly divided as to whether cell membranes support or resist tension propagation, in part due to a lack of adequate tools for locally manipulating membrane tension. We overcome these limitations by leveraging optogenetics to generate localized actin-based protrusions while concurrently monitoring the propagation of membrane tension using dual-trap optical tweezers. Surprisingly, actin-driven protrusions elicit rapid global membrane tension propagation with little to no attenuation, while forces applied to the cell membrane only do not. We present a simple unifying mechanical model in which mechanical forces that act on both the membrane and actin cortex drive rapid, robust membrane tension propagation.Competing Interest StatementThe authors have declared no competing interest.},
	URL = {https://www.biorxiv.org/content/early/2022/09/08/2022.09.07.507005},
	eprint = {https://www.biorxiv.org/content/early/2022/09/08/2022.09.07.507005.full.pdf},
	journal = {bioRxiv}}


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

optiflow-1.1.1.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

optiflow-1.1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file optiflow-1.1.1.tar.gz.

File metadata

  • Download URL: optiflow-1.1.1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for optiflow-1.1.1.tar.gz
Algorithm Hash digest
SHA256 be9c211626359ce5cee588554dd32bb826ed2fcb41b9a03cae482a5ee3e7f37b
MD5 9c5fdc8650df599fc9321e8d2d060716
BLAKE2b-256 fed520703a358a41866118ddb0867a8beeeda77e2dbef1f3e45be45eafb6c042

See more details on using hashes here.

File details

Details for the file optiflow-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: optiflow-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.3

File hashes

Hashes for optiflow-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 05137520c165812a796845001319719886c62e583ac4ef14b32285746295371f
MD5 6d3e1a8da8205f9301bbe2229afe5131
BLAKE2b-256 57ea37045554262257cf947b6be904fedda1d958811f2ce065681aeb80f0fbb8

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