Skip to main content

A plugin for the guanine crystal segmentation, classification and characterization in the zebrafish eye

Project description

guanine-crystal-analysis

License BSD-3 PyPI Python Version tests codecov napari hub

A plugin for guanine crystal segmentation and classification in the zebrafish eye. More precisely, it provides a workflow that measures on guanine crystal labels and sorts out overlaying partially segmented crystals during classification.

This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.

Usage

This plugin is suited for users who

  • want to derive size-, shape and intensity-based parameters from individual guanine crystals
  • struggle with partially segmented or overlapping crystals
  • want to investigate further the size and shape of these guanine crystals

This plugin is not suited for users who

  • are interested in further investigations of intensity of guanine crystals

You can find the plugin in napari under Pluginsguanine-crystal-analysis

Image Input

This plugin can be used on individual 2D slices of z-stacks as the workflow was developed on such input. Therefore, the quality of the result might differ on differing input, like crops or maximum projections.

1. Normalization

You can normalize the image selecting Normalization where you only need to specify your input image and click on the Run button.

Normalizing the image helps to adjust the intensity values and needs to be applied here because the object segmenter is only trained on normalized images.

2. Segmentation

When selecting Segmentation, you need to select the normalized image and a minimum pixel count of label images and click on the Run button again. This avoids having too small and unhelpful labels and is set by default to 50 pixels. For the training of the model, an APOC pixel classifier was used.

3. Analyze Image

Under Analyze Image, you can extract features from your image and label image by selecting them and clicking on the Run button.
The extracted features are a combination of the two libraries napari-skimage-regionprops and napari-simpleitk-image-processing. They can be devided into size-, shape-, and intensity-based parameters:

size shape intensity
area aspect ratio maximum intensity
perimeter mean intensity
major-axis-length minimum intensity
minor-axis-length median
circularity sum
solidity variance
eccentricity
roundness
perimeter-on-border
perimeter-on-border-ratio

You can find a glossary with an explanation of these features in this blog post Some of the guanine crystals are not correctly segmented because of overlay or interference patterns. This problem is addressed with the help of a classification step demonstrated next

4. Classify Objects

You can divide the crystal labels into predicted (blue) and discarded (brown) crystal labels using Classify Objects. There you can choose classifiers trained on intensity-, shape- and/or size-based parameters with the help of the checkboxes. For the training of the model, an APOC object classifier was used. It is recommended to later on not measure the parameters that the classifier was trained on, but other ones.

5. Bad Label Exclusion

Now, you can get rid of the discarded (brown) labels for further analysis using Bad Label Exclusion. Select the two label images of segmentation and classification result and press the Run button again. The result is a label image with only the predicted (blue) labels which are relabeled sequentially. If you want to derive measurements on these predicted labels, you can just use Analyze Image again.

"Analyze Deluxe"

You can also do all the explained steps in one click using the Analyze Deluxe function.

Installation

You can install guanine-crystal-analysis via pip:

pip install guanine-crystal-analysis

To install latest development version :

pip install git+https://github.com/biopo/guanine-crystal-analysis.git

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

Acknowledgements

This project was done in collaboration with the Rita Mateus Laboratory. The images shown in the documentation and in the demo jupyter notebooks were acquired there. This project was supported by the Deutsche Forschungsgemeinschaft under Germany’s Excellence Strategy – EXC2068 - Cluster of Excellence "Physics of Life" of TU Dresden. This project has been made possible in part by grant number 2021-240341 (Napari plugin accelerator grant) from the Chan Zuckerberg Initiative DAF, an advised fund of the Silicon Valley Community Foundation.

License

Distributed under the terms of the BSD-3 license, "guanine-crystal-analysis" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

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

guanine-crystal-analysis-0.0.2.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

guanine_crystal_analysis-0.0.2-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file guanine-crystal-analysis-0.0.2.tar.gz.

File metadata

File hashes

Hashes for guanine-crystal-analysis-0.0.2.tar.gz
Algorithm Hash digest
SHA256 105c0b6b0fc825476a94931a9992926cc17eb62518e343598eb0b12f7595d8e9
MD5 0ec70cb43d3fe9d251bf26f49a6c288c
BLAKE2b-256 67e6a5a3ea483603612327b98d9e8e0d6960b0db70b174b48dcd534e8fd3d2f4

See more details on using hashes here.

File details

Details for the file guanine_crystal_analysis-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for guanine_crystal_analysis-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 009911575a27416961ee992792afc62e9e3e0a46fd24e00262d8d2db424ed542
MD5 ee2ee38b9f6dbe59042e4f9bea8b687e
BLAKE2b-256 1ae0100f971c3fcc0c27ee4daedf45d607548ae9331c09f3d60175571d1e8603

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