We used the MATLAB (Mathworks, Natick, MA) implementation of the CaImAn software package (Giovannucci et al., 2019) for motion correction, automatic identification of regions of interest (ROIs) and deconvolution of neural activity from fluorescence traces. To remove motion artifact from the calcium imaging videos, we first did rigid image registration then non-rigid image registration. For ROI identification, the maximum number of ROIs and the average cell size for a given field of view (FOV) were estimated by examining representative images in ImageJ. Overlapping ROIs were excluded. Signal contribution from the surrounding neuropil was removed using the FISSA toolbox (Keemink et al., 2018). Neural activity was then deconvolved from the neuropil-decontaminated fluorescence traces using the OASIS algorithm (Friedrich et al., 2017). This produced an event train which preserved both the time and amplitude of inferred calcium transient events. In some analyses, the presence/absence of calcium transient events (neural events) was used; integrating the number of such events over a fixed time window, and dividing by the length of the window yields the neural event rate (units events/s). In other analyses, we took into account the amplitude of events; in the absence of per-cell calibration to true spike counts, we consider the units of the amplitude of this event train to be (dimensionless) ΔF/F, inherited from the original time series extracted from each ROI. Integrating the amplitude of such events over a fixed time window and dividing by the length of the window yields the neural activity rate (units ΔF/F.s−1).
To track cells across multiple imaging sessions (see Supplementary Figure 2), we motion-corrected images from different sessions using the motion-corrected image from one session as a template. We then temporally concatenated the videos from different sessions and ran the ROI segmentation algorithm on the concatenated video. For calcium images in the open arena, ROIs across imaging sessions were registered using the CaImAn ROI registration algorithm. ROIs were shifted by registering the templates from individual imaging sessions.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.