Overview#
High level view#
pyHiM software is running as a pipeline, executing sequentially a series of pre-defined routines. These routines can be classified into 5 groups:
Preprocessing: Organization and formatting of the input data before proceeding with the analysis (e.g. registration or calculation of 2D projection).
Identification: Image segmentation (e.g. detection of FISH spots, segmentation of nuclei or cells, etc.) and calculation of the 3D-coordinates.
Matching: Addressing each detection to a unique mask.
Postprocessing: Formatting output data to make post-analysis easier for the user (ex: pairwise distance matrices).
Visualization: Indicating live-progress and results to the user (as
.png
images and.md
file).
Note
Each step can be optimized with parallel computations thanks to Dask package.
To use it, see --threads
argument.
Data set#
To run the default pipeline, pyHiM needs two types of data:
A dictionary of initialization parameters, named
parameters.json
3D images in TIFF format (extension:
.tif
or.tiff
).
Four types of images are accepted and will be processed in the following order:
Fiducial
Barcode
Mask (like DAPI)
RNA (optional)
Note
These types of images are called labels. Labels 1,2 & 3 are mandatory for running the default analysis pipeline.
Default pyHiM flow#
The default pipeline is composed of the following routines:
project: Projects all 3D images in 2D.
register_global: Computes the best shift to align all 2D fiducials. And (modules/preprocessing/applies_registrations.md) shifts 2D barcodes, masks and RNA according to the transformation computed at the
register_global
step.register_local: Takes 2D aligned fiducial images and finds the best shift along the Z-axis. This shift will be applied on the 3D segmented barcodes at
register_localizations
step.mask_2d: Segments 2D aligned masks.
localize_2d: Segments 2D aligned barcodes.
mask_3d: Segments masks in 3D.
localize_3d: Applies 2D shift, computed at
register_global
step, to 3D barcodes. Then segments them in 3D.filter_localizations: Filters the localizations in 2D and 3D.
register_localizations: Registers the 3D localizations with the local shifts.
build_traces: Associates barcode coordinates with the relevant mask.
build_matrix: Calculates the pairwise distance (PWD) matrix for each trace.
Note
You can find a description of all routines inside next section.