Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2018 Feb 22;8(1):3493.
doi: 10.1038/s41598-018-21640-2.

FISSA: A neuropil decontamination toolbox for calcium imaging signals

Affiliations

FISSA: A neuropil decontamination toolbox for calcium imaging signals

Sander W Keemink et al. Sci Rep. .

Abstract

In vivo calcium imaging has become a method of choice to image neuronal population activity throughout the nervous system. These experiments generate large sequences of images. Their analysis is computationally intensive and typically involves motion correction, image segmentation into regions of interest (ROIs), and extraction of fluorescence traces from each ROI. Out of focus fluorescence from surrounding neuropil and other cells can strongly contaminate the signal assigned to a given ROI. In this study, we introduce the FISSA toolbox (Fast Image Signal Separation Analysis) for neuropil decontamination. Given pre-defined ROIs, the FISSA toolbox automatically extracts the surrounding local neuropil and performs blind-source separation with non-negative matrix factorization. Using both simulated and in vivo data, we show that this toolbox performs similarly or better than existing published methods. FISSA requires only little RAM, and allows for fast processing of large datasets even on a standard laptop. The FISSA toolbox is available in Python, with an option for MATLAB format outputs, and can easily be integrated into existing workflows. It is available from Github and the standard Python repositories.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing interests.

Figures

Figure 1
Figure 1
FISSA toolbox overview. (A) Schematic of a generic calcium imaging data analysis workflow. (B) Schematic of the four main steps of the FISSA toolbox workflow. Given a predefined region of interest (ROI), the local neuropil region is defined by expanding the ROI (white shape) alternately in the cardinal and diagonal directions (steps i to iv), until the surrounding area (blue area) is four times the ROI area. The resulting neuropil region is split into four subregions (regions 2, 3, 4, and 5). The signals from each of these regions are separated using non-negative matrix factorization (NMF), and the somatic signal is identified. (C) Schematic representation of blind source separation in FISSA. Left: Model of a somatic signal (blue) contaminated by two types of sources: the surrounding neuropil (orange), and an overlapping soma (purple). Middle: The measured signals in the somatic ROI (region 1) and in the surrounding neuropil (regions 2 and 3) will each be a mix of the three underlying source signals shown in the left panel. Right: NMF separates the mixed signals, recovering the original source signals. From these demixed components the one that best matches the measured ROI signal, relative to the neuropil regions, is identified as the somatic signal.
Figure 2
Figure 2
Comparison of FISSA performance with other decontamination methods on simulated calcium imaging data. Rows A, B, and C illustrate three cases with increasing levels of contamination. (A)(i) Image of a region containing a single doughnut-shaped cell firing at 0.5 Hz and a fluctuating neuropil background. The image is an average across all 12000 frames (120 s). The ROI is indicated in blue. (ii) Example fluorescence traces for the blue ROI indicated in panel A(i): average measured signal of the ROI (blue trace, ‘Measured’), the average surrounding neuropil signal (red trace), and the signals after neuropil decontamination by three different methods (subtraction in yellow, cNMF in grey, and FISSA in green). The uncontaminated source signal (as defined by the simulation) is shown in black. The cNMF trace has a lower noise level as the cNMF algorithm also includes smoothing. (iii) Average Pearson correlations between the ROI source signal and the extracted ROI signal: before decontamination (first column, ‘Measured’, 0.723), and after each decontamination method (neuropil subtraction, cNMF, and FISSA; 0.977, 0.981, and 0.984 respectively). Error bars indicate standard deviation. *p < 0.05; **p < 0.005; n.s.: not significant (p > 0.05); Wilcoxon signed-rank test, n = 10 simulations of 120 s each (with different background neuropil signals, spike times, and photon noise). FISSA vs: measured p = 0.0033, subtraction p = 0.0409, cNMF p = 0.0911. (B) As panel A, but the blue ROI is additionally contaminated by an overlapping cell firing at 0.3 Hz (indicated by the purple outline). Average values for the four methods are 0.576, 0.912, 0.975, and 0.984 respectively. FISSA vs: measured p = 0.0033, subtraction p = 0.0033, cNMF p = 0.0033. (C) As panel B, but an additional bright localized signal firing at 0.3 Hz was added (smaller purple outline). Average values for the four methods are 0.585, 0.816, 0.959, and 0.984 respectively. FISSA vs: measured p = 0.0051, subtraction p = 0.0051, cNMF p = 0.0051.
Figure 3
Figure 3
FISSA performance for different simulated data parameters and user-adjustable FISSA parameters, for the signal of the cell of interest from the case in Fig. 2C. (A) Correlations between the source and extracted signals before neuropil decontamination (‘Measured’) and after each decontamination method (neuropil subtraction, cNMF, and FISSA) for different simulation parameters. (i) Correlations for changes in the firing rate of the cell of interest (0.1 to 1.7 Hz, with steps of 0.2 Hz, default is 0.3 Hz). (ii) Correlations for changes in calcium transient magnitude (parameter A, see Eq. 9. 0.06 to 0.54 with steps of 0.06, default is 0.3). (iii) Correlations for changes in imaging framerate (downsampling of 100 Hz initial data to lower frame rates: by 50, 40, 30, 20, 10, 5, 4, 3, 2, and 1). (iv) Correlations for changes in cell shape, by changing the parameter ρ, see Eq. 10 (steps of 5 from 0 to 45, default is 0). The insets show example cell shapes for different ρ values. (B) Correlations between the source and extracted signals against different user-adjustable FISSA parameters (x-axes). (i) Number of neuropil subregions while keeping the total area constant, at four times the ROI area. (ii) Area of the neuropil subregions relative to the central ROI (0.025 for the smallest area, steps of 0.5 from 0.5 to 4), for four subregions. (iii) NMF parameter α (with steps of 0.1). (C) The effect of suboptimal ROI selection, by varying the threshold at which a cell mask is defined (Parameter Tmask in Eq. 14. 0.1 to 1.1 with steps of 0.1, default is 0.5). The insets show the same central cell with the outlines of the mask used for three example thresholds. All panels show the average values over 10 simulations; shaded areas indicate standard error.
Figure 4
Figure 4
Comparison of neuropil decontamination methods on in vivo two-photon calcium imaging data from layer 2/3 neurons in mouse primary visual cortex (data from,). (A) Example measured and decontaminated traces of fluorescence changes for cell 20120627_cell4 (frames 14400 to 19200). All traces were low-pass filtered at 5 Hz. The black ticks on the bottom row indicate the spikes measured electrophysiologically, with the number of overlapping spikes indicated below. (B) Correlations between the calcium transients inferred from the recorded spikes (see Methods), and the calcium signals estimated by each method. The data points correspond to GCaMP6s (circles) and GCaMP6f (squares) cells from the dataset,. **p < 0.005; n.s.: not significant (p > 0.05); Wilcoxon signed-rank test, n = 20 cells, FISSA vs measured: p = 0.0006, FISSA vs subtraction p = 0.2959, FISSA vs cNMF p = 0.4330.
Figure 5
Figure 5
Impact of neuropil decontamination on neuronal responses measured with two-photon calcium imaging, in V1 layer 2/3 of awake behaving mice. Neurons were labelled with GCaMP6f. The effect of locomotion was quantified for each neuron by the locomotion modulation index (LMI). (A) An example field of view with somatic ROIs coloured by the LMI value obtained either before neuropil decontamination (‘Measured’) or after decontamination. The ROIs for the measured, subtraction, and FISSA methods are identical and were defined by hand. For the cNMF method the ROIs are presented as detected by the algorithm. LMI values were calculated for periods of visual stimulation with oriented gratings (10 to 20 trials per field of view, 60 s/trial). (B) The distributions of LMI values across all layer 2/3 cells in eight mice, before (‘Measured’) and after each decontamination method. (C) The distributions of median LMI values for the eight mice, before and after decontamination. *p < 0.05; n.s.: not significant (p > 0.05); Wilcoxon signed-rank test, n = 8 mice, FISSA vs measured: p = 0.0117, FISSA vs subtraction p = 0.0117, FISSA vs cNMF p = 0.0687, subtraction vs cNMF p = 0.0687.
Figure 6
Figure 6
Simulated data generation. For each simulated neuron, a Poisson spike train is generated. The corresponding calcium indicator dynamics are simulated using GCaMP6 rise and decay times, and a nonlinearity. Next, the calcium traces are associated with a spatial kernel consisting of a doughnut shape mask (that models the cellular soma’s structure) and a Gaussian that simulates signal spread. Additionally, noisy background fluctuations are generated which vary spatially through a spatial kernel. All resulting signals are summed, and passed through a Poisson generation process to simulate photon emission, resulting in the final image sequence.

Similar articles

Cited by

References

    1. Huber D, et al. Multiple dynamic representations in the motor cortex during sensorimotor learning. Nature. 2012;484:473–478. doi: 10.1038/nature11039. - DOI - PMC - PubMed
    1. Margolis DJ, et al. Reorganization of cortical population activity imaged throughout long-term sensory deprivation. Nat Neurosci. 2012;15:1539–1546. doi: 10.1038/nn.3240. - DOI - PubMed
    1. Chen T, et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature. 2013;499:295–300. doi: 10.1038/nature12354. - DOI - PMC - PubMed
    1. Pakan J, et al. Behavioural state modulation of inhibition is context-dependent and cell-type specific in mouse V1. Elife. 2016;5:e14985. doi: 10.7554/eLife.14985. - DOI - PMC - PubMed
    1. Attinger A, Wang B, Keller G. Visuomotor coupling shapes the functional development of mouse visual cortex. Cell. 2017;169:1291–1302. doi: 10.1016/j.cell.2017.05.023. - DOI - PubMed

Publication types

LinkOut - more resources