Abstract

Epifluorescence miniature microscopes ('miniscopes') are widely used for in vivo calcium imaging of neural population activity. Imaging data is typically collected during a behavioral task and stored for later offline analysis, but emerging techniques for online imaging can support novel closed-loop experiments in which neural population activity is decoded in real time to trigger neurostimulation or sensory feedback. To achieve short feedback latencies, online imaging systems must be optimally designed to maximize computational speed and efficiency while minimizing errors in population decoding. Here we introduce DeCalciOn, an open-source device for real-time imaging and population decoding of in vivo calcium signals that is hardware compatible with all miniscopes that use the UCLA Data Acquisition (DAQ) interface. DeCalciOn performs online motion stabilization, neural enhancement, calcium trace extraction, and decoding of up to 1024 traces per frame at latencies of <50 ms after fluorescence photons arrive at the miniscope image sensor. We show that DeCalciOn can accurately decode the position of rats (n=12) running on a linear track from calcium fluorescence in the hippocampal CA1 layer, and can categorically classify behaviors performed by rats (n=2) during an instrumental task from calcium fluorescence in orbitofrontal cortex (OFC). DeCalciOn achieves high decoding accuracy at short latencies using innovations such as field-programmable gate array (FPGA) hardware for real time image processing and contour-free methods to efficiently extract calcium traces from sensor images. In summary, our system offers an affordable plug-and-play solution for real-time calcium imaging experiments in behaving animals.

Data availability

All hardware, software, and firmware are openly available through miniscope.org and at github.com/zhe-ch/ACTEV.

The following data sets were generated

Article and author information

Author details

  1. Zhe Chen

    Department of Electrical and Computer Engineering, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
  2. Garrett J Blair

    Department of Psychology, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0003-2724-8914
  3. Changliang Guo

    David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
  4. Jim Zhou

    Department of Electrical and Computer Engineering, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
  5. Juan-Luis Romero-Sosa

    Department of Psychology, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
  6. Alicia Izquierdo

    Department of Psychology, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    Alicia Izquierdo, Reviewing editor, eLife.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0001-9897-2091
  7. Peyman Golshani

    David Geffen School of Medicine, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
  8. Jason Cong

    Department of Electrical and Computer Engineering, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
  9. Daniel Aharoni

    Department of Neurology, University of California, Los Angeles, Los Angeles, United States
    Competing interests
    No competing interests declared.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0003-4931-8514
  10. Hugh T Blair

    Department of Psychology, University of California, Los Angeles, Los Angeles, United States
    For correspondence
    tadblair@g.ucla.edu
    Competing interests
    No competing interests declared.
    ORCID icon "This ORCID iD identifies the author of this article:" 0000-0001-8256-5109

Funding

NSF NeuroNex (1707408)

  • Peyman Golshani
  • Jason Cong
  • Daniel Aharoni
  • Hugh T Blair

The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Reviewing Editor

  1. Brice Bathellier, CNRS, France

Ethics

