scholarly journals Online analysis of microendoscopic 1-photon calcium imaging data streams

2021 ◽  
Vol 17 (1) ◽  
pp. e1008565
Author(s):  
Johannes Friedrich ◽  
Andrea Giovannucci ◽  
Eftychios A. Pnevmatikakis

In vivo calcium imaging through microendoscopic lenses enables imaging of neuronal populations deep within the brains of freely moving animals. Previously, a constrained matrix factorization approach (CNMF-E) has been suggested to extract single-neuronal activity from microendoscopic data. However, this approach relies on offline batch processing of the entire video data and is demanding both in terms of computing and memory requirements. These drawbacks prevent its applicability to the analysis of large datasets and closed-loop experimental settings. Here we address both issues by introducing two different online algorithms for extracting neuronal activity from streaming microendoscopic data. Our first algorithm, OnACID-E, presents an online adaptation of the CNMF-E algorithm, which dramatically reduces its memory and computation requirements. Our second algorithm proposes a convolution-based background model for microendoscopic data that enables even faster (real time) processing. Our approach is modular and can be combined with existing online motion artifact correction and activity deconvolution methods to provide a highly scalable pipeline for microendoscopic data analysis. We apply our algorithms on four previously published typical experimental datasets and show that they yield similar high-quality results as the popular offline approach, but outperform it with regard to computing time and memory requirements. They can be used instead of CNMF-E to process pre-recorded data with boosted speeds and dramatically reduced memory requirements. Further, they newly enable online analysis of live-streaming data even on a laptop.

2020 ◽  
Author(s):  
Johannes Friedrich ◽  
Andrea Giovannucci ◽  
Eftychios A. Pnevmatikakis

AbstractIn-vivo calcium imaging through microendoscopic lenses enables imaging of neuronal populations deep within the brains of freely moving animals. Previously, a constrained matrix factorization approach (CNMF-E) has been suggested to extract single-neuronal activity from microendoscopic data. However, this approach relies on offline batch processing of the entire video data and is demanding both in terms of computing and memory requirements. These drawbacks prevent its applicability to the analysis of large datasets and closed-loop experimental settings. Here we address both issues by introducing two different online algorithms for extracting neuronal activity from streaming microendoscopic data. Our first algorithm presents an online adaptation of the CNMF-E algorithm, which dramatically reduces its memory and computation requirements. Our second algorithm proposes a convolution-based background model for microendoscopic data that enables even faster (real time) processing on GPU hardware. Our approach is modular and can be combined with existing online motion artifact correction and activity deconvolution methods to provide a highly scalable pipeline for microendoscopic data analysis. We apply our algorithms on two previously published typical experimental datasets and show that they yield similar high-quality results as the popular offline approach, but outperform it with regard to computing time and memory requirements.Author summaryCalcium imaging methods enable researchers to measure the activity of genetically-targeted large-scale neuronal subpopulations. Whereas previous methods required the specimen to be stable, e.g. anesthetized or head-fixed, new brain imaging techniques using microendoscopic lenses and miniaturized microscopes have enabled deep brain imaging in freely moving mice.However, the very large background fluctuations, the inevitable movements and distortions of imaging field, and the extensive spatial overlaps of fluorescent signals complicate the goal of efficiently extracting accurate estimates of neural activity from the observed video data. Further, current activity extraction methods are computationally expensive due to the complex background model and are typically applied to imaging data after the experiment is complete. Moreover, in some scenarios it is necessary to perform experiments in real-time and closed-loop – analyzing data on-the-fly to guide the next experimental steps or to control feedback –, and this calls for new methods for accurate real-time processing. Here we address both issues by adapting a popular extraction method to operate online and extend it to utilize GPU hardware that enables real time processing. Our algorithms yield similar high-quality results as the original offline approach, but outperform it with regard to computing time and memory requirements. Our results enable faster and scalable analysis, and open the door to new closed-loop experiments in deep brain areas and on freely-moving preparations.


eLife ◽  
2019 ◽  
Vol 8 ◽  
Author(s):  
Andrea Giovannucci ◽  
Johannes Friedrich ◽  
Pat Gunn ◽  
Jérémie Kalfon ◽  
Brandon L Brown ◽  
...  

Advances in fluorescence microscopy enable monitoring larger brain areas in-vivo with finer time resolution. The resulting data rates require reproducible analysis pipelines that are reliable, fully automated, and scalable to datasets generated over the course of months. We present CaImAn, an open-source library for calcium imaging data analysis. CaImAn provides automatic and scalable methods to address problems common to pre-processing, including motion correction, neural activity identification, and registration across different sessions of data collection. It does this while requiring minimal user intervention, with good scalability on computers ranging from laptops to high-performance computing clusters. CaImAn is suitable for two-photon and one-photon imaging, and also enables real-time analysis on streaming data. To benchmark the performance of CaImAn we collected and combined a corpus of manual annotations from multiple labelers on nine mouse two-photon datasets. We demonstrate that CaImAn achieves near-human performance in detecting locations of active neurons.


2019 ◽  
Author(s):  
Guillaume Etter ◽  
Frederic Manseau ◽  
Sylvain Williams

AbstractUnderstanding the role of neuronal activity in cognition and behavior is a key question in neuroscience. Previously, in vivo studies have typically inferred behavior from electrophysiological data using probabilistic approaches including Bayesian decoding. While providing useful information on the role of neuronal subcircuits, electrophysiological approaches are often limited in the maximum number of recorded neurons as well as their ability to reliably identify neurons over time. This can be particularly problematic when trying to decode behaviors that rely on large neuronal assemblies or rely on temporal mechanisms, such as a learning task over the course of several days. Calcium imaging of genetically encoded calcium indicators has overcome these two issues. Unfortunately, because calcium transients only indirectly reflect spiking activity and calcium imaging is often performed at lower sampling frequencies, this approach suffers from uncertainty in exact spike timing and thus activity frequency, making rate-based decoding approaches used in electrophysiological recordings difficult to apply to calcium imaging data. Here we describe a probabilistic framework that can be used to robustly infer behavior from calcium imaging recordings and relies on a simplified implementation of a naive Baysian classifier. Our method discriminates between periods of activity and periods of inactivity to compute probability density functions (likelihood and posterior), significance and confidence interval, as well as mutual information. We next devise a simple method to decode behavior using these probability density functions and propose metrics to quantify decoding accuracy. Finally, we show that neuronal activity can be predicted from behavior, and that the accuracy of such reconstructions can guide the understanding of relationships that may exist between behavioral states and neuronal activity.


2020 ◽  
Vol 14 ◽  
Author(s):  
Guillaume Etter ◽  
Frederic Manseau ◽  
Sylvain Williams

Understanding the role of neuronal activity in cognition and behavior is a key question in neuroscience. Previously, in vivo studies have typically inferred behavior from electrophysiological data using probabilistic approaches including Bayesian decoding. While providing useful information on the role of neuronal subcircuits, electrophysiological approaches are often limited in the maximum number of recorded neurons as well as their ability to reliably identify neurons over time. This can be particularly problematic when trying to decode behaviors that rely on large neuronal assemblies or rely on temporal mechanisms, such as a learning task over the course of several days. Calcium imaging of genetically encoded calcium indicators has overcome these two issues. Unfortunately, because calcium transients only indirectly reflect spiking activity and calcium imaging is often performed at lower sampling frequencies, this approach suffers from uncertainty in exact spike timing and thus activity frequency, making rate-based decoding approaches used in electrophysiological recordings difficult to apply to calcium imaging data. Here we describe a probabilistic framework that can be used to robustly infer behavior from calcium imaging recordings and relies on a simplified implementation of a naive Baysian classifier. Our method discriminates between periods of activity and periods of inactivity to compute probability density functions (likelihood and posterior), significance and confidence interval, as well as mutual information. We next devise a simple method to decode behavior using these probability density functions and propose metrics to quantify decoding accuracy. Finally, we show that neuronal activity can be predicted from behavior, and that the accuracy of such reconstructions can guide the understanding of relationships that may exist between behavioral states and neuronal activity.


2018 ◽  
Author(s):  
Andrea Giovannucci ◽  
Johannes Friedrich ◽  
Pat Gunn ◽  
Jérémie Kalfon ◽  
Sue Ann Koay ◽  
...  

AbstractAdvances in fluorescence microscopy enable monitoring larger brain areas in-vivo with finer time resolution. The resulting data rates require reproducible analysis pipelines that are reliable, fully automated, and scalable to datasets generated over the course of months. Here we present CaImAn, an open-source library for calcium imaging data analysis. CaImAn provides automatic and scalable methods to address problems common to pre-processing, including motion correction, neural activity identification, and registration across different sessions of data collection. It does this while requiring minimal user intervention, with good performance on computers ranging from laptops to high-performance computing clusters. CaImAn is suitable for two-photon and one-photon imaging, and also enables real-time analysis on streaming data. To benchmark the performance of CaImAn we collected a corpus of ground truth annotations from multiple labelers on nine mouse two-photon datasets. We demonstrate that CaImAn achieves near-human performance in detecting locations of active neurons.


2021 ◽  
Author(s):  
Alex A. Legaria ◽  
Julia A. Licholai ◽  
Alexxai V. Kravitz

