DOI: 10.5061/dryad.cjsxksnfh
title: Post-processed data for: Dopamine D1 receptor activation in the striatum is sufficient to drive reinforcement of anteceding cortical patterns

description: This study employs two-photon calcium imaging to investigate neural
 activity in mice during a neuroprosthetic task. Using two-photon
 microscopy, we captured GCaMP8s fluorescence at a wavelength of 920nm.
 Mice, head-fixed on a spherical treadmill, controlled a neural cursor by
 modulating activity in two motor cortex neuron ensembles. The task
 provided auditory feedback and measured neuronal activity using dF/F
 ratios. Contrary to traditional neuroprosthetics, we delivered activation
 of dopamine receptors with photoswitches instead of water reward. We
 explored various experimental conditions to assess the effect of receptor
 activation on task performance and neuronal activity. This data set
 contains the post-processed data.
description: We employed a Bruker Ultima Investigator system for calcium
 imaging, using a Chameleon Ultra II Ti: Sapphire laser tuned to 920nm to
 visualize GCaMP8s combined with a Olympus XLUMPLFLN 20XW objective and two
 GaAsP photomultiplier tubes. Mice were secured in place
 on a styrofoam ball, where they could move freely under the two-photon
 microscope. We captured 512×512 pixel frames, approximately 300µm in size,
 at a rate of 29.7Hz using Prairie View software. The system enabled
 real-time communication between Prairie View and the BMI code running on
 Matlab 2017b, facilitating smooth experimental control and data
 acquisition. We made manual adjustments during the
 recordings to address potential motion drifts.  Calcium
 transients were extracted using Suite2p. Initially, an anatomical-only
 analysis captured the neuropil fluorescence signal, which was averaged and
 denoised to correct for photobleaching. Frames affected by
 photostimulation were identified and excluded from the second pass of
 Suite2p (anatomical + functional) .<br>In addition to the default
 Suite2p classifier results (probability threshold &gt;0.1), we applied
 additional criteria to define a region of interest (ROI) as a neuron. The
 criteria included skewness of the neuropil-corrected fluorescence trace
 (0.4 to 10), neuron compactness (&lt;1.4), ROI footprint (0 to 3), and
 the number of pixels (&gt;80). We also required an SNR greater than
 two and stability, defined by less than 20% signal amplitude change and a
 standard deviation of the low-pass filtered signal under 1 during the
 experiment. <br>Imaging Setup and Data
 Acquisition 
 <strong>System</strong>: Bruker Ultima Investigator with
 Chameleon Ultra II Ti: Sapphire laser. 
 <strong>Wavelength</strong>: 920nm for GCaMP8s.
 <strong>Detection</strong>: Two GaAsP
 photomultiplier tubes with an Olympus objective. 
 <strong>Head-Fixation</strong>: Mice were head-fixed on a
 styrofoam ball, allowing free movement. 
 <strong>Frame Details</strong>: 512x512 pixels, approximately
 300µm, at 29.7Hz. 
 <strong>Software</strong>: Prairie View for imaging, Matlab
 2017b for experimental control and data acquisition. 
 <strong>Motion Correction</strong>: Manual adjustments during
 recordings. Neuroprosthetic
 Task <strong>Neural
 Cursor</strong>: Mapped from motor cortex neuron ensembles E1 and
 E2. <strong>Success Criteria</strong>:
 Neural cursor crossing a threshold (T1). 
 <strong>Auditory Feedback</strong>: Tone mapping corresponding
 to neural cursor values. <strong>Task
 Duration</strong>: 30 minutes, with a 1-minute stabilization
 period. Online Processing
 <strong>Data Acquisition</strong>:
 PrairieLink with Matlab 2020b. 
 <strong>Activity Measurement</strong>: dF/F ratios, with
 dynamic baseline fluorescence (F0) calculation. 
 Experimental Conditions 
 <strong>Main Experiments</strong>: 'D1R activation',
 'CONTROL', 'CONTROL_LIGHT', 'CONTROL_AGO',
 'DELAY', 'RANDOM'. 
 <strong>Daily Selection</strong>: Randomly selected with a
 preference for 'D1R activation'. 
 <strong>Technical Issues</strong>: Variable mouse availability
 due to technical difficulties. <strong>Optical
 Stimulation</strong>: Used in 'D1R activation', 
 'CONTROL_LIGHT', 'DELAY', and
 'RANDOM'. 
 <strong>Conditions</strong>: Blue light for D1R activation, UV
 light for reset. Image
 Pre-Processing 
 <strong>Software</strong>: Suite2p for calcium transient
 extraction. <strong>Initial
 Analysis</strong>: Anatomical-only for neuropil signal, denoising
 for photobleaching. <strong>Functional
 Segmentation</strong>: Exclusion of photostimulation-affected
 frames. <strong>Manual Neuron
 Identification</strong>: Additional criteria for SNR, stability, and
 other metrics. Motor Analysis
 <strong>Setup</strong>: Head-fixed mice
 on a spherical treadmill. <strong>Movement
 Recording</strong>: Positional coordinates smoothed and analyzed
 using Traja. <strong>Threshold for
 Movement</strong>: Speed &gt; 5mm/sec. 
   Please see manuscript for further
 methods.
