Method details

KC Kelly B. Clancy
TM Thomas D. Mrsic-Flogel
request Request a Protocol
ask Ask a question
Favorite

A week before training, mice were prepared for imaging. Animals were anaesthetised with a mixture of fentanyl (0.05 mg per kg), midazolam (5.0 mg per kg), and medetomidine (0.5 mg per kg). The animal’s scalp was resected and a head plate was secured to the skull. Four stereotaxically placed marks were made to enable alignment of the imaged brain with the Allen Brain Atlas (http://mouse.brain-map.org/static/atlas) post hoc, using the Allen Brain API (http://help.brain-map.org/display/api/Allen+Brain+Atlas+API). The exposed skull was cleaned and covered with transparent dental cement to avoid infection, and to cover the cut scalp edges (C&B Metabond). This was polished to enhance the transparency of the preparation. A custom-made 3D printed light shield was cemented to the skull and head plate to avoid light leaks from the visual feedback presented on two computer monitors.

The recording chamber was sound-isolated and shielded from outside light. Mice were head-fixed under the microscope and free to run on a Styrofoam running wheel (diameter = 20 cm, width = 12 cm). The animals’ movements were recorded using a rotary encoder in the wheel axis (pulse rate 1000, Kubler). Two monitors were placed side by side in front of the mouse, angled toward one another (21.5” monitors, ∼20 cm from mouse, covering ∼100x70 degrees of visual space), similarly to the setup described in Poort et al. (2015). A reward port was place in front of the animal, where reward delivery was triggered via pinch solenoid one second after target hit (NResearch) and animal licks were detected using a custom piezo element coupled to the spout. All behavioral data were recorded using custom MATLAB software and a PCI-6320 acquisition board (National Instruments).

On electrophysiological recording days, pupil recordings were taken by illuminating the animal’s right eye with a custom IR-light source and imaging with a CMOS camera (DMK22BUC03, Imaging Source, 30 Hz) using custom MATLAB software. Pupil size was determined as described in Orsolic et al. (2019): images were first smoothed with a 2-D Gaussian filter and thresholded to low luminance areas. These thresholded regions were then filtered by circularity and size to automatically detect the pupil region. Pupil edges were detected using the canny method, and ellipses were iteratively fit to the region, tasked to minimize the geometric distance between the area outline and the fit ellipse using nonlinear least-squares (MATLAB function fitellipse, Richard Brown). The pupil diameter was taken to be the major axis of the ellipse, then normalized by animal. Pupil recordings from one animal had to be discarded, as the video was not sufficiently in focus.

After recovery, mice were acclimatised to head fixation for a minimum of two days, and started on food restriction. Awake animals were head-fixed under the microscope and free to run on a Styrofoam wheel. A baseline of spontaneous activity was taken on every training day (10-20 minutes) in order to estimate spontaneous hit rates. The decoder was calibrated such that animals achieved ∼25% performance on their first day. Two small control regions were chosen for real-time read out. In the case of visual feedback task, these were all located in primary and secondary motor cortex, avoiding ALM. In the auditory feedback task, control regions were placed in posterior cortex, over visual and retrosplenial areas. The placement of the two control regions was usually ipsilateral but sometimes contralateral to each other. The same control regions were used for the first few days of training, then changed from day to day, or within sessions, so that animals did not learn a fixed control strategy (see Table S1).

Activity was imaged at 40 Hz and the mean fluorescence from each control region was transmuted to the cursor’s position on screen with a simple transform:

where p is the cursor position at time t, FR1 and FR2 are the instantaneous fluorescence (ΔF/F) of control regions one and two, respectively, and A1, A2 and B are coefficients set based on the daily spontaneous baseline recordings (minimum 10 minutes). P was rounded to the nearest integer to determine the discrete cursor location. A1 and A2 were determined by dividing the full dynamic range of each recorded area during the baseline by half the number of cursor positions:

B represents the activity baseline of both areas. The chance performance was then assessed by running the baseline data through the decoder to estimate how often the animal would have achieved the target with spontaneous activity.

ΔF/F was calculated using a moving baseline, set as the tenth percentile of points from the preceding 20 s of data. The raw fluorescence was converted to ΔF/F using a moving baseline of 5 minutes of activity. The display updated at approximated 10 Hz, with a latency of 300 ms from camera to screen, measured using a photodiode placed on one of the monitors (Thorlabs, PDA100A-EC). Activity in R1 would cause the cursor to move toward the target location in the center of the animal’s visual field, while increased activity in R2 would cause the cursor to move away from the target zone. The cursor was presented on two monitors so that the animal could track the cursor with both eyes; its goal was to move the cursors presented on the two screens on either side to the middle of its visual field. These changes were binned, such that the cursor could take one of eight possible locations on the screen. The cursor had to be held at the target position for 0.3 s to count as a hit, at which point the cursor disappeared. When a target was hit, a MATLAB-controlled Data Acquisition board (National Instruments, Austin, TX) triggered the administration of a soyamilk reward following a 1 s delay. The next trial could be initiated within 5 s of reward delivery, but only when the activation of R1 relative to R2 returned to the mean value recording during spontaneous activity (to ensure enough time had passed for large transients to decay, given slow calcium dynamics). This was return to baseline condition was rarely triggered (∼5% of trials) and on average lasted under 2 s. If the animal did not bring the cursor to the target within a 30 s trial, the cursor disappeared, and the animal received a white noise tone and a 10 s ‘time out.’

We trained a separate cohort of four mice using an auditory, rather than visual, feedback cursor, where activity was transmuted to the pitch of a feedback tone (Clancy et al., 2014). As with the visual feedback task, a spontaneous baseline was recorded every day (10-20 minutes) to assess chance levels of performance and calibrate the decoder. Activity from two arbitrarily chosen regions was entered into an online transform algorithm that related neural activity to the pitch of an auditory cursor:

Where f is the cursor frequency, FR1 is the instantaneous ΔF/F of R1, FR2 the instantaneous ΔF/F of R2, and A1, A2, and B are coefficients set based on the daily baseline recording. As above, ΔF/F was calculated using a moving baseline, set as the tenth percentile of points from the preceding 20 s of data. Linear changes in firing rate resulted in exponential changes in cursor frequency, and frequency changes were binned in quarter-octave intervals to match rodent psychophysical discrimination thresholds. As with the visual task, a trial was marked incorrect if the target pitch was not achieved within 30 s of trial initiation. The auditory feedback was played using speakers mounted on 2 sides of the imaging platform.

In the task condition, the position of the presented cursor was determined by the control regions’ instantaneous activity, according to Equation 1 above. Rewards were given when the cursor hit the target zone (cursor position 8). Similarly, in the random reward condition, intended to test whether animal’s task engagement was goal-directed or habitual, the position of the presented cursor was determined by the control regions’ instantaneous activity, according to Equation 1 above. However, here rewards were not linked to the cursor position, but given out at random time intervals at a rate matched to an expertly performing animal (approximately 1.5 rewards/minute). In the random feedback condition, intended to confirm that the animal was using the visual feedback to inform its behavior, the position of the presented cursor was not linked to the control regions’ instantaneous activity, but instead was drawn randomly from a Gaussian distribution matching the mean and variance of a typical task condition. The animal could still receive rewards if they achieved the correct neural activity pattern, but their performance drop suggests they could not achieve that in the absence of appropriately linked sensory feedback. In the passive playback condition, the presented cursor position was no longer linked to the control regions’ activity, but was purely a replay of the cursor positions from a training session the animal had undergone previously. Thus, the cursor positions and timing of trials in the playback condition were matched to those of the task condition. Because the statistics of the sensory presentations between the task and playback conditions (e.g., cursor position identity, and likelihood of transition between different positions) were identical, this allowed a cleaner comparison of neural responses in these conditions.

Widefield imaging was performed through the intact skull using a custom-built epifluorescence macroscope with photographic lenses in a face-to-face configuration (85mm f/1.8D objective, 50mm f/1.4D tube lens; Ratzlaff and Grinvald, 1991). Data were recorded using a CMOS camera (Pco.edge 5.5, PCO, Germany) in global shutter mode. 16-bit images were acquired at a rate of 40 Hz and binned 2x2 online using custom-made LABVIEW software. A constant illumination at 470 nm was provided (M470L3, Thorlands, excitation filter FF02-447/60-25), with average power ∼0.05 mW/mm2 (emission filter 525/50-25, Semrock). The imaging site was shielded from light contamination using a 3D-printed blackout barrier glued to the animal’s skull. Signals from the two control regions were sent via UDP to a computer providing visual or auditory feedback to the mouse, using custom MATLAB software.

The day before recording, mice were anesthetised with isofluorane and a small craniotomy was opened over AM, which was functionally identified during task performance, and stereotaxically confirmed. The craniotomy was kept damp with Ringer’s solution and sealed with KwikSil (World Precision Instruments). Recordings were taken on the following day to avoid residual effects of anesthesia.

On the recording day, animals were head-fixed under a custom-built widefield microscope, the skull and cortex were cleaned with Ringer’s solution, and the KwikSil plug removed from the craniotomy. A custom-designed silicon probe (64 channels, 2 shanks, Neuronexus, as described in Clancy et al., 2019) was inserted at an angle of ∼45 degrees from normal to cortex. The probe consisted of two shanks with 64 sites total, organized into 16 ‘tetrodes’, each consisting of 4 sites located 25 um apart from each other within-tetrode, and tetrodes spaced 130 um apart from each other. A small amount of KwikSil or agar was used to cover the exposed cortex after the probe was in place. After allowing the probe to settle for 20-30 minutes, neural activity was recorded using the OpenEphys recording system (Siegle et al., 2017). Behavioral and stimulation data, including pulses representing each camera frame, were recorded using OpenEphys, enabling the alignment of electrophysiological signals with imaging and behavioral data. Ephys recordings were filtered between 700 and 7000 Hz, and spikes detected using the Klustakwik suite (Schmitzer-Torbert et al., 2005). Clusters were assigned to individual units by manual inspection, excluding any units without a clear refractory period. Units were separated into fast and broad spiking units by their peak-to-trough time, using a cutoff of 0.66 ms (Barthó et al., 2004).

Raw imaging data were checked for dropped frames, spatially binned 2x2, and loaded into MATLAB as a mapped tensor (Muir and Kampa, 2015). The raw fluorescence was converted to ΔF/F using a moving baseline, calculated as the tenth percentile of points from the preceding 20 s of data. We did not perform hemodynamic correction as previous work indicates that hemodynamic and flavoprotein signals contribute minimally compared to the calcium responses (Vanni and Murphy, 2014; Xiao et al., 2017; Clancy et al., 2019).

Task-activation maps were calculated by taking the normalized average of fluorescence movies during the task, or visual cursor playback period, subtracted by periods when animals were not performing the task or viewing any visual stimuli (including periods of spontaneous activity, and reward collection). To ensure that differences between early and late in training were not influenced by possible differences in the statistics of the visual feedback cursor, we randomly excluded success trials on late training days in order to have comparable numbers of success and failure trials between early and late training, however, including or excluding these trials did not influence the result. To build the single-unit affiliation maps (Figure S6; see also Clancy et al., 2019), spike trains were binned to match imaging frames, and maps were calculated by taking the correlation of each unit’s spike train with each pixel’s ΔF/F.

Spectral entropy was calculated in 10 s windows, each overlapping by 5 s. The calcium signal of the control areas was transformed into power spectral density (PSD) during these windows (the magnitude squared of the signal’s Fourier transform). This was then used to calculate the spectral entropy for that time span:

Where SE is the spectral entropy, PSDn is the normalized PSD, and fs is the sampling frequency.

Spike data were binned into 50 ms bins, and split into 40 segments for training: 39 of these splits were used for training the classifier and 1 was used for testing. The data were z-score normalized so that high firing rate units didn’t bias the classifier results. This data was then used, along with the cursor position labels, to train the classifier: a mean vector was created for each cursor position class based on the training data, and predictions were made on the test data by choosing the label class with the maximum correlation between the test and training mean vectors. These predicted labels were compared with the true labels to generate an average classifier accuracy over each tested time bin. This process was repeated 20 times using different training/test splits to cross-validate the results. The final reported classification accuracy is the mean of these 20 runs.

Do you have any questions about this protocol?

Post your question to gather feedback from the community. We will also invite the authors of this article to respond.

0/150

tip Tips for asking effective questions

+ Description

Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.

post Post a Question
0 Q&A