This 3D-SeqFISH analysis toolbox is a integrated SeqFISH analysis method for 3D FISH images, aiming to provide the general solution for 3D spatial transcriptome, including automated image stitching, 3D cell segmentation, distributed spot detection, and distributed and highly accurate multi-round 3D FISH spot registration (nm-level accuracy), and decoding analysis. We also envision this workflow being adapted for analysis of other image-based spatial transcriptomic data.
Point cloud registration and decoding scripts are inspired by SeqFISH and 3D-SeqFISH
can be installed with pip
:
pip install 3D-SeqFISH
Preprocessing for point cloud registration is largely based on EASIFISH, MULTIFISH, bigstream, napari, and stardist, etc.
bigstream
can be installed with pip
:
pip install bigstream
napari
can be installed with pip
:
python -m pip install "napari[all]"
Starfinity
can be installed with pip
:
pip install git+https://github.com/mpicbg-csbd/stardist@refinement
See here for active EASI-FISH pipeline updates, and here for active MULTIFISH pipeline updates.
For imaging large volumes, multiple sub-volumes (tiles) are sequentially acquired, followed by computational stitching into a single large image(Gao et al., 2019).The stitching module can be executed with the EASI-FISH pipeline (see above).
For coarsely registering images, we used BigStream for robust and fully automated non-rigid registration of multi-round FISH data.
For 3D segmentation, Starfinity is a deep learning-based automatic 3D segmentation software. Starfinity is an extension of Stardist, an earlier cell detection approach (Schmidt et al., 2018; Weigert et al., 2020) and is based on the dense prediction of cell border distances and their subsequent aggregation into pixel affinities. A starfinity model was trained to predict cell body shapes from DAPI-stained RNA images and is provided for testing. Starfinity can be executed as part of the EASI-FISH pipeline.
For distributed spot detection, we used RS-FISH or hAirlocalize Airlocalize(Lionnet et al., 2011) to allow rapid spot detection on full-resolution large image datasets. hAirlocalize can be executed independently or as part of the EASI-FISH pipeline (see above). For independent execution, we recommend working with the n5 filesystem due to large file size.
For extracting the point clouds to do the 3D registrataion, a necessary step is to assign the spots for cell masks of the fixed and moving rounds. We used the inverse tranformation exported from the above bigstream registration and warp the cell mask of the fixed rounds to get the mask of moving rounds images.The spots will be assigned to these new cell masks.
For accurately register the point clouds of multiple rounds, we apply methods for register the FISH spots with the classic linear registration methods. Ransac is a powerful tool for coarsely registered the spots, ICP then will be used for a fine registration.
For registering the sequentially 3-channel acquired FISH images, we first correct the chromatic abberation, registered the DAPI channel, apply the DAPI transformation to each FISH channel, and finally do the point cloud registration for all FISH channels of all rounds.
Point cloud registration method first performs fast global affine transformation using a feature-based random sample consensus (RANSAC) algorithm. The pipeline then derives the globally optimal transformation for each cell that minimizes the sum of square distances to competing optimal affine matrix.
Point cloud registration can be executed as part of the 3D-SeqFISH pipeline. It also can be installed and used seperately.
For more accurately register the point clouds of multiple rounds, we also apply deep-learning based registeration method here (RPMnet and PCRnet appeal to be the ideal options for a better registration).
We adapted the idea of seqFISH and HCR 3.0 for our 3D-seqFISH experiments. For barcoding the genes, we used 3 different channel/colors will be used and 4 rounds will be run. 1-3 extra rounds will be conducted for error corrections.
For encoding the genes, we modified SeqFISH design by using a best threshold radius for determine the colocalized spots of each rounds (see Youden's J Statistic).
For increase the detection efficency, the nearest 3 spots for a specific bit will be used for find the most correlated code for a specific gene.
We build a self-contained, highly flexible, and platform agnostic computational pipeline, which supports turnkey 3D-SeqFISH analysis on local machines and the High performance compute cluster (such as Slurm or LSF). The pipeline is freely available, open source, and modular. It can rapidly process large datasets greater than 10 TB in size with minimal manual intervention. The pipeline can be used to analyze EASI-FISH dataset end-to-end. It takes czi
image files acquired from Zeiss Z.1 lightsheet microscope as input and outputs 1) processed image data at different scales and 2) transcript counts that can be readily used for cell type identification. The pipeline also provides options to run individual analysis modules, such as image stitching or registration.
This toolbox handles large-scale, multi-round, high-resolution image data acquired using EASI-FISH (Expansion-Assisted Iterative Fluorescence In Situ Hybridization). It takes advantage of the n5 filesystem to allow for rapid and parallel data reading and writing.
Example images example datasets are provided for software testing. For instructions on performing a demo run with the example data using the end-to-end EASIFISH pipeline, see here.
We provide the related images and point clouds of a example Cell 5# for testing the 3D registration. Stay tuned to the description later.
ROI_ransac_napari_fixmovROI.ipynb now is the only python script for processing the 3d registration of FISH point clouds. Stay tuned for individual components.
Pipeline was executed with Bash command
We used the Slurm high-performance cluster for computing, see the description for the Slurm workload manager Slurm workload manager.
Fiji-based n5-viewer can be used for large image dataset visualization on local machines. The workflow also outputs processed intermediate image data in the stitching (n5
), registration (n5
) and segmentation (tif
) steps. For inspection of spot extracted with hAirlocalize, we recommend the python-based multi-dimensional image viewer, napari. Example notebooks are provided.
Code used for Post processing, such as assign spots, cell morphological measurements, dense spot analysis, FISH signal intensity measurements, lipofuscin subtraction are included in this repository.
EASI-FISH for thick tissue defines lateral hypothalamus spatio-molecular organization
Yuhan Wang, Mark Eddison, Greg Fleishman, Martin Weigert, Shengjin Xu, Fredrick E. Henry, Tim Wang, Andrew L. Lemire, Uwe Schmidt, Hui Yang, Konrad Rokicki, Cristian Goina, Karel Svoboda, Eugene W. Myers, Stephan Saalfeld, Wyatt Korff, Scott M. Sternson, Paul W. Tillberg
https://www.sciencedirect.com/science/article/pii/S0092867421013398
Zhenggang Zhu Charlotte Wang Yuhan Wang