发布: 2026年11月05日第16卷第21期 DOI: 10.21769/BioProtoc.5867 浏览次数: 24
评审: Migla MiskinyteAnik TuladharAnonymous reviewer(s)

相关实验方案

利用改进的培养方法和生长监测对嗜盐火山生菌进行表型分析的次氯酸盐胁迫试验
Paula Mondragon [...] Julie A. Maupin-Furlow
2022年11月20日 2157 阅读
Abstract
Calcium imaging has become a widely used technique for measuring the activity of identified neurons during behavior. A key goal in such investigations is to determine whether, and to what extent, neurons preferentially encode one task-relevant state over another—a property referred to as neuronal selectivity. Despite the widespread use of calcium imaging for this purpose, no consensus exists on the parameter choices required to assess neuronal selectivity reliably: choices regarding neural data representation, behavioral position tracking, temporal binning, data balancing, and statistical shuffling all vary substantially across published studies. We recently developed a systematic computational approach to address this gap. Here, we describe the step-by-step protocol for implementing this computational pipeline. Starting from preprocessed calcium imaging data, the protocol guides users through all stages of the analysis: loading and aligning neural and behavioral data, deriving four metrics of neural activity, computing a selectivity index (SI), generating null distributions using four shuffling strategies, and assigning selectivity labels to individual neurons. The protocol introduces a principled, data-driven framework for evaluating the quality of any combination of parameter choices using quantitative metrics of accuracy and robustness and for identifying the optimal combination. The framework is validated using bootstrap resampling and hold-out cross-validation, and its generality is demonstrated by application to a different, regression-based approach for assessing selectivity of individual neurons. Finally, we describe the natural extension of this framework to inferences about task states encoded by populations of neurons. Thus, our protocol provides a reusable, extensible approach to identify optimal parameter settings for reliably characterizing neural encoding of two discrete task states.
Key features
• Provides a step-by-step computational pipeline for assessing the selectivity of neurons to task states from calcium imaging data.
• Introduces quantitative accuracy and robustness metrics for objectively evaluating and comparing the quality of any combination of analysis parameter choices.
• Validates the optimal parameter choices in terms of reliability, generalizability, and generality using bootstrap resampling, hold-out cross-validation, and a regression-based (GLM) approach, respectively.
• Provides modular, well-documented MATLAB code covering all pipeline stages, enabling adaptation to different cell types, brain areas, calcium indicators, two-state task designs, and ensembles.
Keywords: Calcium imagingGraphical overview
Background
Understanding the neural representations underlying distinct behavioral states is a central goal of systems and behavioral neuroscience. A key question is whether, and to what extent, individual neurons in a brain area preferentially encode one task-relevant state over another. Such investigations have been conducted across a wide range of behavioral contexts, including spatial navigation in safe versus aversive zones [1–4], working memory and decision making [5–7], social interactions [8–10], and fear learning [11]. In each case, the encoding preference of individual neurons is quantified by comparing their responses across task-relevant states and classifying neurons as selective or non-selective based on statistical testing.
Calcium imaging, or the imaging of intracellular neural calcium dynamics using genetically encoded calcium indicators (GECIs) such as GCaMP6f, has emerged as a popular method for such investigations, owing to its ability to access simultaneously large numbers of identified neurons, including targeted cell-type or projection-specific subpopulations, even in freely behaving animals [12–13]. However, unlike electrophysiological recordings that directly measure action potentials, calcium signals reflect a convolution of underlying spiking activity with the slow rise and decay kinetics of the calcium indicator [14–15]. This introduces inherent ambiguity in the choice of metric used to quantify neural activity and raises the question of whether continuous fluorescence traces [3,11,16], discrete detected calcium events [2], or convolved representations of those events provide the most reliable basis for inferring neuronal selectivity. This indirect relationship also causes calcium imaging to under-sample sparsely firing neurons [17–18], which may yield too few detectable events to support a reliable activity estimate; the number of events recovered depends further on signal quality and on the event-detection parameters chosen during preprocessing. These dependencies motivate the minimum event-count criterion applied in step B3, which should be re-examined whenever acquisition or preprocessing settings change.
Beyond the choice of neural data representation, studies have also varied in a number of other procedural and analytical choices: whether the animal's position is tracked using a head-centroid [9] or body-centroid [2,19–20] coordinate; whether neural and behavioral data are temporally binned beyond the acquisition frame rate [2,11]; whether the number of data samples from each task state is matched to control for unequal occupancy; and which statistical shuffling method is used to generate null distributions [2–3,5–9,20]. These choices span the full data processing and analysis pipeline and are made routinely across laboratories, often without systematic justification.
Our recent study [21] highlighted the absence of systematic investigation of the effects of diverse parameter choices and introduced an objective framework for evaluating the quality of inference of neural encoding preferences as a function of parameter choice. Using this approach, it revealed that there is substantial inconsistency in inferences across different choices of parameter values along this pipeline. Specifically, applying 120 different combinations of these parameter values to a single calcium imaging dataset produced markedly different selectivity labels for the same neurons, with 96.8% of all pairs of parameter combinations agreeing on fewer than 90% of neurons. Because these divergent outcomes arise from the same underlying recordings, they isolate the effect of the analysis choices themselves. The current protocol paper describes the step-by-step computational pipeline introduced in that study, implemented in MATLAB. It covers all stages, from preprocessed calcium imaging data to the characterization of individual neuronal selectivity. Critically, it implements a data-driven framework for systematically comparing the quality of different parameter combinations using quantitative metrics of accuracy and robustness and for identifying the combination that produces the most reliable inferences. The pipeline was developed and validated using calcium imaging of excitatory (CaMKII+) neurons in the medial prefrontal cortex (mPFC) of freely behaving mice navigating the elevated zero maze (EZM) [22], but is designed to be applicable to data obtained using any calcium indicator, in any brain area, with either 1-photon or multiphoton microscopy, in any animal species, and during any behavioral or stimulus presentation experiment. In other words, this protocol is applicable to any calcium imaging dataset obtained in which the goal is to infer the encoding of two discrete task states by individual neurons (as well as by neural populations).
Software and datasets
| Type | Software/dataset/resource | Version | Date | License | Access |
| Software 1 | MATLAB | R2021b or later * | 2021 | Commercial | Paid (academic license available) |
| Software 2 | Inscopix Data Preprocessing Software (IDPS) (for data preparation only; output is input to this protocol)* | 1.6 or later | 2020 | Commercial | Paid |
| *The protocol does not require this particular software. Outputs from other (open-source or custom) software for preprocessing calcium imaging data and identifying individual cells, such as CaImAn or Suite2p [23–24], can be swapped in after appropriate formatting to dovetail with our code. | |||||
| Software 3 | EthoVision (Noldus Inc.) (for behavioral tracking only; output is input to this protocol)* | v11.5 | 2020 | Commercial | Paid |
| *EthoVision is not required; outputs from other (open-source) video processing or pose-estimation software, such as DeepLabCut [25], after appropriate formatting to dovetail with our code, can be used instead. | |||||
| MATLAB Toolbox 1 | Statistics and Machine Learning Toolbox (required) | 25.2 (R2025b) tested* | \ | Bundled with MATLAB | Paid (with MATLAB) |
| MATLAB Toolbox 2 | Signal Processing Toolbox (required for ca_traces neural data type only) | 25.2 (R2025b) tested* | \ | Bundled with MATLAB | Paid (with MATLAB) |
| MATLAB Toolbox 3 | Parallel Computing Toolbox (optional; strongly recommended) | 25.2 (R2025b) tested* | \ | Bundled with MATLAB | Paid (with MATLAB) |
| Code | https://doi.org/10.5281/zenodo.20046106 | v3 | 18/08/2026 | CC BY | Free |
| *MathWorks distributes these toolboxes as versioned components of each MATLAB release rather than as independently versioned products, so the toolbox version is determined by the MATLAB release. The pipeline was verified to run end to end on MATLAB R2025b with Statistics and Machine Learning Toolbox 25.2, Signal Processing Toolbox 25.2, and Parallel Computing Toolbox 25.2. It calls only long-standing core functions (readmatrix, interp1, butter, filtfilt, movmean, conv2, trapz, prctile, corr, robustfit, tiedrank, glmfit, and parfor), all of which are available with unchanged interfaces in R2021b, the stated minimum release. | |||||
Procedure
登录/注册后免费查看全文
文章信息
稿件历史记录
提交日期: Jun 17, 2026
接收日期: Sep 24, 2026
在线发布日期: Oct 28, 2026
出版日期: Nov 5, 2026
版权信息
© 2026 The Author(s); This is an open access article under the CC BY-NC license (https://creativecommons.org/licenses/by-nc/4.0/).
如何引用
Readers should cite both the Bio-protocol article and the original research article where this protocol was used:
分类
神经科学 > 行为神经科学
生信
您对这篇实验方案有问题吗?
在此处发布您的问题,我们将邀请本文作者来回答。同时,我们会将您的问题发布到Bio-protocol Exchange,以便寻求社区成员的帮助。
Share
Bluesky
X
Copy link


