DOI: 10.5061/dryad.8cz8w9h0d
title: Spatial coding dysfunction and network instability in the aging medial entorhinal cortex

description: Across species, spatial memory declines with age, possibly reflecting
 altered hippocampal and medial entorhinal cortex (MEC) function. However,
 the integrity of cellular and network-level spatial coding in aged MEC is
 unknown. Here, we leveraged in vivo electrophysiology to assess MEC
 function in young, middle-aged, and aged mice navigating virtual
 environments. In aged grid cells, we observed impaired stabilization of
 context-specific spatial firing, correlated with spatial memory deficits.
 Additionally, aged grid networks shifted firing patterns often, but with
 poor alignment to context changes. Aged spatial firing was also unstable
 in an unchanging environment. In these same mice, we identified 458 genes
 differentially expressed with age in MEC, 61 of which had expression
 correlated with spatial coding quality. These genes were
 interneuron-enriched and related to synaptic plasticity, notably including
 a perineuronal net component. Together, these findings identify
 coordinated transcriptomic, cellular, and network changes in MEC
 implicated in impaired spatial memory in aging.
description: This dataset comprises the pre-processed <em>in
 vivo</em> electrophysiological data, including both individual
 neuron spiking and local field potential (LFP) data, and virtual-reality
 behavior data from each recording session analyzed and presented in the
 affiliated manuscript. In brief, electrophysiology data were collected
 using Neuropixels 1.0 silicon probes and SpikeGLX software, followed by
 offline spike sorting using Kilosort 2.5 and curation in Phy 2.0
 integrated using Jennifer Colonell’s fork of the Allen Institute for Brain
 Science ecephys library, which also produces waveform quality metrics for
 each neuron. Behavioral data were saved using Unity 3D software and
 synchronized with pre-processed electrophysiological data using custom
 MATLAB code. LFP data for each session after electrophysiologic data
 pre-processing and synchronization with VR timestamps is also
 included.  In addition, this dataset includes a set of
 pre-processed immunohistochemical images and a .csv file resulting from
 the analysis of the density of perineuronal nets and PV-expressing
 interneurons in those images. For details on image processing, please see
 the manuscript methods. Finally, we include .csv files
 resulting from the analysis of transcriptomic data that are available in
 their raw form via NCBI GEO and in their processed form, paired with the
 published manuscript. These are necessary for the recapitulation of a
 subset of panels in Figures 7 and Supplementary Figure 8 using code in the
 GitHub repo associated with the manuscript. 
description: # Spatial coding dysfunction and network instability in the aging medial
 entorhinal cortex
 [https://doi.org/10.5061/dryad.8cz8w9h0d](https://doi.org/10.5061/dryad.8cz8w9h0d) ## Description of the data and file structure This dataset comprises the pre-processed *in vivo* electrophysiological data, including both individual neuron spiking and local field potential (LFP) power data, and virtual-reality behavior data from each recording session analyzed and presented in the affiliated manuscript. In brief, electrophysiology data were collected using Neuropixels 1.0 silicon probes and SpikeGLX software, followed by offline spike sorting using Kilosort 2.5 and curation in Phy 2.0 integrated using Jennifer Colonell’s fork of the Allen Institute for Brain Science ecephys library. Behavioral data were saved using Unity 3D software and synchronized with pre-processed electrophysiological data using custom MATLAB code. For each session from each mouse, this generated a .mat file of synchronized spiking and behavioral data, which is available here (mat_files.zip folder). Each .mat file title refers to the mouse identity (X) (named by its age group and the order in which it was recorded during data collection within its age group [Y = young or MA = middle-aged or A = aged; 1 .... n], session date, and then session number [Y = 1 - 6]) (e.g. X_mmddyy_recordY). Each .mat file contains the following arrays: * lickt: time (seconds) of each mouse lick; lickx: position (cm) of each mouse lick; post: time in seconds of each VR frame; posx: position of the mouse by frame (cm); reward: dictionary of reward consumption parameters; sp: dictionary of spiking data; trial: trial the mouse was on by frame (n).  * In the reward dictionary, variables are further defined as follows: times: time each reward was available (seconds); trials: trial on which a reward was available (n); centers: position of each 50 cm reward zone center (cm); auto: binary equal to 1 or 0 if reward was automatically delivered or not; request: binary equal to 1 or 0 if reward was requested by mouse or not. * In the sp dictionary, variables are further defined as follows: dat_path: data path; n_channels_dat: number of channels on probe; dtype: int-16 (data type); offset: should be 0 if synced; sample rate: sample rate of probe (30000 Hz). hp_filtered: if 0 = then high pass filtered; st = spike times (seconds); spikeTemplates = ID of the shape of template in number of rows in Phy; temps: normalized template waveform from Phy;  tempScaleAmp = scaling amplitude of template waveform (microvolts); clu: cluster ID of every spike; cgs: manual label of unit quality (2 = GOOD, 1 = MUA, 0 = NOISE); cid: cluster ID of every cluster; xcoords: staggered x coord position on probe of each unit; ycoords: distance from tip of probe with relationship to the probe (micrometers); winv matrix: whitening matrix from Kilosort. Additionally, some .mat files may also contain the following additional variables based on session task and  structure: * In sessions with dark and gain trials, trial_dark: binary for each trial equal to 1 for dark trials and 0 for VR trials; trial_gain: binary for each trial equal to 1 for gain manipulation trials and 0 for VR trials; skippedtrials: array containing any trials (n) skipped by Unity3D software in error; correctedtrial: trial the mouse was on corrected by frame corrected for any skipped trials * In addition for Split Maze sessions, stemflag: binary by VR frame equal to 1 if mouse position was ≤ 200 cm; trial_info.dark: binary by trial equal 1 if dark trial, 0 if not; trial_info.gain: binary by trial equal to 1 if gain manipulation trial, 0 if not; trial_info.left: binary by trial equal to 1 if Context A (aka left) trial or 0 if Context B trial; trial_info.auto: binary by trial equal to 1 if automatic reward was available vs. 0 if not.  Processed, synced LFP data from the probe channel with the highest theta power are included as a .csv file for each session (named X_sessiondate_trackname_recordY_maxthetaLFPsynced) (processed_lfp_files.zip folder). Additionally, waveform quality metrics for each neuron in each session were generated by the ecephys pipeline and are included here as .csv files (named X_Y_metrics.csv) (waveform_metrics.zip folder). Behavioral data for assessment of mouse visual acuity are also included as .txt files (named X_acuity.txt) (visual_acuity.zip folder). For convenience of users, the scores output by the computationally expensive shuffle procedure to classify functional cell types for each session have also been included here (shuffle_scores.zip). There are seven different scores calculated after a spike time shuffling procedure by cell and used to then classify functional cell types. These scores each correspond to one of the seven subfolders of this ZIP folder (coherence: spatial firing coherence across the entire session; coherencea: spatial firing coherence during Block A of the Split Maze task; sparsity: spatial firing sparsity across the entire session; sparsitya: spatial firing sparsity during Block A of the Split Maze task; peakheights: dark trial firing rate autocorrelation peak height at the location of non-shuffled autocorrelation's peak prominence; speedscores: speed tuning scores across the entire session; speedstabscores: scored stability of speed tuning across position bins across the entire session). Each subfolder contain files named by the mouse, session date, and session number following conventions above. Each file is an array containing 100 shuffle scores for each recorded cell in a given session. Mathematical definitions of these scores and their relevance to cell type classification are specified in the manuscript Methods. Additionally, shuffle procedure code to regenerate these scores from the .mat files are in the GitHub repository linked here. Finally, critical mouse and session metadata are also included as spreadsheets (MouseMetadata.csv and SessionMetadata.csv format). In the MouseMetadata.csv file, variables are defined as follows with additional details on the terms Task and Cohort in the manuscript Methods: * Animal_ID: mouse name; Task: categorical behavior task; Cohort: categorical grouping temporally associated recordings; Probe_Control: binary equal to 0 or 1 if hemispheres were recorded from vs. not; Sex: categorical for male or female; Sac_Date: date of mouse sacrifice; Frozen_Hemisphere: categorical specifying which hemisphere (right [R] or left [L]) was frozen for RNAseq, 2 if both frozen; DOB: mouse birth date; Age_WholeMonth: number of whole months mouse lived; Age_ExtraDays: number of additional days after whole months mouse lived; Age_Month: fractional age in months of mouse; Aged_Days: total number of days mouse lived; Age_Group: categorical (young = 1, middle-aged = 2; aged = 3); Behavioral_Sessions: number of sessions used for behavior analysis; Neural_Sessions: number of sessions used for neural data analysis. In the SessionMetadata.csv file, variables are defined as follows: * File: full session neural data file name; Animal_ID: mouse name; Session: session number (1 to 6); Sync: binary equal to 0 or 1 if session neural and behavior data were synced; Final Depth (D): number of microns from brain surface along the axis of the probe (diagonal); Final Depth (V): number of microns from brain surface (vertical); Angle: calculated angle of probe from vertical in brain tissue; Notes: written details on whether session was excluded from particular analyses. In addition, this dataset includes a set of pre-processed immunohistochemistry images (see folder: IHC_WFAPV_Processed.zip) and a .csv file (8BCD.csv) resulting from the analysis of the density of perineuronal nets (PNNs) and PV-expressing interneurons in those images. The images corresponding to the channel in which PV interneurons are visualized have the suffix "1". Similarly, those corresponding to the channel in which PNNs are visualized have the suffix "2"; composite images have the suffix "_3". Representative composite IHC images, as seen in Figure 8a of the manuscript, are also included in this folder. For further details on image processing, please see the manuscript Methods. In the 8BCD.csv file, variables are defined as follows:  * Mouse (equivalent to Animal_ID): mouse name; Group: categorical of mouse age group where Y = young and A = aged; PVDensity: fractional number of parvalbumin-expressing (PV) cells per micron cubed in analyzed tissue volume; PNNDensity: fractional number of perineuronal nets per micron cubed in analyzed tissue volume; PV+PNNDensity: fractional number of perineuronal nets surrounding PV cells per micron cubed in analyzed tissue volume; PV-PNNDensity: fractional number of perineuronal nets not surrounding PV cells per micron cubed in analyzed tissue volume. Finally, we include .csv files (7F.csv and SupplementaryFig8b_left.csv, SupplementaryFig8b_middle.csv, and SupplementaryFig8b_right.csv) resulting from the analysis of transcriptomic data that are available in their raw form via NCBI GEO and in their processed form paired with the published manuscript. These are necessary for recapitulation of a subset of panels in Figure 7 and Supplementary Figure 8 using code in the GitHub repo associated with the manuscript.  In the 7F.csv file, variables are defined as follows with thresholds for differential gene expression and Benjamini-Hochberg (BH) False Discovery Rate correction specified in the manuscript Methods:  * Gene: gene name; DEG: binary equal to 1 or 0 if gene was significantly differentially expressed or not; r: Pearson r of gene expression values in FPKM with fitted animal mean spatial cell firing coherence across mice; T: T-score of Pearson r; p: p-value of Pearson r; sig: binary equal to 1 or 0 if gene expression was significantly correlated (p &lt; 0.05) with fitted animal mean spatial cell firing coherence;  Critical value: BH critical value for adjusted correlation significance given FDR; sigFDR: binary equal to 1 or 0 if correlation was significant after FDR correction or not; rank: BH rank (1 to total gene number) of correlation p-value from smallest to largest; padj: FDR-adjusted p-value of correlation. In "SupplementaryFig8b" associated csv files, variables are defined as follows, where the fitted parameter differs in each case: change in alternation trial fraction of rewards requested (left.csv), change in fraction of alternation trials with aligned spatial map and VR context identities (middle.csv), and frequency of alternation trial remapping events (remaps / trial) (_right.csv) respectively. * Gene: gene name; r: Pearson r of correlation of fitted parameter with gene expression across mice; T: T-score of Pearson r; p: p-value of Pearson r; sig: binary equal to 1 or 0 if gene expression was significantly correlated; sigFDR: binary equal to 1 or 0 if correlation was significant after FDR correction or not. **Sharing/Access information** Transcriptomic bulk and single nucleus RNA sequencing data from this study are separately available via the NCBI GEO database (linked below). Processed transcriptomic data are included with the manuscript upon publication, some of which are duplicated in the .CSV files included here for convenience in plotting a subset of figures panels using our code (also linked below). **Code/Software** Python code to subsequently post-process and then analyze these data in the order of manuscript figures is publicly available on GitHub ([https://doi.org/10.5281/zenodo.15851471](https://doi.org/10.5281/zenodo.15851471)). Further details are available in the ReadMe of that repository.