Authors: Luis U. Aguilera, Linda Forero-Quintero, Eric Ron, Joshua Cook, Brian Munsky
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.
* 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.
* 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.
* The code quantifies the number of spots per cell and allows the visualization of these
numbers as a function of cell size.
* 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.
* 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.
* 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.
* Plotting a complete field of view
* Plotting the detected spots and transcription sites in a selected cell.
* Plotting all color channels for a selected cell.
* Plotting all z-slices for a selected cell.
To install this repository and all its dependencies. We recommend installing Anaconda.
Clone the repository.
git clone --depth 1 https://github.com/MunskyGroup/FISH_Processing.git
To create a virtual environment, navigate to the location of the requirements file, and use:
conda create -n FISH_processing python=3.10 -y
source activate FISH_processing
To install pytorch for GPU usage in Cellpose (Optional step). Only for Linux and Windows users check the specific version for your computer on this link :
conda install pytorch cudatoolkit=10.2 -c pytorch -y
To install pytorch for CPU usage in Cellpose (Optional step). Only for Mac users check the specific version for your computer on this link :
conda install pytorch -c pytorch
To include the rest of the requirements use:
pip install -r requirements.txt
The following instructions are intended to use the codes on the Keck Cluster.
Clone the repository to the cluster.
git clone --depth 1 https://github.com/MunskyGroup/FISH_Processing.git
Move to the directory
cd FISH_Processing
Create an environment from this YAML file.
conda env create -f FISH_env.yml
Most codes are accessible as notebook scripts or executables.
To process images use the notebook FISH pipeline
After processing the images use the notebook FISH pipeline to analyze multiple datasets
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:
conda deactivate
conda env remove -n FISH_processing
To create the documentation use the following modules.
pip install sphinx
pip install sphinx_rtd_theme
pip install Pygments
Please check this file with the licenses for BIG-FISH, Cellpose, and PySMB.
If you use this repository, make sure to cite BIG-FISH and Cellpose: