MunskyGroup / FISH_Processing

Repository to automatically process ​Fluorescence In Situ Hybridization (FISH) images using Cellpose and BIG-FISH (FISH-quant v2).
BSD 3-Clause "New" or "Revised" License
14 stars 3 forks source link
automation bioinformatics-pipeline fish image-processing python

​Fluorescence In Situ Hybridization (FISH) - automated image processing

Authors: Luis U. Aguilera, Linda Forero-Quintero, Eric Ron, Joshua Cook, Brian Munsky

License Open In Colab Documentation Status

Description

Repository to automatically process ​Fluorescence In Situ Hybridization (FISH) images. This repository uses PySMB to allow the user to transfer data between Network-attached storage (NAS) and a remote or local server. Then it uses Cellpose to detect and segment cells on microscope images. Big-FISH is used to quantify the number of spots per cell. Data is processed using Pandas data frames for single-cell and cell population statistics.

Code architecture

drawing

Code overview

Cell segmentation

* The code can achieve accurate cell segmentation for the nucleus and cytosol in the images. 
The segmentation is performed using Cellpose and complex optimization routines that ensure 
the maximum number of cells detected in the image.
drawing

Spot detection

* Spot detection is achieved using Big-FISH. Customization is added in this code to detect 
spots in multiple color channels. Additionally, this repository contains algorithms to 
measure spots that are co-detected in different color channels.  
drawing

Spot counting

* The code quantifies the number of spots per cell and allows the visualization of these
numbers as a function of cell size.
drawing

Spot intensity quantification

* The code allows quantifying the intensity of each spot, using the disk and a ring mask 
method developed by Morisaki and Stasevich, Methods Mol Biol. 2022.
drawing

Data management

* A complete data-frame for all processed images and cells is generated. This data-frame
contains information about the location and intensity of each detected spot.
drawing

Data reproducibility report

* To increase reproducibility a metadata report is generated. This report contains information
 about the list of images processed, the specific parameters used to process the data, 
 the user that processed the data, and the version of the modules and packages used.
drawing

Data visualization and publication quality images.

* Plotting a complete field of view
drawing
* Plotting the detected spots and transcription sites in a selected cell.
drawing
* Plotting all color channels for a selected cell.
drawing
* Plotting all z-slices for a selected cell.
drawing

Installation

Installation on a local computer

To install this repository and all its dependencies. We recommend installing Anaconda.

Installation on the Keck-Cluster (Rocky Linux 8)

The following instructions are intended to use the codes on the Keck Cluster.

Using this repository

Most codes are accessible as notebook scripts or executables.

To use the codes locally with an interactive environment, use the notebooks folder

Executable codes are located in cluster folder

Miscellaneous instructions:

To login to the NAS, it is needed to provide a configuration YAML file with the format:

    user:
        username: user_name
        password: user_password
        remote_address : remote_ip_address
        domain: remote_domain

Creating an environment file (YAML) use:

conda env export > FISH_env.yml

Additional steps to deactivate or remove the environment from the computer:

To create the documentation use the following modules.

pip install sphinx
pip install sphinx_rtd_theme
pip install Pygments

Licenses for dependencies

Please check this file with the licenses for BIG-FISH, Cellpose, and PySMB.

Citation

If you use this repository, make sure to cite BIG-FISH and Cellpose: