DOI: 10.5061/dryad.g4f4qrg15
title: Data from: Complementary cognitive roles for D2-MSNs and D1-MSNs during interval timing

description: The role of striatal pathways in cognitive processing is unclear. We
 studied dorsomedial striatal cognitive processing during interval timing,
 an elementary cognitive task that requires mice to estimate intervals of
 several seconds and involves working memory for temporal rules as well as
 attention to the passage of time. We harnessed optogenetic tagging to
 record from striatal D2- dopamine receptor-expressing medium spiny neurons
 (D2-MSNs) in the indirect pathway and from D1-dopamine receptor-expressing
 MSNs (D1-MSNs) in the direct pathway. We found that D2-MSNs and D1-MSNs
 exhibited distinct dynamics over temporal intervals as quantified by
 principal component analyses and trial-by-trial generalized linear models.
 MSN recordings helped construct and constrain a four-parameter
 drift-diffusion computational model in which MSN ensemble activity
 represented the accumulation of temporal evidence. This model predicted
 that disrupting either D2-MSNs or D1-MSNs would increase interval timing
 response times and alter MSN firing. In line with this prediction, we
 found that optogenetic inhibition or pharmacological disruption of either
 D2-MSNs or D1-MSNs increased interval timing response times.
 Pharmacologically disrupting D2-MSNs or D1-MSNs also changed MSN dynamics
 and degraded trial-by-trial temporal decoding. Together, our findings
 demonstrate that D2-MSNs and D1-MSNs had opposing dynamics yet played
 complementary cognitive roles, implying that striatal direct and indirect
 pathways work together to shape temporal control of action. These data
 provide novel insight into basal ganglia cognitive operations beyond
 movement and have implications for human striatal diseases and therapies
 targeting striatal pathways.
description: This dataset contains raw data collected using MedAssociates and
 OpenEphys, and sorted using Plexon's Offline Sorter.
 Raw MedAssociates Files and Plexon files are shared.
 Loading code in MATLAB along with code to plot figures is
 included.  Note the while code is available on GitHub:
 https://github.com/nandakumar-narayanan/https-elifesciences.org-reviewed-preprints-96287eLife/   code is also included in this repository as well as on our website: https://bit.ly/CogStriatum
