DOI: 10.25452/figshare.plus.27138633.v1
title: Post-processed neural and behavioral data class with reward-relative cells identified

description: This dataset contains 2 pickled Python files containing the post-processed data used for: Sosa, Plitt, Giocomo, 2025. A flexible hippocampal population code for experience relative to reward. <i>Nature Neuroscience</i>. https://doi.org/10.1038/s41593-025-01985-4Hippocampal neurons were recorded in dorsal CA1 using 2-photon calcium imaging and synchronized with virtual reality behavior in head-fixed mice. This data is referred to as "post-processed" because shuffles have already been run to identify cells as "reward-relative" or not; therefore, the cell ID labels in this dataset will allow exact replication of any figures in the paper that do not require an additional shuffle of the data. The <code>pickle</code> or <code>dill</code> package in Python is required to load this dataset. See accompanying dataset: Pre-processed neural and behavioral data, including raw fluorescence. See the code base on Github for usage and additional documentation. <br><br>File name format: m[mouse-number-range]_expdays[list-of-day-numbers]_multiDayData_dff_[date saved, yyyymm]<br>Each pickle file is a Python dictionary, either for (1) only the experimental days where a reward zone location was switched on a virtual linear track (3-5-7-8-10-12-14) or (2) for all days, including days where the reward zone remained in the same location (1...14). In pickle (2), the data on the switch days are identical to pickle (1) -- we have provided both options to allow users to download a smaller file size if they are only interested in the "switch" days. Each entry of the dictionary corresponds to a class object for a given experimental day indexed as [3, 5, 7, 8, 10, 12, 14], for example, corresponding to the day number.<br>Below are the most relevant attributes of the class for analyses in the paper. Additional attributes are explained in the dayData.py docstring on the Github. Values before the '--' are defaults.<b>self.anim_list</b>: list of mouse IDs included in this day<b>self.place_cell_logical</b>: 'or' -- cells were classified as place cells by having significant spatial information in the trials before OR after the reward switch<b>self.force_two_sets</b>: True -- trials were split into "set 0" before the reward switch, and "set 1" after the reward switch. In animals without a reward switch, "set 0" and "set 1" correspond to the 1st and 2nd half of trials, respectively<b>self.ts_key</b>: 'dff' -- timeseries data type (dF/F) used to find place cell peaks<b>self.use_speed_thr</b>: True -- whether a running speed threshold was used to quantify neural activity<b>self.speed_thr</b>: 2 -- the speed threshold used, in cm/s<b>self.exclude_int</b>: True -- whether putative interneurons were excluded from analyses<b>self.int_thresh</b>: 0.5 -- speed correlation threshold to identify putative interneurons<b>self.int_method</b>: 'speed' -- method of finding putative interneurons<b>self.reward_dist_exclusive</b>: 50 -- distance in cm to exclude cells "near" reward<b>self.reward_dist_inclusive</b>: 50 -- distance in cm to include cells as "near" reward<b>self.bin_size</b>: 10 -- linear bin size (cm) for quantifying spatial activity<b>self.sigma</b>: 1 -- Gaussian s.d. in bins for smoothing<b>self.smooth</b>: False -- whether to smooth binned data for finding place cell peaks<b>self.impute_NaNs</b>: True -- whether to impute NaN bins in spatial activity matrices<b>self.sim_method</b>: 'correlation' -- trial-by-trial similarity matrix method: 'cosine_sim' or 'correlation'<b>self.lick_correction_thr</b>: 0.35 -- threshold to detect capacitive sensor errors and set trial licking to NaN <b>self.is_switch</b>: whether each animal had a reward switch<b>self.anim_tag</b>: string of animal ID numbers<b>self.trial_dict</b>: dictionary of booleans identifying each trial as in "set 0" or "set 1"<b>self.rzone_pos</b>: [start, stop] position of each reward zone (cm)<b>self.rzone_by_trial</b>: same as above but for each trial<b>self.rzone_label</b>: label of each reward zone (e.g. 'A', 'B')<b>self.activity_matrix</b>: spatially-binned neural activity of type self.ts_key (trials x position bins x neurons)<b>self.events</b>: original spatially-binned deconvolved events (trials x position bins x neurons) (no speed threshold applied)<b>self.place_cell_masks</b>: booleans identifying which cells are place cells in each trial set<b>self.SI</b>: spatial information for each cell in each trial set<b>self.overall_place_cell_masks</b>: single boolean identifying which cells are place cells according to self.place_cell_logical<b>self.peaks</b>: spatial bin center of peak activity for each cell in each trial set<b>self.field_dict</b>: dictionary of place field properties for each cell<b>self.plane_per_cell</b>: imaging plane of each cell (all zeros if only a single plane was imaged, otherwise 0 or 1 if two planes were imaged)<b>self.is_int</b>: boolean, whether each cell is a putative interneuron<b>self.is_reward_cell</b>: boolean, whether each cell has a peak within 50 cm of both reward zone starts<b>self.is_end_cell</b>: boolean, whether each cell has a peak in the first or last spatial bin of the track<b>self.is_track_cell</b>: boolean, whether each cell's peak stays within 50 cm of itself from trial set 0 to trial set 1<b>self.sim_mat</b>: trial-by-trial similarity matrix for place cells, licking, and speed<b>self.in_vs_out_lickratio</b>: ratio of lick rate in the anticipatory zone vs. everywhere outside the anticipatory and reward zones<b>self.lickpos_std</b>: standard deviation of licking position<b>self.lick_mat</b>: matrix of lick rate in each spatial bin (trials x position bins)<b>self.cell_class</b>: dictionary containing booleans of which cells have remapping types classified as "track", "disappear", "appear", "reward", or "nonreward_remap", where:'track' = track-relative'disappear' = disappearing'appear' = appearing'reward' = remap near reward (firing peak ≤50 cm from both reward zone starts), including reward-relative 'nonreward_remap' = remap far from reward (&gt;50 cm from reward zone start), including reward-relativeSee Fig. 2 notebook and code docstrings for more details.<b>self.pos_bin_centers</b>: position bin centers<b>self.dist_btwn_rel_null</b>: distance between spatial firing peaks relative to reward before the switch and the "random remapping" shuffle after the switch (radians)<b>self.dist_btwn_rel_peaks</b>: distance between spatial firing peaks relative to reward before vs. after the switch (radians)<b>self.reward_rel_cell_ids</b>: integer cell indices that were identified as reward-relative after application of all criteria<b>self.xcorr_above_shuf</b>: lag, in spatial bins, of the above-shuffle maximum of the cross-correlation used to confirm cells as reward-relative (computed for all cells; NaNs indicate that the xcorr did not exceed shuffle)<b>self.reward_rel_dist_along_unity</b>: circular mean of pre-switch and post-switch spatial firing peak position relative to reward (radians)<b>self.rel_peaks</b>: spatial firing peak position relative to reward in each trial set (radians)<b>self.rel_null</b>: spatial firing peak position relative to reward, for the random-remapping shuffle post-switch (radians)<b>self.circ_licks</b>: spatially-binned licking, in circular coordinates relative to reward (trials x position bins)<b>self.circ_speed</b>: spatially-binned speed, in circular coordinates relative to reward (trials x position bins)<b>self.circ_map</b>: mean spatially-binned neural activity within each trial set, of type self.ts_key, in circular coordinates relative to reward<b>self.circ_trial_matrix</b>: spatially-binned neural activity of type self.ts_key, in circular coordinates relative to reward (trials x position bins x neurons)<b>self.circ_rel_stats_across_an</b>: metadata across the "switch" animals:'include_ans': list of "switch" animal names'rdist_to_rad_inc': self.reward_dist_inclusive converted to radians'rdist_to_rad_exc': self.reward_dist_exclusive converted to radians'min_pos': minimum position bin used'max_pos': maximum position bin used'hist_bin_centers': bin centers used for spatial binning<br>