Page history Edit this page How do I edit this website?

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)

Additionally, you need a working Cellpose (2.0 or higher) environment in Python. See the Cellpose GitHub Readme for installation instructions. (Note: FAST-HIPPOS was tested up to Cellpose 3. Although it may just as well work with Cellpose 4 (Cellpose-SAM), the last Cellpose 3 version can be installed with pip install cellpose[gui]==3.1.1.2.)

Before running FAST-HIPPOS, make sure that the BIOP Cellpose wrapper works correctly: follow their installation instructions. Then make sure that the wrapper knows where your Cellpose environment is located and which type it is (conda or venv), by filling in the top two fields in Plugins -> BIOP -> Cellpose/Omnipose -> Cellpose...:

You will find the FAST-HIPPOS commands in the Fiji menu under Plugins -> Macros. Below follows a description of the main command: FAST-HIPPOS. Details on the other commands follow below.


FAST-HIPPOS Workflow

  1. Input images
  2. Pre-processing
  3. Cell segmentation
  4. Measuring single-cell (FLIM/intensity) traces
  5. Visualization
  6. Hit selection
  7. 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) (N.B. This option requires additional parameters that are currently suspended.)

Supported non-FLIM images are:

  • Ratio Imaging (2-channel .tif files)
  • Intensity (single-channel .tif files)

The macro can also batch-process multiple files. Just drag&drop multiple files in the input window, or useklll the Add files button.

2. Pre-processing (optional)

Optionally, image corrections can be performed as preprocessing steps:

  1. Stitching of multi-tiled experiments. This is done with the separate command Stitch tiles (tested for Leica .lif files). Only (Single-tile) .tif files are loaded from the input folder and considered for stitching. Fast ‘no-calculation’ stitching is performed 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. (At the moment the overlap percentage is set manually.)
  2. 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).
  3. 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.

image

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. The creation of this image is optional, but highly reccommended. It is also required for the Trace inspector/selector command (described at the end)

Cos7H250_ADRB2KO_1 (weighted lifetime) Cos7H250_ADRB2KO_1 (lifetime   intensity RGB overlay)

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.

Cos7H250_ADRB2KO_1 (lifetime   intensity RGB overlay)

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. If only a single peak is found, it is regarded as being the stimulation. (N.B. Currently only upward rises in lifetime/ratio are detected!)

5. Visualization

The data is visualized in various graphs and images:

Time traces plot

Timelapse Lifetime histogram and scatterplots

Movies of

  • the histogram of cell lifetimes/ratios
  • scatterplots of lifetime vs cell intensity and liftime vs cell area

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.

Cos7H250_ADRB2KO_1 (kymograph) Cos7H250_ADRB2KO_1 (kymograph sorted)

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. It also offers the possibility to

  • Re-apply the screening settins on already analyzed images, for which the script loads images and files from the output folder as specified in the main dialog.
  • Generate random hits from the segmented cells (useful for testing purposes).

Hit criteria panel

Hit detection settings dialog Specific details:

  • Stimulation and calibration frames can be entered manually, or choose 0 for ‘baseline only’ mode.
  • The option to curve fit a user-defined equation to the reponse part of the traces is currently disabled.

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:

7. Output files

Per image many output files are generated:

  • Labelmap_cells: a label image containing the segmented cells as labels
  • Intensty & labelmap: an overlay that can by used to check the segmentations
  • Weighted lifetime: 32-bit image containing the weighted lifetime as described above.
  • Kymograph images (raw, smoothed and sorted on response)
  • Rank vector: (helper image allowing sorting the cells on response)
  • Lifetime traces plot: all single-cell traces
  • ROIs.zip: a zip file containing the imageJ ROIs
  • Log.txt copy of the ImageJ log window
  • Cell_statistics.tsv: file with raw morphometric and intensity data for all cells
  • Stim_&_Cal_frames.txt: file stating at which frame stimulation and detection happens (set or detected)
  • Lifetime & intensity RGB overlay (optional)
  • Lifetime histogram movie (optional)
  • Scatterplots (optional)
  • Intensity.tsv: table with cell intensities for each frame (optional)
  • Lifetimes.tsv: table with cell lifetimes for each frame (for technical reasons currently transposed) (optional)

When screening is performed a few additional files are created:

  • Hit list.tsv: table(s) with hit cells, sorted by measurement of their selected criteria, and xy stage coordinates. Chuncked if the number of hit cells exceeds the set limit.
  • .rgn file with hit positions for LAS X
  • Hits only traces plot
  • kymographs (hits and non-hits)
  • lifetime histograms (hits and non-hits)
  • density plots (hits and non-hits)
  • graphical representation of xy positions of hit cells

Trace inspection and manual selection of hits

After analysis cells and traces can be interactively inspected using the Inspect and select traces command. Upon running it, a dialog with options allows choosing between inspecting and selecting mode. After clicking ok, the windows re-arrange.

Inspection mode

Cells and traces are highlighted in the sorted kymographs, traces plot and RGB overlay image when the mouse cursus moves over them and the window is activated.

Left-clicking on a cell in the sorted kymographs or RGB overlay image shows the selected trace in the plot, with the other traces grayed out.

Left-clicking on a trace in the plot generates a cropped RGB overlay image of the associated cell.

Ctrl + left-click & dragging on the sorted kymograph image creates a temporary selection. Selected cells are highlighted in the RGB overlay. The plot shows only the selected cells.

Selection mode

In this mode ROIs can be draw on the sorted kymograph, the plot or the RGB overlay image. In the latter case this can also be a multi-point ROI. Selected cells are again highlighted in the diagrams. Additionally an .rgn file is created with positions of the selected cells only, allowing for ‘manual’ phenotype screening.