Animal experimentation: This study was performed in strict accordance with the recommendations in the Guide for the Care and Use of Laboratory Animals of the National Institutes of Health. All of the animals were handled according to approved institutional animal care and use committee (IACUC) protocols (#2017-038) of the University of California Los Angeles. The protocol was approved by the Committee on the Ethics of Animal Experiments of UCLA. All surgery was performed under deep isoflurane anesthesia, and every effort was made to minimize suffering, including administration of pre- and post-surgical analgesia.

Version history

  1. Preprint posted: February 2, 2022 (view preprint)
  2. Received: March 3, 2022
  3. Accepted: January 23, 2023
  4. Accepted Manuscript published: January 24, 2023 (version 1)
  5. Version of Record published: February 8, 2023 (version 2)

Copyright

© 2023, Chen et al.

This article is distributed under the terms of the Creative Commons Attribution License permitting unrestricted use and redistribution provided that the original author and source are credited.

Metrics

  • 2,582
    views
  • 309
    downloads
  • 5
    citations

Views, downloads and citations are aggregated across all versions of this paper published by eLife.

Download links

A two-part list of links to download the article, or parts of the article, in various formats.

Downloads (link to download the article as PDF)

Open citations (links to open the citations from this article in various online reference manager services)

Cite this article (links to download the citations from this article in formats compatible with various reference manager tools)

  1. Zhe Chen
  2. Garrett J Blair
  3. Changliang Guo
  4. Jim Zhou
  5. Juan-Luis Romero-Sosa
  6. Alicia Izquierdo
  7. Peyman Golshani
  8. Jason Cong
  9. Daniel Aharoni
  10. Hugh T Blair
(2023)
A hardware system for real time decoding of in vivo calcium imaging data
eLife 12:e78344.
https://doi.org/10.7554/eLife.78344

Share this article

https://doi.org/10.7554/eLife.78344

Further reading

    1. Computational and Systems Biology
    2. Evolutionary Biology
    Ryan T Bell, Harutyun Sahakyan ... Eugene V Koonin
    Research Article

    A comprehensive census of McrBC systems, among the most common forms of prokaryotic Type IV restriction systems, followed by phylogenetic analysis, reveals their enormous abundance in diverse prokaryotes and a plethora of genomic associations. We focus on a previously uncharacterized branch, which we denote coiled-coil nuclease tandems (CoCoNuTs) for their salient features: the presence of extensive coiled-coil structures and tandem nucleases. The CoCoNuTs alone show extraordinary variety, with three distinct types and multiple subtypes. All CoCoNuTs contain domains predicted to interact with translation system components, such as OB-folds resembling the SmpB protein that binds bacterial transfer-messenger RNA (tmRNA), YTH-like domains that might recognize methylated tmRNA, tRNA, or rRNA, and RNA-binding Hsp70 chaperone homologs, along with RNases, such as HEPN domains, all suggesting that the CoCoNuTs target RNA. Many CoCoNuTs might additionally target DNA, via McrC nuclease homologs. Additional restriction systems, such as Type I RM, BREX, and Druantia Type III, are frequently encoded in the same predicted superoperons. In many of these superoperons, CoCoNuTs are likely regulated by cyclic nucleotides, possibly, RNA fragments with cyclic termini, that bind associated CARF (CRISPR-Associated Rossmann Fold) domains. We hypothesize that the CoCoNuTs, together with the ancillary restriction factors, employ an echeloned defense strategy analogous to that of Type III CRISPR-Cas systems, in which an immune response eliminating virus DNA and/or RNA is launched first, but then, if it fails, an abortive infection response leading to PCD/dormancy via host RNA cleavage takes over.

    1. Computational and Systems Biology
    Skander Kazdaghli, Iordanis Kerenidis ... Philip Teare
    Research Article

    Imputing data is a critical issue for machine learning practitioners, including in the life sciences domain, where missing clinical data is a typical situation and the reliability of the imputation is of great importance. Currently, there is no canonical approach for imputation of clinical data and widely used algorithms introduce variance in the downstream classification. Here we propose novel imputation methods based on determinantal point processes (DPP) that enhance popular techniques such as the multivariate imputation by chained equations and MissForest. Their advantages are twofold: improving the quality of the imputed data demonstrated by increased accuracy of the downstream classification and providing deterministic and reliable imputations that remove the variance from the classification results. We experimentally demonstrate the advantages of our methods by performing extensive imputations on synthetic and real clinical data. We also perform quantum hardware experiments by applying the quantum circuits for DPP sampling since such quantum algorithms provide a computational advantage with respect to classical ones. We demonstrate competitive results with up to 10 qubits for small-scale imputation tasks on a state-of-the-art IBM quantum processor. Our classical and quantum methods improve the effectiveness and robustness of clinical data prediction modeling by providing better and more reliable data imputations. These improvements can add significant value in settings demanding high precision, such as in pharmaceutical drug trials where our approach can provide higher confidence in the predictions made.