| Literature DB >> 34624016 |
Thibault Lagache1,2, Alison Hanson1,2,3, Jesús E Pérez-Ortega1, Adrienne Fairhall4,5, Rafael Yuste1,2,6.
Abstract
Measuring the activity of neuronal populations with calcium imaging can capture emergent functional properties of neuronal circuits with single cell resolution. However, the motion of freely behaving animals, together with the intermittent detectability of calcium sensors, can hinder automatic monitoring of neuronal activity and their subsequent functional characterization. We report the development and open-source implementation of a multi-step cellular tracking algorithm (Elastic Motion Correction and Concatenation or EMC2) that compensates for the intermittent disappearance of moving neurons by integrating local deformation information from detectable neurons. We demonstrate the accuracy and versatility of our algorithm using calcium imaging data from two-photon volumetric microscopy in visual cortex of awake mice, and from confocal microscopy in behaving Hydra, which experiences major body deformation during its contractions. We quantify the performance of our algorithm using ground truth manual tracking of neurons, along with synthetic time-lapse sequences, covering a wide range of particle motions and detectability parameters. As a demonstration of the utility of the algorithm, we monitor for several days calcium activity of the same neurons in layer 2/3 of mouse visual cortex in vivo, finding significant turnover within the active neurons across days, with only few neurons that remained active across days. Also, combining automatic tracking of single neuron activity with statistical clustering, we characterize and map neuronal ensembles in behaving Hydra, finding three major non-overlapping ensembles of neurons (CB, RP1 and RP2) whose activity correlates with contractions and elongations. Our results show that the EMC2 algorithm can be used as a robust and versatile platform for neuronal tracking in behaving animals.Entities:
Mesh:
Substances:
Year: 2021 PMID: 34624016 PMCID: PMC8528277 DOI: 10.1371/journal.pcbi.1009432
Source DB: PubMed Journal: PLoS Comput Biol ISSN: 1553-734X Impact factor: 4.475
Tracking methods in bio-imaging.
| Algorithm | Type | Detection | Linking | Gap closing | Pros | Cons | Freely available | Ref. |
|---|---|---|---|---|---|---|---|---|
| Sage et al. | Global | None | Energy minimization | Yes | Global. | Designed for one or few sparse particles | ImageJ plugin | [ |
| Bonneau et al. | Global | None | Energy minimization | Yes | Global. Robust gap closing with minimal-path algorithm | Designed for few sparse particles. High computational load. | No | [ |
| NeRVE | Detect & Mapping | Watershed Segmentation | Point-set registration & clustering–Animal deformation estimated with elastic transformations | Yes | Robust to dense packing of particles. Handles non-linear deformations. | High computational load. Not robust to many missing detections and long gaps in highly deforming environments. | Matlab GUI | [ |
| fDLC | Detect & Mapping | Watershed Segmentation | Point-set registration to reference set of positions–learning of animal deformation | Yes | Robust to dense packing of particles. Handles non-linear deformations. | Not robust to many missing detections and long gaps in highly deforming environments. | Python (Github repository) | [ |
| CRF_ID | Detect & Mapping | Gaussian mixture model fitting | Point-set registration to reference & temporally-nearby frames–Use of graphical model (neighbors) to predict identities | Yes | Robust to dense packing of particles. Handles non-linear deformations. | High computational load. Not robust to many missing detections and long gaps in highly deforming environments. | Matlab (Github repository) | [ |
| Mosaic | Detect & Link | Gaussian Convolution & Thresholding | Global distance minimization | Yes | Fast. Accounts for spot intensity and size in distance computation. | Gap closing does not handle large motion. Not robust in very cluttered conditions. | [ | |
| TrackMate | Detect & Link | Wavelet transformation or Gaussian convolution & thresholding | Global distance minimization | Yes | Fast. Handles split & merge events. | Gap closing does not handle large, non-linear motion. Many user-defined parameters | [ | |
| eMHT | Detect & Link | Wavelet transformation & thresholding | Probabilistic (Multiple Hypothesis) | Yes | Robust in cluttered environment. Few user-defined parameters | Slower than global distance minimization. Cannot close large gaps (> ~5 frames) due to computational load | [ | |
| MAP-4D-DAE | Detect & Link | Not specified | Probabilistic (Multiple Hypothesis) + Autoencoding for particle motion modeling | Yes | Robust in cluttered environment. Few user-defined parameters. Handles non-linear deformations | Slower than global distance minimization. Cannot close large gaps (> ~5 frames) due to computational load | No | [ |
Fig 1Multi-step EMC2 for tracking neuron activity in calcium imaging data.
a- Time-lapse imaging (N frames) of intermittent fluorescence activity of a neuron in a deforming environment (e.g. behaving animal). b- Fluorescent spots (neurons), that are significantly brighter than background, are automatically detected with a wavelet-based algorithm. c- Tracklets of detectable neurons are robustly reconstructed using probabilistic tracking algorithm (eMHT). d- Short tracklets of detectable particles are used to compute the elastic deformation of the field of view at each time frame. Associated detections in neuron tracklets are used as fiducials, and the whole deformation is interpolated using a poly-harmonic thin-plate spline function. Forward- and backward-propagated positions of tracklet particle positions are shown with a thin blue line. e- After having corrected for the deformation of the field-of-view where neurons are embedded, gaps between the end- and starting-points of tracklets are closed by minimizing the global Euclidean distance between points (dotted line). f- Finally, complete single neuron tracks over the time-lapse sequence are obtained by applying the elastic transformation of the field-of-view to concatenated tracklets.
Implementation of the EMC2 algorithm in Icy platform.
Time-lapse sequence of fluorescent particles is the input to a multi-step, automatic protocol in Icy. A first series of blocks, highlighted in blue, detects the position of fluorescent neurons (spots) in each frame of the time-lapse sequence. Block 1 uses the wavelet transform of each image and statistical thresholding of wavelet coefficients to determine spots that are significantly brighter than background. To separate close spots that form clusters in the wavelet-based mask of the image, the thresholded sequence is convolved with a log-gaussian kernel to enhance single spots (block 2), and local maxima algorithm is applied (block 3). A second series of blocks, highlighted in red, computes single particle tracks from computed spot positions. First, the Bayesian tracking algorithm (eMHT) computes tracklets of detectable particles (block 4). Due to fluctuating particle detectability, many Bayesian tracklets are terminated prematurely and new tracklets are created when particles can be detected again. To close detection gaps in single particle tracks, block 5 applies the EMC2 algorithm. Final output of the Icy protocol is the collection of single particle tracks over the time-lapse sequence. Tracking protocol can be found here: http://icy.bioimageanalysis.org/protocol/detection-with-cluster-un-mixing-and-tracking-of-neurons-with-emc2/ and is also directly accessible through the search bar of the Icy software (see step-by-step Supplementary Icy tutorial).
Tested tracking algorithms in manual validation.
| Name | Local association of detected particles | Elastic Motion Correction? | Gap closing | % match |
|---|---|---|---|---|
|
| Bayesian (eMHT) | No | Manual | 100% (g |
|
| Bayesian (eMHT) | Yes | GDM | 90.5% |
|
| Global distance minimization (GDM) | No | GDM | 54.6% |
| Bayesian (eMHT) | No | GDM | 54.3% |
Fig 3Testing EMC2 robustness with synthetic simulations.
For each simulated type of motion (confined diffusion (a), linear motion (b) and “Hydra-like” elastic deformation (c)), we simulated the stochastic firing of neuronal ensembles and corresponding fluorescence dynamics in synthetic time-lapse sequences (see Materials and Methods for details). We then compared the performances of EMC2 (blue) with TrackMate (no motion correction (red) or linear motion correction (magenta)). P-values are obtained with the Wilcoxon rank sum test over n = 10 simulations in each case. (d-e) Using “Hydra-like” synthetic deformation, we measured the accuracy of EMC2 for increasing proportion of stable (i.e. non-blinking) particles (neuronal cells) and increasing number of simulated particles. (f) After having estimated the deformation-field in three different animals (animal 1 (black), 4 (blue) and 6 (green)), we measured the accuracy of EMC2 for simulated sequences with increasing length (25, 50, 100 and 240 seconds. Imaging and simulations were performed at 10 Hz). For comparison purposes, the performance of TrackMate algorithm for 25 seconds (animal 1), extracted from (c), is shown.
Results of synthetic simulations (Hydra-like deformation, increasing length).
| 250 frames (25 s.) | 500 frames (50 s.) | 1000 frames (100 s.) | 2400 frames (240 s.) | |||||
|---|---|---|---|---|---|---|---|---|
|
|
|
|
| |||||
|
| 98.6±0.3% | 500.4±0.2 | 87.5±0.8% | 511.7±1.0 | 83.8±1.8% | 512.0±3.1 | 67.4±4.1% | 538.8±8.0 |
|
| 98.0±0.2% | 503.5±0.4 | 95.9±0.4% | 507.9±1.1 | 88.7±1.2% | 521.5±2.6 | 66.7±2.5% | 571.9±8.5 |
|
| 97.8±0.2% | 502.9±0.7 | 96.9±0.3% | 505.6±0.7 | 92.0±1.3% | 515.7±2.3 | 81.7±1.9% | 540.7±5.4 |
Results of statistical extraction of neuronal ensembles in Hydra (n = 8 animals).
|
|
|
|
|
|
|
|
|
|---|---|---|---|---|---|---|---|
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
| |||
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
|
Fig 4Monitoring the activity of individual neurons in two-photon calcium imaging of mouse visual cortex with EMC2.
a- Two-photon calcium imaging of single neuron activity in visual cortex of awake mice is performed at Day 1, Day 2 and Day 46 during 5 minutes at 12.3 Hz. Tracking of neuron positions is performed with EMC2 and reveals an important turn-over of active neurons across days. Examples of neurons that are active at Day 1, Day 2 or Day 46 are respectively highlighted with red, green or blue arrows. Neurons active at Day 1&2 are highlighted with yellow arrows, at Day 2&46 with cyan arrows, and at Day 1,2&46 with white arrows. The median number of active neurons each day is also plotted (n = 4 animals). The number of neurons that are active from Day 1, 2 or 3 are respectively represented in red, green or blue. b- Single neuron trajectories can be modeled with confined stochastic motion. Two example trajectories are shown (green & blue trajectories) with a maximum excursion distance of ~ 4 pixels. Boxplots of single neuron displacement between two consecutive frames, and maximum excursion distance (in pixels) are plotted (n = 590 trajectories).
Fig 5Neuron tracking and mapping of neuronal ensembles in behaving Hydra.
a- Calcium imaging of single neuron activity in behaving Hydra. The images and analysis of the 3rd movie of animal 1 are given as representative examples. b- Single neuron tracks and fluorescence intensity are obtained with EMC2 algorithm. c- For each neuron, spikes are extracted from fluorescence traces. Peaks of activity (highlighted with red stars) correspond to significant co-activity of individual neurons (sum of individual activities (solid red line) > statistical threshold (dashed red line), p = 0.001 see Materials and Methods). Each peak putatively corresponds to the activation of one neuronal ensemble. d- Similarity between activity peaks is computed using the identities of individual neurons that are firing at each peak (see Materials and Methods). e- The optimal number of peak classes (that putatively corresponds to the number of neuronal ensembles) is computed using the Silhouette index on k-means clustering of the similarity matrix (see Material and Methods). Median fluorescence trace of each neuronal ensemble and corresponding activity peaks are shown. The classification of individual neurons in each ensemble is determined based on their firing at ensemble peaks (see Materials and Methods). f- Individual neurons of each ensemble can be dynamically mapped in the original time-lapse sequence.
Parameters used for synthetic simulations.
| Parameters |
|
|
|
|
|
|
|
|
|
|
|
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Total number of neurons | % of non-firing spots | Number of neuron groups | Individual firing rate | Amplitude | Fluorescence decay time constant | Decay power | Median rising time | Rising time constant | St. Dev. of the PSF | St. Dev. of the Gaussian noise | Poisson background | Signal-to-noise ratio |
|
| 150 | 20% | 10 | 0.01 frame-1 | 100 | 3 frames | 1 | 1 frame | 0.5 frames | 1 pixel | 5 | 10 | ≈3 |
|
| 500 | 20% | 10 | 0.0002 frame-1 | 100 | 15 frames | 2 | 2 frames | 0.5 frames | 1 pixel | 5 | 10 | ≈3 |