AbstractFiber photometry recordings are commonly used as a proxy for neuronal activity, based on the assumption that increases in bulk calcium fluorescence reflect increases in spiking of the underlying neural population. However, this assumption has not been adequately tested. Here, using endoscopic calcium imaging in the striatum we report that the bulk fluorescence signal correlates weakly with somatic calcium signals, suggesting that this signal does not reflect spiking activity, but may instead reflect subthreshold changes in neuropil calcium. Consistent with this suggestion, the bulk fluorescence photometry signal correlated strongly with neuropil calcium signals extracted from these same endoscopic recordings. We further confirmed that photometry did not reflect striatal spiking activity with simultaneous in vivo extracellular electrophysiology and fiber photometry recordings in awake behaving mice. We conclude that the fiber photometry signal should not be considered a proxy for spiking activity in neural populations in the striatum.Significance statementFiber photometry is a technique for recording brain activity that has gained popularity in recent years due to it being an efficient and robust way to record the activity of genetically defined populations of neurons. However, it remains unclear what cellular events are reflected in the photometry signal. While it is often assumed that the photometry signal reflects changes in spiking of the underlying cell population, this has not been adequately tested. Here, we processed calcium imaging recordings to extract both somatic and non-somatic components of the imaging field, as well as a photometry signal from the whole field. Surprisingly, we found that the photometry signal correlated much more strongly with the non-somatic than the somatic signals. This suggests that the photometry signal most strongly reflects subthreshold changes in calcium, and not spiking. We confirmed this point with simultaneous fiber photometry and extracellular spiking recordings, again finding that photometry signals relate poorly to spiking in the striatum. Our results may change interpretations of studies that use fiber photometry as an index of spiking output of neural populations.


2018 ◽  
Author(s):  
Gal Mishne ◽  
Ronald R. Coifman ◽  
Maria Lavzin ◽  
Jackie Schiller

AbstractRecent advances in experimental methods in neuroscience enable measuring in-vivo activity of large populations of neurons at cellular level resolution. To leverage the full potential of these complex datasets and analyze the dynamics of individual neurons, it is essential to extract high-resolution regions of interest, while addressing demixing of overlapping spatial components and denoising of the temporal signal of each neuron. In this paper, we propose a data-driven solution to these challenges, by representing the spatiotemporal volume as a graph in the image plane. Based on the spectral embedding of this graph calculated across trials, we propose a new clustering method, Local Selective Spectral Clustering, capable of handling overlapping clusters and disregarding clutter. We also present a new nonlinear mapping which recovers the structural map of the neurons and dendrites, and global video denoising. We demonstrate our approach on in-vivo calcium imaging of neurons and apical dendrites, automatically extracting complex structures in the image domain, and denoising and demixing their time-traces.


Author(s):  
Stephanie Reynolds ◽  
Jon Oñativia ◽  
Simon R. Schultz ◽  
Pier Luigi Dragotti

2017 ◽  
Author(s):  
Eftychios A. Pnevmatikakis ◽  
Andrea Giovannucci

AbstractBackgroundMotion correction is a challenging pre-processing problem that arises early in the analysis pipeline of calcium imaging data sequences. The motion artifacts in two-photon microscopy recordings can be non-rigid, arising from the finite time of raster scanning and non-uniform deformations of the brain medium.New methodWe introduce an algorithm for fast Non-Rigid Motion Correction (NoRMCorre) based on template matching. NoRMCorre operates by splitting the field of view into overlapping spatial patches that are registered at a sub-pixel resolution for rigid translation against a continuously updated template. The estimated alignments are subsequently up-sampled to create a smooth motion field for each frame that can efficiently approximate non-rigid motion in a piecewise-rigid manner.Existing methodsExisting approaches either do not scale well in terms of computational performance or are targeted to motion artifacts arising from low speed scanning, whereas modern datasets with large field of view are more prone to non-rigid brain deformation issues.ResultsNoRMCorre can be run in an online mode resulting in comparable to or even faster than real time motion registration on streaming data. We evaluate the performance of the proposed method with simple yet intuitive metrics and compare against other non-rigid registration methods on two-photon calcium imaging datasets. Open source Matlab and Python code is also made available.ConclusionsThe proposed method and code provide valuable support to the community for solving large scale image registration problems in calcium imaging, especially when non-rigid deformations are present in the acquired data.


2013 ◽  
Vol 14 (S1) ◽  
Author(s):  
Olav Stetter ◽  
Javier Orlandi ◽  
Jordi Soriano ◽  
Demian Battaglia ◽  
Theo Geisel

Sign in / Sign up

Export Citation Format

Share Document