description: \#This README file was generated in March 2025 by Nandakumar Narayanan #
 General information ## Dataset Title Complementary cognitive roles for
 D2-MSNs and D1-MSNs during interval timing
 [https://doi.org/10.5061/dryad.g4f4qrg15](https://doi.org/10.5061/dryad.g4f4qrg15) ## Date of Data Collection 2021-2024 ## Contributors * Nandakumar Narayanan, University of Iowa ## Overview DOI: 10.5061/dryad.g4f4qrg15 Paper Link: [https://doi.org/10.7554/eLife.96287](https://doi.org/10.7554/eLife.96287) This is a complex behavioral, modeling, and neurophysiological dataset that captures how mouse dorsomedial striatal D2-MSNs and D1-MSNs represent time.  The data are involve mouse optogenetic tagging, computational modeling, mouse optogenetic behavior, and combined neurophysiology and pharmacology. The role of striatal pathways in cognitive processing is unclear. We studied dorsomedial striatal cognitive processing during interval timing, an elementary cognitive task that requires mice to estimate intervals of several seconds and involves working memory for temporal rules as well as attention to the passage of time. We harnessed optogenetic tagging to record from striatal D2- dopamine receptor-expressing medium spiny neurons (D2-MSNs) in the indirect pathway and from D1-dopamine receptor-expressing MSNs (D1-MSNs) in the direct pathway. We found that D2-MSNs and D1-MSNs exhibited distinct dynamics over temporal intervals as quantified by principal component analyses and trial-by-trial generalized linear models. MSN recordings helped construct and constrain a four-parameter drift-diffusion computational model in which MSN ensemble activity represented the accumulation of temporal evidence. This model predicted that disrupting either D2-MSNs or D1-MSNs would increase interval timing response times and alter MSN firing. In line with this prediction, we found that optogenetic inhibition or pharmacological disruption of either D2-MSNs or D1-MSNs increased interval timing response times. Pharmacologically disrupting D2-MSNs or D1-MSNs also changed MSN dynamics and degraded trial-by-trial temporal decoding. Together, our findings demonstrate that D2-MSNs and D1-MSNs had opposing dynamics yet played complementary cognitive roles, implying that striatal direct and indirect pathways work together to shape temporal control of action. These data provide novel insight into basal ganglia cognitive operations beyond movement and have implications for human striatal diseases and therapies targeting striatal pathways. ## Data Formats ### **Metadata and Binary Files:** 1. MatlabFiles.zip `*.mat` files: Contains processed data in Matlab format.   2. MatlabCode.zip `*.m` files: Contains code to load matlab, txt, and primary data files.  These files are `*.m` files and `*.p` files.   Each function is named for what it does; start with WritePaper.m to see functions in context; this file calls Figure files, which in turn call individual matlab functions.  Each function includes extensive comments.  3. ImplantLocations.zip `*.png` files: Implant location.  These are named after each animal.  4. BehavioralData.zip `*.txt` files: Contains raw MedAssociates behavioral files.  These are named for each animal and each recording date.  There is also a loading function get*.M, and a .mov file with a video of raw behavior.  5. NeuronalData `*.pl2` files: Contains raw neuronal recordings. These are named for each animal and each recording date.  ### **Additional File Types:** *.omf file %Sorting code for Plexon file.show *.p  %Encrypted matlab function *.mov % movie file of behavior ## Recommended Software for Data Analysis: Matlab v2021-2025 # Data is provided in 5 .zip files # 1) MatlabFiles.zip * dataSt_pharm.mat * dataSt_pharm_matched.mat * dataSt_tagging.mat Each file contains a struct, dataSt, with elements corresponding the filename of a neuronal data recording. Used by load_neurons.m * neuronTypes.mat * neuronTypes_pharm.mat Each file contains a struct, neuronTypes, with elements corresponding to an individual neuron. Used by load_neurons.m * neuronDB_matched * neurons_tagging.mat * neuronsTagged.mat * neurons_pharm.mat * neurons_pharm_matched.mat Each file contains a struct, neurons, ith elements corresponding to an individual neuron. Used by Figure2_tagging_revision_V2.m and Figure6_Neurons_R2_V2.m * pharmRAND.mat * tagRAND.mat Each file contains randomized PCA coefficients (rEXPLAINED and rEXPLAINED_array). * OEphysEvents_tagging_v4.mat * OEphysEvents_Pharma12.mat Each file contains a struct, oephys_dir_list, with elements corresponding the filename of a behavioral data recording. Used by load_neurons.m * D1_D2_MSNs_x_SpkLogistic_convSpks_1000ms.mat * D2_LaserOn_sim_example1.mat * D1_MSNs_LaserOff_ModelExample1_updated.mat * D2_MSNs_LaserOff_ModelExample1_updated.mat * D1_MSNs_LaserOn_ModelExample1_updated.mat * D2_MSNs_LaserOn_ModelExample1_updated.mat * D2_LaserOff_sim_example1.mat * asims_D1_D2_MSNs_Accuracy_convSpks_1000ms.mat Each file contains a set of model fit parameters explained in depth in Figure4_Model_V6.m # 2) MatlabCode.zip This zipfile contains .m files that load and process raw data and generate Matlab files in Matlabfiles.zip. | AnimalList\_mf.m             | List of animals | | :-------------------------------------------- | :--------------------------------------------------------------------- | | CV.m                           | Matlab code to calculate CV | | D1\_MSNs\_LaserOn\_ModelExample1\_updated.mat |  D1 Model Parameters Laser ON | | D1\_MSNs\_step4\_compare\_model\_with\_data.m |  D1 Model steps | | D2\_MSNs\_step4\_compare\_model\_with\_data.m |  D1 Model steps | | EnsembleAnalysisSwitch.m |  Function to analyze ensemble decoding | | Figure1\_Behavior\_R1.m |  Code to generate Figure 1 | | Figure2\_tagging\_revision\_V2.m |  Code to generate Figure 2 | | Figure3\_tagging\_stats\_V2.m |  Code to generate Figure 3 | | Figure4\_Model\_V6.m |  Code to generate Figure 4; requires running &gt;&gt;Figure5\_Behavior\_V2.m | | Figure5\_Behavior\_V2.m |  Code to generate Figure 5 | | Figure6\_Neurons\_R2\_V2.m |  Code to generate Figure 6 | | Figure7\_Ensemble.m |  Code to generate Figure 7 | | FigureS11.m |  Code to generate Supplementary Figure S1 | | FigureS2\_Supplement.m |  Code to generate Supplementary Figure S2 | | FigureS3AB\_Slope.m |  Code to generate Supplementary Figure S3A | | FigureS3C.m |  Code to generate Supplementary Figure S3BC | | FigureS4\_modeling.m |  Code to generate Supplementary Figure S4 | | FigureS5\_ModelingParameters.m |  Code to generate Supplementary Figure S4 Modeling | | FigureS6\_ModelingDetails.m |  Code to generate Supplementary Figure S4 Modeling | | FigureS8\_S9\_S10.m |  Code to generate Supplementary Figure S8-S10 | | GetAnimalSex.m |  Code to get the sex of animals | | LadderPlot.m |  Function to plot data between groups | | MSN\_WF\_clustering\_austin.m |  Code to generate Supplementary Figure S1 | | MatlabOutput\_VOR.m |  Output from MATLAB Code | | NumberOfDays.m |  Sensitivity analyses for behavior | | PCA\_rand.m |  Data to generate random PCA values | | PCA\_rand\_Pharm.m | | | PlotMatchRasters.m |  Code to match rasters | | WritePaper.m |  Code to write the paper | | classifyTrials.m |  Classify individual trials | | cohend.m |  Cohens D | | convertDateStr.m |  Code to convery date string | | getAnProfile\_Behavior.m |  Profile animal behavior | | getAnProfile\_D1D2\_antagonist\_V2.m |  Profile animal behavior | | getAnProfile\_Learning\_paper.m |  Profile animal behavior | | getDataIntr.m |  Analyze behavioral data | | gksmooth.m |  Smoothing function | | jitterPlot.m |  Compare data between two groups | | load\_neurons.m |  Load neurons | | ncbclassifier.m |  Naive Bayes Classifier | | peSpike.m |  Code to analyze spike rasters | | periEventPlot.m |  Plot peri-event rasters | | plotGroup.m |  Plot behavioral data | | plotMatchedRasters.m |  Plot stacked rasters | | plotTaggedRasters.m |  Plot tagging | | tagToSwitch.m |  Matlab code to analyze switch times | | writeAllFilesToFile.m  | | ./analytical_tools_striatalcircuits: Additional Narayanan Lab Matlab code to analyze behavioral data ./behaviorCode: Additional Narayanan Lab Matlab code to analyze behavioral data # 3) ImplantLocations.zip \*.png files of implant locations | ./imaging/D1-cre-tagging | Implants from D1-Cre mice; each file is named for 1 mouse | | :----------------------- | :--------------------------------------------------------- | | ./imaging/D2-cre-tagging |  Implants from D2-Cre mice; each file is named for 1 mouse | | ./imaging/WT-pharm |  Implants from WT mice; each file is named for 1 mouse | # 4) BehavioralData.zip \*.txt files Raw text files in four directories: | ./MPChalo. | Data from Halorhodopsin experiments | | :------------------- | :-------------------------------------------------------- | | ./MPCpharm.  |  Data from pharmacology experiments in recording mice | | ./mpcData\_tagging.  | data from optogenetic experiments. | | ./pharm\_data\_WT |  Data from pharmacology experiments in non-recording mice | These are text files with raw behavioral data in MedAssociates format that are loaded by: * Figure1_Behavior_R1.m * Figure2_tagging_revision_V2.m * Figure5_Behavior_V2.m * Figure6_Neurons_R2_V2.m # 5) NeuronalData \*.pl2 files Neuronal data in 3 directories: | ./NeuralData/Plexon\_MergeSort |  Plexon files sorted together from pharmacology experiments | | :----------------------------- | :------------------------------------------------------------------------------------------------ | | ./NeuralData/Plexon\_NN |  Plexon files sorted individually from pharmacology experiments, checked by Nandakumar Narayanan | | ./NeuralDataTagging/Sorted |  Plexon files sorted from tagging experiments | These are .pl2 files with raw behavioral data in MedAssociates' format that are loaded by load_neurons.m ## Access information Another copy of this code is available at: [https://bit.ly/CogStriatum](https://bit.ly/CogStriatum) All raw data and code are contained within this repository Data was derived from the following sources: MedAssociates, Open Ephys, and Offline Sorter.