A repository to process organoid images
Project description
:herb: Tapenade : Thorough Analysis PiEliNe for Advanced DEep imaging
A fully-visual pipeline for quantitative analysis of 3D organoid images acquired with deep imaging microscopy.
If you use this plugin for your research, please cite us.
Table of contents
- Overview
- Installation
- Usage
- Complementary Napari plugins (for graphical user interfaces)
- How to cite
- Contributing
- License
- Issues
Overview
The Tapenade pipeline is a tool for the analysis of dense 3D tissues acquired with deep imaging microscopy. It is designed to be user-friendly and to provide a comprehensive analysis of the data. The pipeline is composed of several steps, each of which can be run independently.
The pipeline is composed of the following methods:
- Spectral filtering: Given a set of calibrated emission spectra, allows the unmixing of the different fluorophores present in the image.
- Registration & fusion: Allows for spatial fusion of two images (e.g. acquired with a dual-view microscope).
- Pre-processing: Provides many pre-processing functions, like rescaling, masking, correction of optical artifcats, etc.
- Segmentation: Detect and seperate each nuclei in the image. We provide trained weights for StarDist3D, a state-of-the-art deep learning model for nuclei segmentation.
- Masked smoothing: Produces smooth fields of a given dense or sparse quantity, which allows for multiscale analysis.
- Spatial correlation analysis: Computes a spatial correlation map between two continuous fields.
- Deformation tensors analysis: Computes deformation tensors (inertia, true strain, etc.) from segmented objects.
All methods are explained in details in our Jupyter notebooks, which are available in the notebooks folder.
Installation
Main library
We recommand to install the library in a specific environement (like conda). To create a new environement, you can run the following command:
conda create -n env-tapenade python=3.10
You can then activate the environement with:
conda activate env-tapenade
For here onward, it is assumed that you are running the commands from the env-tapenade
conda environement.
You can install tapenade
via pip:
pip install tapenade
To install the latest development version:
pip install git+https://github.com/GuignardLab/tapenade.git
To install the latest development version in editable mode:
git clone git@github.com:GuignardLab/tapenade.git
cd tapenade
pip install -e .
This will install only the main library, without the libraries for the registration/fusion and segmentation methods. To install them, please follow the instructions below.
Registration and fusion (optional)
The registration and fusion methods require the 3D-registration
Python package. To install it, follow the instructions on the library's repository.
Segmentation (optional)
We provide trained weights for StarDist3D, a state-of-the-art deep learning model for nuclei segmentation. To install Stardist3D, follow the instructions on the library's repository.
If you prefer to use StarDist3D with a graphical user interface, Stardist3D is also available as a plugin in several softwares, like Napari, Fiji, and Icy (more details on the Stardist3D repository).
We highly recommend using the change_arrays_pixelsize
and local_image_equalization
methods (defined here) from our library to preprocess your data before running the inference with our custom StarDist3D weights.
Though not mandatory, we also recommend running the inference with StarDist3D on a GPU for faster results. If you don't have a GPU, you can use the ZeroCostDL4Mic Google Colab notebooks, which allow you to run the inference on a GPU for free. You can find the ZeroCostDL4Mic notebooks for StarDist3D here.
Usage
The methods described above are available at the following locations:
- Spectral filtering: Code, Notebook
- Registration & fusion: Code, Notebook
- Pre-processing: This script gathers all preprocessing functions, Notebook
- Segmentation: Code, Notebook
- Masked smoothing: Code, Notebook
- Spatial correlation analysis: Code, Notebook
- Deformation tensors analysis: Code, Notebook
All methods are explained in details in our Jupyter notebooks, which are available in the notebooks folder.
Complementary Napari plugins (for graphical user interfaces)
During the pre-processing stage, dynamical exploration and interaction led to faster tuning of the parameters by allowing direct visual feedback, and gave key biophysical insight during the analysis stage. We thus created three user-friendly Napari plugins designed around facilitating such interactions:
-
napari-organoid-registration (available here) When using our automatic registration tool to spatially register two views of the same organoid, we were sometimes faced with the issue that the tool would not converge to the true registration transformation. This happens when the initial position and orientation of the floating view are too far from their target values. We thus designed a Napari plugin to quickly find a transformation that can be used to initialize our registration tool close to the optimal transformation. From two images loaded in Napari representing two views of the same organoid, the plugin allows the user to either (i) manually define a rigid transformation by continually varying 3D rotations and translations while observing the results until a satisfying fit is found, or to (ii) annotate matching salient landmarks (e.g bright dead cells or lumen-like structures) in both the reference and floating views, from which an optimal rigid transformation can be found automatically using principal component analysis.
-
napari-organoid-preprocessing (available here) From a given set of raw images, segmented object instances, and object mask, the plugin allows the user to quickly run all pre-processing functions from our main pipeline with custom parameters while being able to see and interact with the result of each step. For large datasets that are cumbersome to manipulate or cannot be loaded in Napari, the plugin provides a macro recording feature: the users can experiment and design their own pipeline on a smaller subset of the dataset, then run it on the full dataset without having to load it in Napari.
-
napari-spatial-correlation-plotter (available here) This plugins allows the user to analyse the spatial correlations of two 3D fields loaded in Napari (e.g two fluorescent markers). The user can dynamically vary the analysis length scale, which corresponds to the standard deviation of the Gaussian kernel used for smoothing the 3D fields. If a layer of segmented nuclei instances is additionally specified, the histogram is constructed by binning values at the nuclei level (each point corresponds to an individual nucleus). Otherwise, individual voxel values are used. The user can dynamically interact with the correlation heatmap by manually selecting a region in the plot. The corresponding cells (or voxels) that contributed to the region's statistics will be displayed in 3D on an independant Napari layer for the user to interact with and gain biological insight.
How to cite
If you use this plugin for your research, please cite us using the following reference:
[DOI in progress]
This repository has been developed by (in alphabetical order):
Contributing
Contributions are very welcome. Tests can be run with tox or pytest, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the MIT license, "tapenade" is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
This library was generated using Cookiecutter and a custom made template based on @napari's cookiecutter-napari-plugin template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.