Skip to main content

Morphodynamics alt text

License PyPI Python Version tests

This software can be used to analyze the dynamics of single-cells imaged by time-lapse fluorescence microscopy. The dynamics of morphology and fluorescence intensity distribution can be jointly analyzed through the segmentation and splitting of cells into a set of smaller regions (windows) that can be represented as two-dimensional grids to facilitate interpretation of events.

This software has been developed at Bern University by Cédric Vonesch (Science IT Support and Pertz lab) and Guillaume Witz (Microscopy Imaging Center and Science IT Support) with the collaboration of Jakobus van Unen (Pertz lab).

For a complete documentation see the Morphodynamics website.

Install the package

You can simply install the package using

pip install morphodynamics

To use the napari interface, you will have in addition to install the napari-morphodynamics plugin:

pip install git+https://github.com/guiwitz/napari-morphodynamics.git

Notes

Versions

The Morphodynamics package had undergone a massive change between version 0.2.4 and 0.3.0, in particular with a new interface in napari and a more customized way of generating post-processing plots. If you want to install the old 0.2.x series version, please use:

pip install git+https://github.com/guiwitz/morphodynamics.git@v0.2.4

nd2

The default nd2reader sometimes fails to read files containing non-rectanuglar rois. In such cases, you can try to install instead a customized version of the reader:

pip install git+https://github.com/guiwitz/nd2reader.git@master#egg=nd2reader

Package usage

This package can be used entirely programmatically to process data via its API. Examples for this can be found in the docs here and here.

napari-morphodynamics plugin

The napari-morphodynamics plugin offers an interface to import, visualize and process data. A detailed description for its usage can be found in the docs. To install the plugin you can use:

pip pip install git+https://github.com/guiwitz/napari-morphodynamics.git

Notebooks

In addition, the analysis can be run in the interactive notebook Morpho_segmentation.ipynb. This can be useful when e.g. working remotely on a cluster.

Post-processing

Once the images have been processed the output results can be used to plot various features of the experiment such as cell shape evolution, edge displacement, per window signal evolution etc. Examples on how to create such plots are given in the Postprocessing.ipynb notebook.

Environment

To ensure that you have all recommended packages to perform interactive work, we recommend to create en environment with conda. If you don't have conda installed yet, follow these instructions to install a minimal version called miniconda.

To create the appropriate environment that will for example also contain the optional dependency cellpose for cell segmentation, save the following environment.yml file to your computer (use Save as in your browser) and execute the following command from where you downloaded it:

conda env create -f environment.yml

Then activate the environment:

conda activate morphodynamics

The Morphodynamics package is automatically installed in that environment.

Updates

To update your local installation with the latest version available on GitHub, activate the environment and install the package directly from GitHub:

conda activate morphodynamics 
pip install --upgrade git+https://github.com/guiwitz/MorphoDynamics.git

Note: close all notebooks (click on File | Close and Halt) prior to the update and reopen them afterwards.

Usage

Whenever you want to use Jupyter and the Morphodynamics package, open a terminal, activate the environment

conda activate morphodynamics

and start a Jupyter session:

jupyter notebook

Development

Versioning is done automatically via setuptools_scm. To increment a version, create a new tag and push it to GitHub:

git tag -m "git versioning" -a X.Y.Z
git push origin X.Y.Z

Metadata

Release files for morphodynamics 0.4.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 morphodynamics 0.4.1
File Size Uploaded
morphodynamics-0.4.1.tar.gz 6.4 MB Details

Built distribution (wheel)

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

Total release size: 6.5 MB

Release files / morphodynamics-0.4.1.tar.gz

Download URL morphodynamics-0.4.1.tar.gz
Size 6.4 MB
Tags Source
SHA-256 checksum
How to use checksums
f408a4bad48e39b28d3bc2bf23b5f4a8006e2720da14fa1c3c90dc5d91cb9e7f
BLAKE2b-256 checksum
How to use checksums
1da46e2ef043b35982eadceecab6a45b0f56454dd316014f19209ada29283c51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / morphodynamics-0.4.1-py3-none-any.whl

Download URL morphodynamics-0.4.1-py3-none-any.whl
Size 50.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
772826a1034e172402c9a36240938fd41d24d3c3eeb5b80d0671686ac14351dc
BLAKE2b-256 checksum
How to use checksums
40d45c81cdaf6c45f35ad8c2e1289a4e56ec1fa6d78e0bab54b35165be0e7491
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.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