Skip to main content

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}}


Metadata

Release files for optiflow 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optiflow 1.1.1
File Size Uploaded
optiflow-1.1.1.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for optiflow 1.1.1
File Interpreter ABI Platform
optiflow-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.9 kB

Release files / optiflow-1.1.1.tar.gz

Download URL optiflow-1.1.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be9c211626359ce5cee588554dd32bb826ed2fcb41b9a03cae482a5ee3e7f37b
BLAKE2b-256 checksum
How to use checksums
fed520703a358a41866118ddb0867a8beeeda77e2dbef1f3e45be45eafb6c042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Release files / optiflow-1.1.1-py3-none-any.whl

Download URL optiflow-1.1.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05137520c165812a796845001319719886c62e583ac4ef14b32285746295371f
BLAKE2b-256 checksum
How to use checksums
57ea37045554262257cf947b6be904fedda1d958811f2ce065681aeb80f0fbb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page