Investigations into the neural basis of behavior frequently employ calcium imaging to measure neuronal activity. Across studies, however, seemingly reasonable but highly diverse methodological choices are typically made to assess the selectivity of individual neurons to task states. Here, we examine systematically the effect of parameter choices, along the pipeline from data acquisition through statistical testing, on the inferred encoding preferences of individual neurons. We use as an experimental testbed, calcium imaging in the medial prefrontal cortex of freely behaving mice engaged in a classic exploration-avoidance task with animal-controlled state transitions, namely, navigation in the elevated zero maze. We report that most of the key parameters in the pipeline substantially impact the inferred selectivity of neurons, and do so in distinct ways. Using novel accuracy and robustness metrics, we directly compare the quality of inference across combinations of parameter levels, and discover an optimal combination. We validate its optimality using resampling methods, and demonstrate its generality across the two common analytical approaches used to assess neuronal selectivity - average response rate-dependent selectivity indices, and continuous time-dependent regression coefficients. Together, our results not only identify an optimal parameter setting for reliably assessing encoding preferences of cortical excitatory neurons using GCaMP6f calcium imaging but also establish a general data-driven procedure for identifying such optimal settings for other cell types, brain areas, and tasks. Significance statement This study addresses a critical unmet need in investigations of the neural basis of behavior with calcium imaging, namely, a standardized set of parameter values for the reliable assessment of neuronal selectivity for task states. By objectively evaluating the impact of various parameter choices on the inferred selectivity of excitatory neurons (in mPFC of freely behaving mice using GCaMP6f), it identifies an optimal parameter combination that yields accurate and reliable inferences. This combination is: calcium events convolved with a 2s exponential decay filter, head-centric animal position data, 50 ms binning of data, animal-controlled dataset sizes for task states, and randperm shuffling for statistical testing.
Huang et al. (Tue,) studied this question.