The 3D-SeqFISH analysis toolbox integrates EASIFISH (Expansion-Assisted Iterative Fluorescence In Situ Hybridization) pipeline and 3D registration method for analyzing image-based 3D spatial transcriptomic data. We aim to provide the general solution for 3D spatial transcriptome, including automated image stitching, 3D cell segmentation, distributed spot detection, highly accurate multi-round 3D FISH spot registration (nm-level accuracy), and efficiently decoding hundreds of genes for thick tissues.
- Released the 3D-SeqFISH github page on 7/2/22
- Add 3D-SeqFISH individual scripts on 7/4/22
- Test PFH and FPFH on 7/4/22
- Grouping registration scripts and evaluation on 7/4/22
- Test RANSAC-ICP on 7/5/22
- Generate shuffled point clouds on 7/7/22
- Determine the threshold for radius on 7/9/22
- Add 3D-SeqFISH decoding results for a single tile image on 7/11/22
- Test deep learning methods for registration by 8/1/22
- Add decoding analysis by 9/1/22
- Test 3D-SeqFISH bash scripts by 9/1/22
3D-SeqFISH
analysis are inspired by point cloud registration and seqFISH decoding methods. Python >= 3.6 required, jupyter notebook, matplotlib,numpy,math,cv2,skimage,scipy,pandas,seaborn,zarr,z5py,qt5 packages are installed inside a anaconda envioronment (python 3.8.12), and it can be installed with pip
:
pip install 3D-SeqFISH
pip install pclpy==0.11.0 -i https://pypi.tuna.tsinghua.edu.cn/simple Python == 3.6 required
pip install python-pcl
pip install open3D
Preprocessing for 3D-SeqFISH is based on EASIFISH (Expansion-Assisted Iterative Fluorescence In Situ Hybridization), 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 updates for EASI-FISH pipeline, and MULTIFISH pipeline.
- For imaging large volumes, multiple sub-volumes (tiles) are sequentially acquired with 3X Expansion microscopy, followed by computational stitching into a single large image. For independent execution, we recommend working with the n5 filesystem due to large file size.
- For coarsely registering images, we used BigStream for 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.
- For distributed spot detection, we used RS-FISH or hAirlocalize to allow rapid spot detection on full-resolution large image datasets.
- Assign spots, cell morphological measurements, dense spot analysis, FISH signal intensity measurements, lipofuscin subtraction are included in the EASIFISH Pipeline.
- To extract the point clouds for later 3D registrataion, we use the inverse tranformation exported from the above bigstream registration to warp the cell mask of the fixed rounds. Then, we adapt filter to remove the noise on the cell edges of the moving masks. After we adjust the image size of moving masks, we assign the spots for cell masks of the fixed and moving rounds.
- ROI_ransac_napari_fixmovROI.ipynb now is the only python script for processing the 3d registration of FISH point clouds.
- Random sample consensus (RANSAC) is a powerful tool with fast global affine transformation using a feature-based RANSAC algorithm to coarsely registered the spots. Iterative closest point (ICP) derives the globally optimal transformation for each cell that minimizes the sum of square distances to competing optimal affine matrix, which is provides a solution for fine registration.
- To accurately register the point clouds of multiple rounds, we apply 3 traditional stragety to register the FISH spots, 1) image based RANSAC + ICP; 2) FPFH based RANSAC + ICP; 3) PFH based RANSAC + RANSAC-ICP (to be tested).
-
- image based RANSAC + ICP: apply bigstream registration methods for registering the FISH spots. we first correct the chromatic abberation, registered the DAPI channel, apply the DAPI transformation to each FISH channel or FISH spots, and then do the point cloud registration for all FISH channels of all rounds.
- image based RANSAC + ICP: apply bigstream registration methods for registering the FISH spots. we first correct the chromatic abberation, registered the DAPI channel, apply the DAPI transformation to each FISH channel or FISH spots, and then do the point cloud registration for all FISH channels of all rounds.
-
- FPFH based RANSAC + ICP
- FPFH based RANSAC + ICP
- FPFH is not the best way to extract features, now the results are worse the first method.
-
- PFH based RANSAC + RANSAC-ICP (to be tested)
- PFH based RANSAC + RANSAC-ICP (to be tested)
- PFH will include more features, and RANSAC-ICP will help to remove outliers during the iterative fine registration.
- Point cloud registration can be executed as part of the 3D-SeqFISH pipeline. It also can be installed and used seperately.
- Image based RANSAC + ICP or PFH based RANSAC + RANSAC-ICP is not use enough features and final results are still not ideal.
- For more accurately register the point clouds of multiple rounds, we also apply deep-learning based registeration method. RPMnet and PCRnet appeal to be the ideal options for a better registration.
- We benefit from the idea of seqFISH and HCR 3.0 for our 3D-seqFISH barcoding and decoding. For barcoding the genes, 3 different channels of FISH images acquired with lightsheet microscope will be used and 4-5 rounds of EASIFISH will be run for encoding 81-243 genes. 2-6 extra rounds will be conducted for error correction, examination of the decoding efficiency and dense expressed genes with non-combinatorial FISH.
- For decoding the genes, we modify the 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 barcode bit will be used for searching the most correlated code of a specific gene.
- We build a self-contained, highly flexible, and platform agnostic computational pipeline, which supports a turnkey 3D-SeqFISH analysis on local machines and the High performance compute cluster (such as Slurm or LSF). It can rapidly process large datasets greater than 10 TB in size with minimal manual intervention. The pipeline also provides options to run individual analysis modules, such as point cloud registration and gene decoding.
- This toolbox handles large-scale, multi-round, high-resolution image data acquired using EASI-FISH. It takes advantage of the n5 filesystem to allow for rapid and parallel data reading and writing. Example images are provided for testing EASI-FISH pipeline.
- 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 showes the registation steps and visualization of registered point clouds and images.
- 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
Shiqi Wang (Charlotte)