FAST-HIPPOS: FLIM Analysis of Single-cell Traces for Hit Identification of Phenotypes in Pooled Optical Screening
FAST-HIPPOS is a collection of Fiji scripts to analyze and visualize multi-cell time-lapse experiments, detect hit cells based on user-set criteria and output their stage coordinates for e.g. photoactivation. For non-screening applications it can function as a valuable tool for single-cell trace analysis, visualization and inspection.
Installation & requirements
Required activated Fiji Update Sites (via Help -> Update… -> Manage Update Sites):
- FAST-HIPPOS
- CLIJ
- CLIJ2
- CSBDeep
- ImageScience
- IJ-PB Plugins
- PTBIOP
- SCF MPI CBG (- StarDist)
Workflow
- Loading input images
- Pre-processing
- Cell segmentation
- Measuring single-cell (FLIM/intensity) traces
- Visualization
- Hit selection
- Output files
1. Input images
Input images are multi-channel .tif
files, or any proprietary microscopy format that is supported by Bio-Formats, including files containing multiple images.
FLIM is supported in several ways (mostly for Leica images):
- Confocal TCSPC: lifetime component images, fitted with a double-exponential and exported from LASX (as ‘raw ImageJ tif’).
- TauSeparation, directly from the
.lif
file - Fast FLIM
- TauContrast
- Lambert Instruments Frequency Domain FLIM (
.fli
files)
Supported non-FLIM images are:
- Ratio Imaging (2-channel
.tif
files) - Intensity (single-channel
.tif
files)
The macro can batch-process multiple files as well.
2. Pre-processing
Optionally, image corrections can be performed as preprocessing steps:
- Stitching of mylti-tiled experiments, with the separate command
Stitch tiles
(tested for Leica.lif
files). Fast ‘no-calculation’ stitching is done using the Grid/Collection Stitching plugin to ensure correct pixel size[^1] and to prevent image distortion. XY-Stage coordinates of image tiles are extracted from the OME metadata of the.lif
file and stored in the stitched.tif
file, together with the grid layout, the tile size and the tile overlap percentage. - Drift correction. A cross-correlation (cc) of image frames is performed with either the first frame, the previous frame or the last frame. CLIJ2 image projection functions are used to quickly determine the coordinates of the maximum pixel in the cross-correlation image, its distance from the center representing the shift. Drift correction is performed on the calculated intensity image (i.e. the addition of the two components, if applicable).
- Bidirectional scanning phase mismatch correction. The even and odd lines are split and turned into two separate images. Cross-correlating these images and locating the peak yields the shift between the phases. The two images are both shifted half this distance and interleaved again: [^1]: The exported pixel size is not entirely correct, causing an increasing deviation in the cell coordinates for increasing x and y.
After these optional steps, a ‘weighted lifetime’ image is created. For single-component FLIM images (‘FAST FLIM’, ‘TauContrast’, Frequency-domain FLIM) this is simply the lifetime; for a two-component FLIM image this is equal to the intensity-weighted lifetime. (Note that the intensities here are the intensities of the lifetime components!) Additionally, an ‘RGB overlay image’ is created, where a (x,y,t) smoothed version of this lifetime image is multiplied (overlayed) by the total intensity image, yielding a denoised visualization of the experiment.
3. Cell segmentation
cell segmentation can be performed with CellPose (2 or 3), operated from Fiji using a wrapper. The image stack is first ‘collapsed’ using a summed-intensity projection of a subset or all of the time-lapse images, resulting in a single imageto segment. This procedure works well if the imaging is short enough that the cells do not move (a lot). The user can select the segmentation model (pretrained or custom) and needs to provide a few key parameters, e.g. cell diameter and flow threshold. Additionally, restrictions on cell size and circularity can be imposed.
4. Measuring single-cell (FLIM/intensity) traces
After cell segmentation ROIs are created from the obtained label image, after which intensities and average fluorescence lifetimes are computed for every cell, at every time point. This average lifetime is the weighted lifetime, where each pixel of a cell is linearly weighted with its intensity fraction.
The script automatically tries to determine the time points of a(nta)gonist stimulation and calibration by detecting peaks in the second derivative of the average trace of all cells. If the peaks are higher than a set number of times the stddev of the signal it is picked up. If successful, cell traces are divided into three parts: baseline, response, and calibration. If not, manual input of the time points is also possible. These three partitions are used for detection of hit cells when screening for dynamic phenotypes. If no stimulation and calibration frame are found or set, the full trace is regarded as response.
5. Visualization
The data is visualized in various graphs and images:
Time traces plot
Timelapse Lifetime histogram and scatterplots
Kymographs
This is an image with time as y-coordinate, Cell ID as x-coordinate and cell lifetime as value. Additionally, a ‘sorted kymograph’ is created, where the X-axis is sorted on the average response lifetime.
Density plot
A 2D histogram with lifetime on the y-axis and time on the x-axis. This image allows a better visual assessment of the heterogeneity of traces compared to the Time Traces plot.
6. Screening: hit selection
When activate screening
is selected in the starting dialog, cells showing certain kinetic behaviour can be detected, and the stage coordinates of these ‘hit’cells are written to a .rgn
file for subsequent photoactivation (or e.g. high-resolution imaging, run FRAP experiments, etc.). This file can then be loaded into the Leica LAS X Navigator, where the hit cells will be marked as imaging positions.
Because many possible interesting dynamic phenotypes exist, the script provides several possible rules and criteria, that can be combined (AND / OR) when desired:
Hit criteria panel
Time traces plot of hits
After hit detection, a graph is generated showing only the traces of the hit cells. Here, the selected time window used in the hit selection (in this example the full response time) is highlighted in blue. Compare with the plot containing all the single-cell traces:
The hit cells are also displayed in a table, as well as their positions graphically: