scholarly journals CalmAn: An open source tool for scalable Calcium Imaging data Analysis

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.

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.


2017 ◽  
Author(s):  
Stephanie Reynolds ◽  
Therese Abrahamsson ◽  
P. Jesper Sjöström ◽  
Simon R. Schultz ◽  
Pier Luigi Dragotti

AbstractIn recent years, the development of algorithms to detect neuronal spiking activity from two-photon calcium imaging data has received much attention. Meanwhile, few researchers have examined the metrics used to assess the similarity of detected spike trains with the ground truth. We highlight the limitations of the two most commonly used metrics, the spike train correlation and success rate, and propose an alternative, which we refer to as CosMIC. Rather than operating on the true and estimated spike trains directly, the proposed metric assesses the similarity of the pulse trains obtained from convolution of the spike trains with a smoothing pulse. The pulse width, which is derived from the statistics of the imaging data, reflects the temporal tolerance of the metric. The final metric score is the size of the commonalities of the pulse trains as a fraction of their average size. Viewed through the lens of set theory, CosMIC resembles a continuous Sørensen-Dice coefficient — an index commonly used to assess the similarity of discrete, presence/absence data. We demonstrate the ability of the proposed metric to discriminate the precision and recall of spike train estimates. Unlike the spike train correlation, which appears to reward overestimation, the proposed metric score is maximised when the correct number of spikes have been detected. Furthermore, we show that CosMIC is more sensitive to the temporal precision of estimates than the success rate.


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.


2018 ◽  
Vol 30 (10) ◽  
pp. 2726-2756 ◽  
Author(s):  
Stephanie Reynolds ◽  
Therese Abrahamsson ◽  
Per Jesper Sjöström ◽  
Simon R. Schultz ◽  
Pier Luigi Dragotti

In recent years, the development of algorithms to detect neuronal spiking activity from two-photon calcium imaging data has received much attention, yet few researchers have examined the metrics used to assess the similarity of detected spike trains with the ground truth. We highlight the limitations of the two most commonly used metrics, the spike train correlation and success rate, and propose an alternative, which we refer to as CosMIC. Rather than operating on the true and estimated spike trains directly, the proposed metric assesses the similarity of the pulse trains obtained from convolution of the spike trains with a smoothing pulse. The pulse width, which is derived from the statistics of the imaging data, reflects the temporal tolerance of the metric. The final metric score is the size of the commonalities of the pulse trains as a fraction of their average size. Viewed through the lens of set theory, CosMIC resembles a continuous Sørensen-Dice coefficient—an index commonly used to assess the similarity of discrete, presence/absence data. We demonstrate the ability of the proposed metric to discriminate the precision and recall of spike train estimates. Unlike the spike train correlation, which appears to reward overestimation, the proposed metric score is maximized when the correct number of spikes have been detected. Furthermore, we show that CosMIC is more sensitive to the temporal precision of estimates than the success rate.


2020 ◽  
Author(s):  
Daniel A. Cantu ◽  
Bo Wang ◽  
Michael W. Gongwer ◽  
Cynthia X. He ◽  
Anubhuti Goel ◽  
...  

AbstractFluorescence calcium imaging using a range of microscopy approaches, such as 2-photon excitation or head-mounted ‘miniscopes’, is one of the preferred methods to record neuronal activity and glial signals in various experimental settings, including acute brain slices, brain organoids, and behaving animals. Because changes in the fluorescence intensity of genetically encoded or chemical calcium indicators correlate with action potential firing in neurons, data analysis is based on inferring such spiking from changes in pixel intensity values across time within different regions of interest. However, the algorithms necessary to extract biologically relevant information from these fluorescent signals are complex and require significant expertise in programming to develop robust analysis pipelines. For decades, the only way to perform these analyses was for individual laboratories to write their own custom code. These routines were typically not well annotated and lacked intuitive graphical user interfaces (GUIs), which made it difficult for scientists in other laboratories to adopt them. Although the panorama is changing with recent tools like CaImAn, Suite2P and others, there is still a barrier for many laboratories to adopt these packages, especially for potential users without sophisticated programming skills. As 2-photon microscopes are becoming increasingly affordable, the bottleneck is no longer the hardware, but the software used to analyze the calcium data in an optimal manner and consistently across different groups. We addressed this unmet need by incorporating recent software solutions for motion correction, segmentation, signal extraction and deconvolution of calcium imaging data into an open-source, easy to use, GUI-based, intuitive and automated data analysis software, which we named EZcalcium.


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.


2018 ◽  
Author(s):  
Sukhendu Das ◽  
Jaikishan Jayakumar ◽  
Samik Banerjee ◽  
Janani Ramaswamy ◽  
Venu Vangala ◽  
...  

AbstractThere is a need in modern neuroscience for accurate and automated image processing techniques for analyzing the large volume of neuroanatomical imaging data. Even at light microscopic levels, imaging mouse brains produces individual data volumes in the TerraByte range. A fundamental task involves the detection and quantification of objects of a given type, e.g. neuronal nuclei or somata, in brain scan dataset. Traditionally this quantification has been performed by human visual inspection with high accuracy, that is not scalable. When modern automated CNN and SVM-based methods are used to solve this classification problem, they achieve accuracy levels that range between 85 – 92%. However, higher rates of precision and recall that are close to that of human performance are necessary. In this paper, we describe an unsupervised, iterative algorithm, which provides a high performance for a specific problem of detecting Green Fluorescent Protein labeled nuclei in 2D scans of mouse brains. The algorithm judiciously combines classical computer vision techniques and is focused on the complex problem of decomposing strong overlapped objects of interest. Our proposed technique uses feature detection methods on ridge lines over distance transformation of the image and an arc based iterative spatial-filling method to solve the problem. We demonstrate our results on mouse brain dataset of Gigabyte resolution and compare it with manual annotation of the brains. Our results show that an aptly designed CV algorithm with classical feature extractors when tailored to this problem of interest achieves near-ideal human-like performance. Quantitative comparative analysis, using manually annotated ground truth, reveals that our approach performs better on mouse brain scans than general purpose machine learning (including deep CNN) methods.


2017 ◽  
Author(s):  
Stephanie Reynolds ◽  
Therese Abrahamsson ◽  
Renaud Schuck ◽  
P. Jesper Sjöström ◽  
Simon R. Schultz ◽  
...  

AbstractWe present an algorithm for detecting the location of cells from two-photon calcium imaging data. In our framework, multiple coupled active contours evolve, guided by a model-based cost function, to identify cell boundaries. An active contour seeks to partition a local region into two subregions, a cell interior and ex-terior, in which all pixels have maximally ‘similar’ time courses. This simple, local model allows contours to be evolved predominantly independently. When contours are sufficiently close, their evolution is coupled, in a manner that permits overlap. We illustrate the ability of the proposed method to demix overlapping cells on real data. The proposed framework is flexible, incorporating no prior information regarding a cell’s morphology or stereotypical temporal activity, which enables the detection of cells with diverse properties. We demonstrate algorithm performance on a challenging mouse in vitro dataset, containing synchronously spiking cells, and a manually labelled mouse in vivo dataset, on which ABLE achieves a 67.5% success rate.Significance statementTwo-photon calcium imaging enables the study of brain activity during learning and behaviour at single-cell resolution. To decode neuronal spiking activity from the data, algorithms are first required to detect the location of cells in the video. It is still common for scientists to perform this task manually, as the heterogeneity in cell shape and frequency of cellular overlap impede automatic segmentation algorithms. We developed a versatile algorithm based on a popular image segmentation approach (the Level Set Method) and demonstrated its capability to overcome these challenges. We include no assumptions on cell shape or stereotypical temporal activity. This lends our framework the flexibility to be applied to new datasets with minimal adjustment.


2019 ◽  
Author(s):  
Julien Denis ◽  
Robin F. Dard ◽  
Eleonora Quiroli ◽  
Rosa Cossart ◽  
Michel A. Picardo

AbstractTwo-photon calcium imaging is now widely used to infer neuronal dynamics from changes in fluorescence of an indicator. However, state of the art computational tools are not optimized for the reliable detection of fluorescence transients from highly synchronous neurons located in densely packed regions such as the CA1 pyramidal layer of the hippocampus during early postnatal stages of development. Indeed, the latest analytical tools often lack proper benchmark measurements. To meet this challenge, we first developed a graphical user interface allowing for a precise manual detection of all calcium transients from imaged neurons based on the visualization of the calcium imaging movie. Then, we analyzed the movies using a convolutional neural network with an attention process and a bidirectional long-short term memory network. This method is able to reach human performance and offers a better F1 score (harmonic mean of sensitivity and precision) than CaImAn to infer neural activity in the developing CA1 without any user intervention. It also enables automatically identifying activity originating from GABAergic neurons. Overall, DeepCINAC offers a simple, fast and flexible open-source toolbox for processing a wide variety of calcium imaging datasets while providing the tools to evaluate its performance.Significance statementInferring neuronal activity from calcium imaging data remains a challenge due to the difficulty in obtaining a ground truth using patch clamp recordings and the problem of finding optimal tuning parameters of inference algorithms. DeepCINAC offers a flexible, fast and easy-to-use toolbox to infer neuronal activity from any kind of calcium imaging dataset through visual inspection.


Sign in / Sign up

Export Citation Format

Share Document