Skip to content

Repository files navigation

FOLD-FISH enables robust and versatile oligo-based DNA FISH in paraffin-embedded tissue samples

Github Repository with scripts used in Li-Wang, Della Chiara et al. TODO add link.

Scripts

The main pipeline be found in the main_pipeline/. folder. Some special-purpose scripts have their own folders.

The project involved a very large dataset and most of the scripts have hard coded assumptions on where the data is so it is unfortunately not possible to re-generate the plots in the figures by running a single command. The purpose of this repository is to share the code that we used so that it is saved for the future and can be reviewed by the community.

Datasets and Images

A subset (50 GB) of the source data can be accessed on figshare together with the deconvolved counterparts and the tables with the spots. Large tissue scans shown in the figures can be visualized with zoom level customization at https://tumorheterogeneity.fht.org/.

Image processing and analysis

Most image were acquired with a Nikon microscope, generating .nd2 files. These files were converted to tif by nd2tool. While any other program could be used for this purpose, please note the naming convention, i.e., the tif files will be named CHANNEL_FOV.tif.

Deconvolution

Images were deconvolved with deconwolf (commit 1768629) using the optical parameters given by nd2tool.

In most cases the number of iterations was set equal to the magnification level. This is not a rule of thumb, but seemed to make sense for the downstream analysis in this case.

Magnification Iterations
20X 20
25X 25
60X 60
100X 100

Spot detection and selection

Diffraction limited spots were detected with deconwolf with command like

$ dw dots  dw_A594_001.tif --NA 1.45 --ni 1.51 --dx 66.5 --dz 200.0 --lambda 617 --fitting --snr1

i.e., the deconvolved images were used as the input. Please note that the snr1 measurement is performed on the non-deconvolved image (i.e. when dw_A594_001.tif is processed, the program looks for and loads A594_001.tif for the snr1 measurements). This generates a .dots.tsv file for each input file with per-spot properties.

The thresholds that was used for the analysis (also for some images that didn't make it to the paper) are collected in main_pipeline/spot_tresholds.csv. Threshold columns specifies thresholds that applies to the Value column, and the ThresholdVC column are thresholds that should be applied to the value*f_corr feature. If ThresholdVC is specified it should be preferred over the Threshold.

Nuclei segmentation

Nuclei were segmented from the maximum intensity projections (over Z) of the non-deconvolved image. For this purpose stardist was used via the script nuclei_segmentation/segment_with_stardist.py.

The segmentation masks from stardist were cleaned up, filtered and re-labeled with the script main_pipeline/measure_nuclei.py. This script was called by arguments like:

$ python measure_nuclei.py filter --folder iiXZ0962_20240812_001_100x/ --dx 0.065 --nsize_min 25 --nsize_max 100 --dilation 2

Analysis and plots

Most of the plots were performed with main_pipeline/plot_results_from_masks.py. While some plots that did not require segmentation masks were done with main_pipeline/plot_snr_family.py.

Finally

Don't hesitate to get in touch if you have any questions about the processing steps. We also store the whole dataset at our servers for the time being so it should be possible to arrange transfers of the original nd2 files.

About

Scripts used in Li-Wang, Della Chiara et al.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages