Skip to main content

Cell segmentation and windowing

Project description

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

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

morphodynamics-0.3.0rc4.tar.gz (6.3 MB view details)

Uploaded Source

Built Distribution

morphodynamics-0.3.0rc4-py3-none-any.whl (46.8 kB view details)

Uploaded Python 3

File details

Details for the file morphodynamics-0.3.0rc4.tar.gz.

File metadata

  • Download URL: morphodynamics-0.3.0rc4.tar.gz
  • Upload date:
  • Size: 6.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for morphodynamics-0.3.0rc4.tar.gz
Algorithm Hash digest
SHA256 d579140338edd0073b09a91c434d28cc3de06daad85c3dcaed32502244c0447a
MD5 f52772385c3217f3a9ff3edee45ae483
BLAKE2b-256 d2f46d7e6d8cc12e2ed891498e150f2b666f3707dfceb8c8038a15873f7527d3

See more details on using hashes here.

File details

Details for the file morphodynamics-0.3.0rc4-py3-none-any.whl.

File metadata

  • Download URL: morphodynamics-0.3.0rc4-py3-none-any.whl
  • Upload date:
  • Size: 46.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for morphodynamics-0.3.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 9b8d1474661b3666329911cead6bfa540bd371cea5df410a1477cadc39c87ee8
MD5 aac4b26cf11075f876282dc462f33259
BLAKE2b-256 a62186d191e032582d5a9cd160f4b881890fe73a0e695db59e41acaaeb473f89

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page