description: # **Post-processed data for: Dopamine D1 receptor activation in the
 striatum is sufficient to drive reinforcement of anteceding cortical
 patterns** **DOI**:
 [10.5061/dryad.cjsxksnfh](https://doi.org/10.5061/dryad.cjsxksnfh)
 **Description**: This dataset includes post-processed data derived from
 the raw data using Suite2p, original MATLAB files obtained during the BMI
 experiments, and pandas data frames containing analysis results. These
 results are the basis for the figures presented in the paper. **Data and
 File Structure**: The dataset comprises the following types of files: 1.
 **ZIP files for each session and each mouse**: The filenames include the
 mouse identifier (e.g. "m13"), date (e.g.
 "`221112_D01`"), and a suffix indicating whether the file
 contains post-processed imaging data (suffix "_suite2p") or
 original BMI execution data (suffix "_bmi"). * Example
 filenames: `m13_221112_D01_suite2p.zip`, `m13_221112_D01_bmi.zip` 2. **CSV
 files**: These files contain specific analysis results that are not stored
 in Parquet format. CSV files store tabular data in plain text, where each
 line corresponds to a data record, and each record consists of fields
 separated by commas. 3. **Parquet files**: These files include dataframes
 with analysis results utilized in the paper's figures. Parquet is a
 columnar storage file format optimized for use with data processing
 frameworks like pandas. 4. **npy files**: These files are used for storing
 large, multi-dimensional arrays of numerical data, typically used in
 scientific computing with Python. 5. **MAT files**: These files store raw
 data collected during BMI experiments in MATLAB format, allowing for easy
 use and further analysis in MATLAB. **Content of the Suite2p ZIP Files**:
 * `bad_frames_dict.npy`: Contains information (in form of a python
 dictionary) about frames that were deemed bad during processing. It
 contains the index of the frames that are "bad":
 'bad_frames_index' (array with length T=time), and a boolean
 array (size T) indicating "1/True" on indeces of the frames that
 were "bad". 'bad_frames_bool'. * `bad_frames.npy`:
 Array size T, that lists bad frames identified during the imaging
 sessions. Index of the bad frames to be used during registration on
 neurons. * `dff.npy`: Array with NxT (N=neurons, T=time) that contains
 delta F over F values, which represent changes in fluorescence intensity.
 * `direct_neurons.npy`: Dictionary that identifies neurons directly
 controlling the BMI. Contains 'E1': Index of the neurons (N) of
 the ensemble E1, 'E2': Index of the neurons (N) of the ensemble
 E2, 'exclude': Index of the neurons that must be excluded
 (redundant or merged with others), 'added_neurons': and index of
 the neurons that were added posthoc by the experimenter} * `F.npy`: NxT
 array that contains raw fluorescence data obtained by the Suite2p. *
 `Fneu.npy`: NxT array that contains neuropil fluorescence data, which
 helps in subtracting background fluorescence, obtained by the Suite2p. *
 `iscell.npy`: Array with Nx2 that identifies cell ROIs (Regions of
 Interest) as neurons if first column is a 1, and gives the measure of
 "being a neuron" in the second column. * `iscell_old.npy`: Array
 with Nx2 that contains the original classification of cell ROIs done by
 Suite2p * `ops.npy`: Contains the final operational parameters used in the
 Suite2p processing. * `ops_before_1st.npy`: Operational parameters used in
 the first iteration of Suite2p processing. * `spks.npy`: NxT array that
 contains inferred spike rates of neurons obtained with suite2p. *
 `spks_dff.npy`: NxT array  that contains inferred spike rates derived from
 delta F over F values (dff.npy). * `stat.npy`: N array that contains info
 about identified ROIs as obtained by Suite2p. * `stim_time_dict.npy`:
 Dictionary that contains the array (T) with indexes of
 stims:"stim_index" and the bool array (T) that indicate with a
 "1" when the stim happened ("stim_bool"). *
 `target``time``dict.npy`: Dictionary that contains the array (T) with
 indexes of when the target was achieved:"target_index" and the
 bool array (T) that indicate with a "1" when the target was
 achieved ("target_bool"). **Content of the BMI ZIP Files**: *
 **folder motor**: Contains behavioral motor data. It contains 2 files with
 behavioral data. The filenames include the date (e.g.
 "`221112_D01`"), a suffix indicating whether the file contains
 the "XY" positions of the animal or the metadata
 "Trigger", the mouse identifier (e.g. "13"), and a 
 suffix indicating if the behavior correspond to the "Baseline"
 (calibration) or the "BMI" (e.g. "221112_XY_13_BMI").
 * `BaselineOnline.mat`: Array with NxT raw data of all the online neurons
 captured during calibration. * `BMI_online.mat`: Data from the BMI online
 session. Contains "bData" and "data".  * bData:
 Metadata to run the BMI based on BaselineOnline.mat data * data:  *
 data.cursor, T array with the BMI neural cursor * data.fb_freq, T array
 with the frequency of the auditory feedback (mapped to the cursor) *
 data.bmiAct, NxT neural activity of the direct neurons. * data.baseVector,
 T baseline vector obtained and used during the BMI * data.selfHits, T
 boolean array to indicate with a "1" that a target has been
 acquired * data.selfDRstim, T boolean array to indicate with a
 "1" that a stim has been delivered (through BMI) *
 data.vector_stim, Array of indeces where to delivered a predetermined stim
 (obtained by randomly assigning indeces) * data.vectorWater, T boolean
 array to indicate with a "1" that water reward has been
 delivered. There was none in these experiments. * data.randomDRstim, T
 boolean array to indicate with a "1" that a stim has been
 delivered (through "vector_stim") * data.trialStart,  T boolean
 array to indicate with a "1" that a trial starts. *
 data.timeVector,  T boolean array to indicate with time lapse from the
 previous index. * data.selfTargetCounter, Counter of targets achieved with
 BMI * data.selfTarget_DR_stim_Counter, Counter of stims delivered with BMI
 * data.sched_random_stim, Counter of stims delivered from "vector
 stim" * data.Water_Counter, Counter of water rewards *
 data.trialCounter, data.frame, Counter of frames * `BMI_target_info.mat`:
 Metadata with the Target information from the BMI session (redundancy with
 bData) * `roi_data.mat`: Structure containing the spatial distribution of
 neurons. * im_sc_struct, structure with info about the resizing of the
 background image. Metadata. * plot_images, Green and Red channel reference
 image * roi_data: Calibration roi-masks for all the neurons recorded *
 roi_data.im_bg, background image (reference green image) *
 roi_data.num_rows, roi_data.num_cols, number of pixels in the image *
 roi_data.num_rois, number of rois recorded during calibration *
 roi_data.roi_mask, roi_data.roi_mask_bin, location of each neuron *
 roi_data.roi_bin_cell, mask of each neuron * roi_data.x, roi_data.y,
 location in x and y for each neuron * roi_data.im_roi, roi_data.im_roi_rg,
 images for plotting * `strcMask.mat`: Structure mask data of the ensemble
 neurons used in the analysis. Relevant variables * strcMask.roi_ind, the
 index of each of the neurons. * strcMask.num_roi, number of Rois that do
 the ensemble * strcMask.maxx, location of the higher end in the Xaxis
 for each ensemble neuron. Needed to apply the neuronMask * strcMask.minx, 
 location of the lower end in the Xaxis for each ensemble neuron. Needed to
 apply the neuronMask * strcMask.maxy, location of the higher end in the
 Yaxis for each ensemble neuron. Needed to apply the neuronMask *
 strcMask.miny, location of the lower end in the Yaxis for each ensemble
 neuron. Needed to apply the neuronMask * strcMask.neuronMask,
 Mask for each ensemble neuron * strcMask.xctr, location of the center
 Xaxis for each ensemble neuron * strcMask.yctr, location of the center
 Yaxis for each ensemble neuron * strcMask.width, Width of each ensemble
 neuron * strcMask.height, Height of each ensemble neuron *
 `target_calibration.mat`: Metadata used by the algorithm to calibrate the
 BMI. **Additional Information**: * **Python**: A high-level programming
 language widely used in scientific computing, data analysis, and machine
 learning. It is known for its readability and extensive libraries, which
 facilitate a broad range of applications in research and development. *
 **Pandas**: A Python library used for data manipulation and analysis. It
 provides data structures like DataFrames. * **MATLAB**: A programming
 platform designed for engineers and scientists. It allows for matrix
 manipulations, plotting of functions and data, implementation of
 algorithms, and creation of user interfaces. MATLAB is commonly used for
 data analysis and visualization in research. * **DataFrame**: A
 two-dimensional, size-mutable, and potentially heterogeneous tabular data
 structure with labeled axes (rows and columns). It's similar to a
 table in a database or an Excel spreadsheet.