Summary
In rodent whisker sensation, whisker position signals including whisking phase are integrated with touch signals to enable spatially accurate tactile perception, but other functions of phase coding are unclear. We investigated how phase coding impacts neural coding of surface features during surface whisking. In mice performing rough-smooth discrimination, S1 units exhibited much stronger phase tuning during surface whisking than in prior studies of whisking in air. Among putative pyramidal cells, preferred phase tiled phase space, but protraction phases were strongly over-represented. Fast-spiking units were nearly all protraction-tuned. This protraction bias increased coding of stick-slip whisker events during protraction, suggesting that surface features are preferentially encoded during protraction. Correspondingly, protraction-tuned units encoded rough-smooth texture better than retraction-tuned units, and encoded the precise spatial location of surface ridges with higher acuity. This suggests that protraction is the main information-gathering phase for high-resolution surface features, with phase coding organized to support this function.
Keywords: Active sensation, whisking, phase coding, somatosensory cortex, barrel cortex, population code, localization, texture
eTOC Blurb
Isett and Feldman test how neural coding of whisking phase in S1 shapes the coding of surface features. Phase tuning is robust and protraction-biased on surfaces, and acts to enhance coding of both texture and local surface features during protraction.
Introduction
In active sensation, animals move sensory organs (e.g., fingertips or whiskers) to sample the world, and the brain integrates sensory input with information about sensor position to construct a representation of external objects and their locations. How this integration works is not well understood. In whisker tactile sensation, mice sample the environment by whisking, in which the whisker array is oscillated at 10–20 Hz creating rhythmic protraction-retraction cycles around a slowly varying average set point. Whisker position is thought to be an important part of the tactile code for object localization [1–4]. Position information is thought to be derived in part from information about whisking phase that is encoded directly by primary afferents in the whisker follicle [5–8]. During whisking in air, many neurons in somatosensory cortex (S1) are tuned for whisking phase, although this tuning is relatively weak (~10% modulation of firing rate by phase) [9–11]. When rats whisk in air to locate objects, S1 neurons respond most strongly to object contact at their preferred whisking phase, suggesting a potential code for object localization [10]. However, a recent study shows that phase information is not necessary to explain localization of a pole by head-fixed mice, suggesting a need to re-evaluate this dominant model [2].
We hypothesized that phase tuning may play a different and stronger role during whisking on surfaces, where it could shape coding of surface properties and local surface features. During surface whisking, whisker-surface interactions generate vibrational cues such as stick-slip micromotions, which are used as cues for surface roughness [12–18] and also signal discrete, spatially localized surface features [16]. Head-fixed mice increase surface whisking during training on a texture discrimination task [19]. But the extent of phase tuning during surface whisking, and its role in coding of surface properties, are entirely unknown.
We studied phase coding in S1 during surface whisking as mice performed a rough-smooth surface discrimination task. We found remarkably strong phase tuning on surfaces, with 75% of S1 units significantly tuned for phase, and robust modulation of firing rate by phase for these units. While all phases were represented in S1, most units preferred protraction phases. This resulted in stronger responses to whisker slips during protraction, higher overall firing rates, and better coding of roughness and feature location by protraction-preferring vs. retraction-preferring units. Phase coding thus exhibits a protraction bias that strongly impacts coding of surface features.
Results
S1 neurons show diverse phase tuning during texture discrimination behavior
We examined neural coding for whisking phase in single-unit recordings from S1 while mice performed a texture discrimination task with active whisking [16]. Head-fixed mice were trained to run on a virtual track while whisking (mean 17.7 ± 1.2 Hz) on surfaces presented on a stimulus cylinder (Figure 1A). All whiskers except C1 and C2 were trimmed to enable high speed (4 kHz) 1-dimensional imaging of whisker angular position. Surfaces included raised gratings (2, 4, 8 and 10mm spatial period) or coarse sandpaper (P150), collectively called “Rough”, and a smooth acetate surface (“Smooth”). One randomly chosen surface was presented per trial. Mice were trained operantly to lick to any of the Rough stimuli (Go stimuli) and withhold licking to the Smooth stimulus (NoGo stimulus). On 7% of trials, the stimulus cylinder was kept just out of reach, allowing mice to whisk in air (“Air”). Mice performed the task well (77 ± 3.1% correct; n=5 mice) (Figure 1B).
Figure 1. Phase tuning for example S1 units during roughness discrimination.

A. Rough-smooth discrimination task. Purple line, whisker imaging plane. Arrows, stimulus rotation proportional to mouse running speed. B. Behavioral performance, quantified as percent of lick trials for each stimulus. Rough and Smooth, n=5 mice. Air, n=4 mice (one mouse not trained on Air trials). Paired t-test with Dunn-Šidák correction. Error bars show mean ± SEM. C. Recording in C1 or C2 column and coordinate system for measuring whisker angular position (black) and phase (colors). D. One example trial showing spikes of 32 single units aligned to whisker angle, stick-slip events defined by acceleration transients, and whisking phase. E–H. Phase responsiveness of 4 simultaneously recorded units in the C2 whisker column: a L4 fast-spiking (FS) unit tuned for protraction (E), a L5A regular spiking unit tuned for retraction (F), a L5A RS unit with bimodal phase tuning (G), and a L3 RS unit with no significant phase tuning (G). Top, spike raster on all surface trials aligned to time of maximum C2 whisker retraction. Middle, PSTH and mean z-scored whisker angle, across all whisk cycles (14,111 for this session). Bottom, phase tuning across all whisk cycles. Black, observed spiking on surfaces (n=557 trials). Blue, smoothing spline fit to this data. Red, firing rate expected by chance (Χ2 GOF). Yellow, smoothing spline fit to spiking during whisking in Air (n=65 trials). Χ2 GOF comparing surface phase tuning histogram to uniform distribution: E, Χ2=566.5, p < 1×10−40; F, Χ2=235.6, p=1.82×10−40; G, Χ2=267.2, p < 1×10−40; H, Χ2=16.0, p=0.5237. * p < 0.05, ** p < 0.01, *** p < 0.001. See also Figure S1.
We recorded spikes with multi-site silicon probe electrodes from C1 or C2 whisker columns in S1 during behavior, while imaging the angular position of the whiskers relative to the face (Figure 1C). We spike sorted to isolate single units across layers 2/3 to 5B. From the whisker position traces, we extracted whisker phase via a Hilbert transform, and we detected stick-slip events as whisker motion transients with acceleration > 2.5 SD above the mean (see Methods). Analysis was restricted to epochs in which the whisker remained in constant surface contact [16]. Overall, 426 units were recorded in 15 sessions of 5 mice. For each unit, we then analyzed the relationship between spiking and whisking phase and stick-slip events for the whisker corresponding to the recorded S1 column (Figure 1D).
Many S1 units were strongly tuned to whisking phase during surface whisking. Phase tuning was diverse, and included protraction-preferring, retraction-preferring, bimodally responsive, and untuned units. These were typically intermixed at single sites (Figure 1 E–H). A unit was considered phase responsive if its distribution of firing rate in phase differed from a uniform distribution (Χ2 goodness of fit (GOF), α=0.05), and its preferred phase was defined as the circular mean of the phase tuning curve. Phase-responsive units showed substantially stronger spiking and phase tuning during whisking on surfaces vs. whisking in air, assessed during interleaved Air trials (Figure 1E–H). The great majority of phase-responsive units had a single preferred phase during either protraction or retraction (i.e., were unimodally phase-tuned; Figure 1E–F).
Phase tuning does not simply reflect underlying tuning for whisker angle, even though units can exhibit tuning for both angle and phase (Figure S1A–D). To demonstrate this, we controlled for angle tuning by resampling spikes so that each unit had a uniform firing rate distribution across whisker angle (Figure S1C–G). After controlling for angle by this method, 92.5% of phase tuned units maintained phase tuning and exhibited the same modulation depth and preferred phase as before controlling angle (Figure S1H–J). Thus, many S1 neurons exhibit phase tuning during surface whisking in awake mice.
Phase tuning tiles whisker phase but shows a strong bias towards protraction
Seventy-five percent (321/426) of S1 single units showed significant phase responsiveness on surfaces (Figure 2A). Preferred phase was diverse across phase responsive units, and tiled phase space (Figure 2B–C). Within this diversity, however, units that preferred protraction were strongly over-represented, accounting for 70.4% (226/321) of phase-responsive units (Figure 2B–C). 91.3% of phase-responsive units were unimodally phase-tuned, but a small fraction (8.7%, 28/231) had bimodal phase tuning. Bimodal units met quantitative single unit isolation criteria (Figure S2).
Figure 2. The majority of S1 units are tuned for protraction.

A. Fraction of units in each layer that were phase-responsive. B. Preferred phase (theta) and modulation depth (rho) for each unit. Red, phase responsive units (p < 0.05, n=321/426 units). Black, units without phase responsiveness (n=105). C. Phase tuning curve (Z-scored firing rate) for each unit, sorted by preferred phase. D. Preferred phase on Rough vs. Smooth surfaces for units with phase tuning on both (scatterplot, n=213 units) and for remaining units that were phase tuned only on Rough or Smooth (marginal histograms, n=76 and 35 units). Yellow, fast spiking (FS) units. Black, regular spiking (RS) units. E. Phase modulation depth on Rough vs. Smooth surfaces for units tuned for both. F. Preferred phase on Surface stimuli (Rough or Smooth) vs. Air for units with phase tuning during both (scatterplot, n=87 units) and for remaining units phase tuned only on Surfaces or Air (n= 234 and 15 units). G. Preferred phase and modulation depth for all phase-responsive RS units (blue, n=190/275 RS units) and FS units (yellow, n=131/151 FS units). H. Phase tuning for RS and FS units by cortical layer. Blue and black lines show mean for RS and FS, respectively. I. Phase modulation depth (mean ± SEM) for all phase tuned units differed across layers (p=3.81×10−9, df=298, one-way ANOVA and post-hoc multiple comparison). * p < 0.05. J, Median ± CI95 firing rate for all units during protraction and retraction phases of whisking (n=426 units, p = 3.95×10−12, paired Wilcoxon signed-rank test). See also Figures S2 and S3.
To test whether phase tuning was stable across surface types, we analyzed unit phase preference separately for Rough and Smooth stimuli, which were interleaved across trials. 213 of 321 units (66.4%) were significantly phase-responsive for both surface types. Of these, preferred phase on Rough was highly correlated with preferred phase on Smooth (R2=0.78, Figure 2D). Average phase modulation depth was 0.83, and was also highly similar on Rough vs. Smooth (R2=0.70; Figure 2E). By contrast, only a quarter of units that were phase responsive on surfaces were also phase responsive during whisking in air (27.1%, 87/321), and for these units, preferred phase was not consistent between surface and air trials (R2=0.005, Figure 2F). This lack of correlation between phase tuning on surfaces vs. air is also apparent for the full set of single units (Figure S3A). The magnitude of phase modulation (calculated as (max-min)/mean firing rate) was nominally greater in air than on surfaces, due to very low mean firing rates in air. But when calculated relative to lifetime mean firing rate (across air and surfaces), phase modulation was substantially greater on surfaces (Figure S3B–D), reflecting the pronounced modulation of absolute spike rate with phase on surfaces (e.g., Figure 1E–G).
Parvalbumin-positive interneurons receive strong thalamocortical input [20] and critically filter whisking-related signals in S1 [21], suggesting that their phase tuning may differ from, and help shape, phase tuning in excitatory cells. We compared phase tuning between fast spiking units (FS, presumed PV interneurons) and regular spiking units (RS, presumed excitatory cells). RS and FS units were identified on the basis of spike waveform duration. While RS units showed a broad distribution of phase tuning, FS units were markedly and almost exclusively selective for protraction (91.6%, 120/131) (Figure 2G). Phase tuning was found in all cortical layers (Figure 2H), though deep layers showed less phase modulation depth than L4, and L5A RS cells showed less protraction bias than other layers (Figure 2I).
Thus, RS cells showed largely unimodal phase tuning that tiled phase space but with a general bias towards protraction, while FS units were almost exclusively tuned for protraction across cortical layers. This overall protraction bias on surfaces was reflected in mean firing rate across all S1 units: during surface palpation, units fired ~0.5 Hz more during protraction (3.1 Hz) than retraction (2.6 Hz; Figure 2J).
Coding of stick-slip events is enhanced during protraction
During whisking on surfaces, frictional interactions between the whisker and surface generate discrete, high-acceleration stick-slip micromotions. These stick-slip events are elementary encoded features of whisker input on surfaces [12,13], and contribute to coding of surface roughness [16]. We tested how phase tuning interacts with stick-slip responses. First, we identified stick-slip events and calculated the stick-slip triggered PSTH for each unit (Figure 3A). We identified stick-slip-responsive units as units with a statistically significant change in firing rate in the 20ms post-stick-slip relative to baseline. 43.9% of all units (187/426) were stick-slip responsive, and about half of phase responsive units were stick-slip responsive (53.3%, 171/321). Stick-slip responsive (SS) and non-stick-slip responsive units (NSS) were both biased towards protraction phase during surface whisking (mean preferred phase: −33.4 degrees vs. −31.7 degrees) but SS units had greater phase modulation depth (rho=0.91 vs. 0.72; p=8.94 ×10−5, t-test) (Figure 3B).
Figure 3. Relationship between phase tuning and stick-slip responses.

A. Spiking for an example L4 unit to all stick-slip events on the C2 whisker. Top, mean stick-slip waveform. Black and red bars, 20-ms baseline and slip-evoked response windows. Bottom, baseline-subtracted spike density histogram across all slips. B. Phase tuning of stick-slip responsive units (SS, n=187) and non-stick-slip responsive units (NSS, n=239). Grey and pink lines, mean preferred phase and modulation depth for NSS and SS, respectively. C. Stick-slip rate for protraction vs. retraction phases (p=0.064, paired t-test, n=15 sessions). D. Stick-slip amplitude for protraction vs. retraction phases (p=2.87×10−4, paired t-test, n=15 sessions). E–F. Stick-slip rate and amplitude after random down-sampling of events to equalize amplitude in each phase bin (rate: p=0.694, n=15 sessions; amplitude: p=0.823, n=15 sessions, paired t-tests). G. Mean phase tuning during stick-slip periods, shown as mean z-scored response to stick-slip events in each phase bin (n=187 SS units), after resampling stick-slips to equalize amplitude across phase bins. Right histogram: Mean ± CI95 of firing rate in the 20ms response window. ***, p=1.81 × 10−22, paired t-test, n=187 SS units. H. Mean phase tuning during non-stick-slip periods, sampled from randomly chosen non-stick-slip epochs, to estimate background phase tuning on surfaces independent of stick-slips. Same units as in (G). ***, p = 1.09 × 10−21, paired t-test, n=187 SS units. I. Phase tuning of ΔSSR signal, calculated by subtracting phase tuning of slip epochs (G) minus background phase tuning on surface independent of slips (H). Conventions as in G–H. ***, p=3.85 × 10−5, paired t-test, n=187 SS units. J. Preferred background phase (from non-stick-slip periods, H) vs. for overall surface spiking (Figure 2B) for SS units that were phase tuned in both conditions (n=133), and for remaining units that were only phase tuned in one condition (marginal histograms, n=5 and n=188 units). K. Preferred background phase of each SS unit vs. preferred phase for ΔSSR signal for units with tuning for both (scatterplot, n=171 units), and for remaining units that were only phase tuned in one condition (n=200 and n=20 units). L. Preferred phase in Air vs. for ΔSSR signal for SS units with phase tuning in both conditions (scatterplot, n=46 units) and for remaining units with phase tuning in only one condition (n=56 and n=141 units). See also Figures S4 and S5.
Because S1 neurons encode the occurrence and strength (acceleration) of whisker stick-slip events [13,16], we asked whether the general preference for protraction phase tuning simply reflected more frequent, or stronger, stick-slip events during protraction than retraction. Stick-slip rate was not significantly different between protraction and retraction halves of the whisk cycle (pro = 30.41 ± 3.8 Hz, re = 26.32 ± 3.7 Hz, p=0.064, paired t-test), but stick-slip amplitudes were modestly greater during protraction (pro = 0.96 ± 0.07 |m/s2|, re = 0.86 ± 0.05 |m/s2|, p=2.87×10−4, paired t-test; Figure 3C–D). To test whether this amplitude difference was responsible for the protraction phase preference in SS units, we binned stick-slips into phase bins and randomly down-sampled events so that remaining events were matched in amplitude across all phase bins (Figure 3E–F, see Methods). SS units spiked substantially more, on average, to stick-slip events during protraction than retraction, even after equalizing stick-slip amplitude in each phase bin by this procedure (Figure 3G). Thus, protraction phase preference is not due to a bias in stick-slip kinematics across whisking phase.
The dominant model of phase-based localization in air posits that S1 neurons receive separate phase and contact signals, and that these interact supralinearly to amplify spiking when contact occurs at a neuron’s preferred phase [1,10]. To test whether this model holds for stick-slip events on surfaces, we first asked whether neurons exhibit a consistent, characteristic phase tuning for different surface signals, including overall surface spiking, stick slip responses (defined as firing rate 0–20 ms after each stick-slip, calculated after equalizing stick-slip amplitude as in Figure 3E–G), and “background” phase tuning on surfaces in the absence of stick-slips, estimated by bootstrapping from random non-stick-slip periods. This analysis was done on SS units. Each of these signals showed a protraction phase tuning bias across the population (Figure S4A). But while individual units showed similar phase preference for overall surface spiking and background non-stick-slip periods (R2=0.61, Figure 3J), phase preference for stick slip responses was less well matched (R2=0.13), and also did not match phase tuning in air (R2=0.00006, Figure S4B).
Second, we asked whether SS units amplified stick-slip responses preferentially at their preferred phase during background whisking. At the population level, background spiking of SS units showed a strong protraction bias (Figure 3H). For each unit, we quantified the phase-dependent modulation of stick-slip responses (ΔSSR) as the difference between the measured stick-slip response in each phase bin (after equalizing stick-slip amplitude across phase) and its background phase tuning. ΔSSR therefore represents the phase-dependent amplification (delta) of slip-evoked spikes above the spiking driven by background phase tuning alone. On average across units, ΔSSR was slightly larger during protraction than retraction, suggesting that some supralinear interaction modestly enhances stick-slip responses during protraction (Figure 3I). However, for individual units, maximal ΔSSR did not occur at the unit’s preferred background phase. Instead, preferred phase for the ΔSSR signal was broadly distributed (Figure S4A), and was uncorrelated to background phase tuning on surfaces, or to phase tuning in air (Figure 3J–K). Thus, S1 units do not appear to amplify stick-slip responses most strongly at their preferred phase, nor do they exhibit a constant characteristic phase preference across air and surfaces. Thus, while there is an overall protraction bias on surfaces and for stick-slip responses, the details of phase preference do not match predictions of a stable phase-based population code for contact location [1,10]. This raises the possibility that phase tuning has a different function for surface coding.
Neurons are tuned jointly for phase and stick-slip events
To better understand the diversity of stick-slip responses and phase tuning, and whether these were independent or systematically related, we performed principal components analysis (PCA) jointly on phase tuning curves and stick-slip PSTHs for each unit (Figure S5). The phase tuning curve and stick-slip PSTH were normalized and concatenated to form a single vector for each unit. PCA was performed on these vectors. The top 3 principal components (PCs) explained 67.5% of tuning variability across units (Figure S5A–C). All three PCs were defined by a combination of both phase and stick-slip responses. To understand the extracted PCs, we examined the normalized phase and stick-slip tuning of each unit, sorted by PC score (Figure S5A–C). PC1 captured joint tuning for late protraction phase (−90 to 0 degrees) and stick-slip-evoked spiking. Units with the top 50% of PC1 scores had mean phase tuning of −52.6 ± 37.8 degrees, and strong stick-slip-evoked responses. PC2 captured joint tuning for early protraction phase (−180 to −90 degrees) and stick-slip evoked suppression of spiking. The small number of units with strong negative PC2 scores represent early protraction-tuned, slip-responsive units. PC3 (and PC4, 6.5% of variability, not shown) captured units with bimodal phase tuning plus slip-evoked spiking. Thus, phase tuning and stick-slip responsiveness are not independent, with late protraction-tuned units showing particularly strong slip-evoked responses.
Protraction-tuned units carry more information about surface roughness
Neural coding for surface roughness in S1 relies, in large part, on population responses to stick-slip kinematic events, with rougher surfaces generating higher population firing rates than smooth surfaces [16,18]. Because most S1 units are protraction tuned (Figure 2) and protraction tuning enhances stick-slip spiking responses (Figure 3), we hypothesized that roughness is primarily encoded by protraction-tuned SS units. To test this, we first compared mean surface-evoked firing rate on smooth vs. rough surfaces for protraction-tuned vs. retraction-tuned SS units (phase preference determined from stick-slip responses). Protraction-tuned RS and FS units fired at significantly higher rate on rough vs. smooth surfaces, while retraction-tuned RS units and FS units did not (Figure 4A). We then used receiver operating characteristic (ROC) analysis of individual RS stick-slip responsive units to measure how well firing rate predicted rough vs. smooth stimulus identity on a single-unit, single-trial level. Prediction accuracy was calculated as the area under the ROC curve (AUROC) for each unit (Figure 4B–D). Protraction-tuned RS units discriminated rough vs. smooth stimulus identity significantly better than retraction-tuned RS units (Figure 4E). Thus, protraction-tuned RS units carry more texture information per unit than retraction-tuned units.
Figure 4. Preferential coding of texture and localized surface features by slip-sensitive protraction-tuned RS units.

A. Firing rate (mean ± SEM) for RS and FS units on Rough and Smooth stimuli. Firing rate was calculated as FR on stimulus patch - FR on preceding baseline surface. *** p = 0.0004, * p = 0.029 (paired t-test). B–C. ROC curve calculation for one example RS unit. For each value of a sliding threshold, firing rate < threshold was taken to predict Smooth stimulus, and firing rate > threshold predicted Rough stimulus, yielding the ROC curve in (B). D. AUROC values for all RS units that showed phase tuning to isolated stick-slips. E. Distribution of AUROC in (F) for protraction- and retraction-tuned RS units (p=0.004, 2-sample t-test). F–G. Analysis of spatial acuity for coding of individual ridge locations. F. Normalized spike density as a function of whisker position on the surface, for an example protraction-tuned (red) and a retraction-tuned RS unit (blue). Spike density was correlated with ridge locations, quantified by maximum cross-correlation coefficient (R) and adjusted in position for the lag of this maximum for visualization purposes. G. Distribution of R values for protraction- and retraction-tuned RS stick-slip responsive units (n = 82, 38 units) on each grating (2-sample K-S test comparing protraction- and retraction-tuned units: 10mm, p=0.879; 8mm, p=0.611; 4mm, p=0.007; 2mm, p=0.032). H. Mean ± CI95 for R on each grating. Repeated-measures ANOVA revealed a protraction unit vs. retraction unit effect (asterisk, p = 0.023) that interacted with grating period (p=0.038). * p < 0.05. ** p < 0.01. *** p < 0.01.
Protraction-tuned units exhibit higher-acuity coding of surface feature locations
Whisker stick-slip events tend to occur at local surface features like ridges, so that instantaneous firing rate in S1 encodes the precise spatial location of ridges [16]. We tested whether protraction- and retraction-tuned RS units encoded ridge locations differently during whisking on spatial gratings. This analysis again focused on SS units, which carry stick-slip evoked spikes. During each recording session, four spatial frequency gratings were presented (2, 4, 8 and 10-mm spatial period). For each S1 unit, we recorded whisker position on the surface at the time of each spike, and constructed a spatial histogram of spiking relative to whisker position and ridge locations for each of these gratings [16] (Figure 4F). The precision of ridge encoding was quantified by calculating the maximum cross-correlation coefficient (R) between the spatial spiking profile and the spatial profile of ridge locations. Both protraction- and retraction-tuned RS units spiked to the first ridge encountered during whisking, and to each of the ridges on low spatial frequency gratings (8 and 10 mm period). For low spatial frequency gratings, protraction- and retraction-tuned RS units (N=82 and 38) encoded the full set of ridge locations with equal precision (example unit: Figure 4F). However, for high spatial frequency gratings (2- and 4-mm period), protraction-tuned RS units encoded ridge locations with higher precision than retraction-tuned units (example unit: Figure 4F). Across all units analyzed, protraction-tuned RS units showed enhanced coding of ridge location for these high spatial frequency gratings relative to retraction-tuned RS units (Figure 4G–H). Thus, protraction-tuned RS units encoded local surface features with higher spatial resolution than retraction units.
Model for effect of phase tuning on coding surface properties
Together, these results suggest a model of phase tuning during surface whisking (Figure 5) in which most S1 neurons are strongly tuned for a particular phase of whisking on surfaces, which differs from phase tuning during whisking in air (Figure 5A–B). The S1 population contains units that prefer all phases of the whisk cycle, but protraction-tuned units outnumber retraction-tuned units, and more spikes are produced during protraction (Figure 5B). Among stick-slip responsive neurons, which carry substantial surface information, protraction-tuned RS units carry most texture information, and also carry the highest-acuity information about discrete surface features (Figure 5C). Retraction-preferring neurons carry less texture information than protraction-tuned neurons, and lower-acuity information about discrete surface features (Figure 5C). Thus, protraction-tuned units play an outsized role in coding of surface properties.
Figure 5. Schematic of phase coding in S1 during whisking on surfaces.

A. During surface whisking, phase modulation is strong, and most S1 units are phase responsive and protraction tuned. Firing rate is schematized for one average whisking cycle. Color indicates preferred phase. B. During whisking in air, absolute firing rate modulation with phase is weaker, and phase preference in air and on surfaces are not related. C. During protraction, stick-slips are larger, stick-slip evoked spiking and overall spiking are greater, and spikes of protraction-tuned units encode surface features with high acuity. D. During retraction, stick-slips are smaller, the population produces fewer spikes, and retraction units encode surface features less accurately.
Discussion
Phase coding originates in the whisker follicle, where self-movement related forces drive spiking in primary afferents at specific phases during whisking in air [6–8]. Phase information is passed on to brainstem neurons [7] and eventually to S1, where during whisking in air, many neurons are tuned to whisking phase, albeit with a relatively modest modulation of firing rate [9–11]. When rats encounter objects during whisking in air, whisker contact signals are modulated by whisking phase, so that maximal firing is evoked by contact at each unit’s preferred phase, due to supralinear interaction between phase and contact responses [10]. This generates a population code for the phase of contacted objects. The cortex has been proposed to combine this phase information with whisking set point and amplitude signals to generate a code for absolute object spatial position in the whisking plane [1]. However, recent results question whether phase information is required for head-fixed mice to localize a pole, suggesting they may use a simpler strategy that does not require whisking phase [2].
We hypothesized that phase tuning may be more strongly involved in coding of surface features during whisking on surfaces, separate from any role in localizing objects in air. Surface whisking generates a temporally dense series of whisker forces and micromotions, including stick-slip events, that robustly evoke spikes in S1 [13,18]. We found that phase tuning is highly prevalent (75% of S1 units) during surface whisking, with much stronger firing rate modulation than for whisking in air (Figures 1 and 2 and S3). While RS (presumed excitatory) cells represented all possible preferred phases, protraction was strongly over-represented, and FS interneurons were almost exclusively protraction-tuned. This protraction bias was evident in both overall surface-evoked spiking, stick-slip responses, and during non-stick-slip periods, and did not derive from kinematic features of stick-slip events themselves. This protraction bias strongly enhanced coding of stick-slip responses during protraction, and generated higher population firing rate during protraction than retraction. In contrast to the standard model of phase-based location coding in air [10], stick-slip responses on surfaces were not preferentially amplified at each unit’s preferred phase, and preferred phase for each unit was not constant across conditions (air, surface, stick-slip responses). This argues against a simple model of phase-based localization of surface features.
Instead, we propose that the most relevant feature of phase tuning during surface whisking is its overall protraction bias, which suggests that protraction may be the main information-gathering phase for surface whisking. The origin of protraction bias remains unknown, but may be inherited from primary afferents [7,8] and reflect differences in forces in the follicle during protraction vs. retraction [6]. Protraction bias may relate to virtual forward running past objects in our experiment, but this is also a prominent feature of natural whisker sensation in freely exploring mice.
If the main function of phase tuning is to enhance coding of surface features during protraction, then protraction-tuned units in S1 should carry more information about surface features. Indeed, we found that among stick-slip encoding units, protraction-tuned units carry more texture information on single trials than retraction-tuned units, and encode the location of surface ridges with higher spatial acuity. This suggests that S1 produces higher-resolution “snapshots” of surface information during protraction than retraction.
Our findings indicate that FS cells produce a relatively synchronous, reliable volley of inhibition in S1 at the protraction-retraction phase boundary, likely extending through retraction. This volley is likely to have multiple impacts on S1 processing. First, it will suppress RS spiking during retraction, contributing to the dominance of protraction coding in S1. Second, it may restrict some forms of tactile integration to the protraction phase, for example by enabling amplification of stick-slip signals during protraction, when inhibition is minimal, but suppressing it during retraction (Figure 3I). This is similar to the idea that FS-mediated gamma rhythms create temporal windows for sensory-evoked spiking and stimulus detection in S1 [23,31]. Third, if different RS units receive different amounts of FS inhibition, it could help diversify RS phase tuning relative to cortical inputs.
In summary, our findings suggest a novel role for phase coding in S1—to enhance coding of surface features during protraction, thus making protraction the main information-gathering phase for high-resolution surface information. Mice adaptively modify whisking behavior as they learn to perform surface discrimination tasks [15,19,22]. We propose that this motor learning adjusts protraction kinetics to maximize information during each forward whisk.
STAR Methods
RESOURCE AVAILABILITY
Lead Contact
Further information and requests for data or analysis code should be directed to and will be fulfilled by the Lead Contact, Dan Feldman (dfeldman@berkeley.edu).
Materials Availability
This study did not generate new reagents.
Data and Code Availability
Experimental data and custom Matlab code used for analyses are available from the Center for Open Science https://osf.io/szg6e/ (DOI 10.17605/OSF.IO/SZG6E).
EXPERIMENTAL MODEL AND SUBJECT DETAILS
Adult male mice (C57BL/6, Harlan) were implanted with a light weight head post at P89 ± 44 days to allow head fixation during behavioral training and neural recording. Neural data were recorded at P265 ± 125 days (n=5, mean ± SD). All procedures were performed in accordance with UC Berkeley Animal Care and Use Committee and meet NIH guidelines. Mice were housed singly or in pairs with reverse light-dark cycle (12:12 hr). Behavior experiments were conducted at the same time of day during the dark (active) cycle, 5 days a week. Home cages included an enclosure and running wheel (Fast-Trac #K3251 and Mouse Igloo #K3327, Bio-Serv).
METHOD DETAILS
These data were collected as part of a prior study [16], and were analyzed here to examine phase coding. Detailed methods for behavioral training and neurophysiological recording are exactly as in [16].
Experimental Design
Inclusion and exclusion criteria of any data or subjects
This experiment required whisker imaging and neurophysiology in mice performing a roughness discrimination task. Inclusion and exclusion criteria are stated in Results and Figure legends, and are reiterated here. Behavior and neurophysiology results include all mice trained in Rough vs. Smooth discrimination task with successful neural data collection (n= 5 mice). The first mouse examined was not trained in ‘Air’ trials but was delivered Air trials during neural data collection, thus this mouse was excluded from analysis of ‘Air’ behavior (Figure 1B) but included for neurophysiology. The criterion for successful learning was 2 consecutive days of > 75% performance. For calculation of daily task performance, a sliding d′ window was used to exclude trials at the beginning and end of each behavioral session due to poor performance biased by satiety effects (15% of trials, see below). For neurophysiology, 1 recording session was excluded due to a misalignment in whisker imaging, leaving 15 sessions (across 5 mice) that were used for all analyses.
Sample-size estimation and statistical method of computation
We did not perform a priori sample-size estimation. Prior to experimentation, we planned to measure many hundreds of neurons in ≥ 5 mice, to align with similar studies. All analysis and statistics were performed on the full dataset after all data were collected.
Replication, blinding, randomization
Blinding was not relevant to this study, because there were no comparisons between mouse groups or treatments. Replication was achieved by using mice across 5 different litters. Replication was also implemented at the level of k-fold cross-validation in model-based analyses (see below). Randomization was implemented for stimulus delivery in the behavioral task (see below), which did not differ between subjects.
Surgical procedures
Head-post implant
Mice were anesthetized using 2% isoflurane in oxygen (vol/vol) and placed in a stereotaxic apparatus. Body temperature was maintained at 37 °C using a feedback-controlled heating pad (FHC, 40-90-8D) and a small incision was made in the scalp. The skull was cleaned and a stainless steel head post was implanted using dental cement (Metabond, Parkell), aligned to bregma and midline. Mice recovered for at least 1 week before start of behavioral training. After each mouse successfully learned the behavioral task, a cranial access chamber was drilled into the cement, centered on C1 and C2 whisker columns in S1. To localize these two columns, the mouse was anesthetized with isoflurane (1.5%) and chlorprothixene (0.025 mg/kg) and intrinsic signal optical imaging (ISOI) was performed through the intact skull [24]. After imaging, the cranial chamber was filled with silicone elastomer (Kwik-Cast, WPI), and sealed with a thin layer of dental cement.
In vivo electrophysiology
Before each electrophysiology recording session, mice were briefly anesthetized with 2% isoflurane. For the first day of recording, a small craniotomy (~ 0.1 mm) was made over the C1 or C2 column and mice were transferred to the behavior rig. A linear silicon probe (A1×16–5mm-25–177-A16 or A1×32–5mm-25–177-A32, NeuroNexus) was slowly inserted to desired depth (500–900 μm; Sutter MP285 motorized manipulator). The penetration location was measured relative to vascular landmarks for later reconstruction. The chamber was filled with silicone elastomer and the probe was allowed to settle into a stable position in the brain (45 minutes). Isoflurane was discontinued, and the mouse began behavioral trials and neural recording. After recording, the probe was removed and the chamber was sealed with a thin layer of dental cement. For subsequent days of recording, the same procedure was followed and brain access was achieved by removing the thin layer of dental cement.
Behavioral apparatus
Head-fixed mice were placed on a passive disk treadmill. Training was performed on a custom-built computer- and Arduino-controlled behavioral rig. Rig electronics monitored the mouse’s running velocity and licking, and presented Rough and Smooth stimuli on a stimulus cylinder accessible to the mouse’s right-side whiskers. The stimulus cylinder rotated in proportion to the mouse’s running speed to simulate the mouse running past the surfaces. Rig electronics controlled stimulus presentation and delivery of water rewards. A whisker imaging system measured the angular position of the whiskers during each trial, and calculated the position that each whisker contacted the stimulus surface. Rig control was performed by custom routines in Matlab and on Arduinos. Training and testing was performed in the dark.
Smooth vs. Rough discrimination training
Mice were placed on water regulation, and performed training to earn water rewards. Training proceeded in stages. First, mice were handled for 5–10 minutes for 2 days prior to any training. Next, mice were acclimated to head-fixation (1–2 days) and taught to lick for 2–5 μl water rewards that were paired with a 30 ms duration, 2.8 kHz tone (1–2 days). The mouse’s licks were tracked, and a reward could be earned when lick rate transitioned from < 1 Hz for 1 second to > ~3 Hz during an appropriate response window. Next, rewards were paired with presentation of rough stimuli (1–2 day). In early rough-smooth discrimination training, Rough (Go) and Smooth (NoGo) trials (50:50 proportion) were presented in blocks of 5±1 trials, with stimuli rotating past the whiskers at fixed velocity (“open-loop presentation”). This early training ended when mice performed with 5–10 correct transitions from Go to NoGo blocks, and exhibited overall accuracy of >70% for two consecutive daily training sessions. Mice then advanced to mid-stage rough-smooth discrimination training. In this phase, Rough (Go) and Smooth (NoGo) trials were randomly interleaved, but still in open-loop presentation, until the mouse achieved 2 consecutive days of > 75% performance (1–4 days). Mice then advanced to final-stage training, in which the Rough and Smooth stimuli were rotated past the whiskers at a velocity proportional to the mouse’s running speed (“closed-loop presentation”). Once stable performance was achieved, rows of right-side whiskers were gradually trimmed over 5 days until all but C1–C2 remained.
Behavior consisted of a series of trials. Each trial started when mice withheld licking for 2–3 seconds. The response window (1–2 seconds) started with stimulus movement (for open-loop trials) or by self-initiation by running 1–2 cm (closed-loop trials). A lick response on a Go trial (a Hit) triggered 3 μL water reward paired with a 30ms duration, 2.8kHz tone. Lick response on a NoGo trial (False Alarm) triggered a 300 ms, 10 kHz tone and a 5 second time out. No action was taken for Correct Rejections or Misses. On 7% of trials, the stimulus cylinder was kept just out of reach of the whiskers (Air trials, also called Catch trials). Catch trials were used to measure spiking during active whisking in Air, and also were used behaviorally to test whether mice utilized non-tactile cues for task performance. All training was performed in total visual darkness (using 850nm IR illumination for whisker imaging and lick detection) accompanied by loud white masking noise.
Stimulus surfaces
Rough and smooth stimuli were patches, 30 mm in length, affixed to an acrylic wheel (12.64 cm outer diameter, TAP plastics) covered with an acetate plastic sheet (3M, PP2950). Rough stimuli consisted of gratings with 2, 4, 8, and 10 mm spatial period and a coarse P150 sandpaper whose height above the cylinder surface was matched to the gratings (0.8mm above surface). Gratings had 50% duty cycle (e.g., 2 mm grating consisted of 1mm bars and 1mm gaps). Gratings were constructed from ±0.05 mm precision strips of 0.03” shim plastic (P/N: 9513K75, McMaster-Carr) glued (ZAP, PAAPT02) to the acetate surface of the wheel. Each rough surface was preceded on the cylinder by a smooth area consisting of acetate plastic alone. The Smooth stimulus was the acetate plastic alone. Glue was also applied above and below Smooth sections to control for the presence of glue odor. All stimuli were cleaned with odorless, water-based detergent (Process NPD, Steris) before every training session.
The stimulus cylinder was rotated with a stepper motor using 20,000 step/rotation micro-stepping (STM17R, Applied Motion). Between trials, stimuli were randomized using a paradigm that took the same number of steps to reach any position on the stimulus cylinder. In addition, we mounted a sham stepper motor next to the stimulus motor which presented randomly chosen stimuli during each trial. These steps were taken to prevent motor sounds from being used as task cues. Stimulus cylinder motors were controlled by independent Arduino Uno R3’s using custom code. Real-time closed-loop stimulus rotation was achieved by linking stepper motor rotation control to pulses generated by the running disk rotary encoder (P/N: H5–1000-IE-S, US Digital). The running disk consisted of a 6″ diameter disk machined from 1/16″ thick acrylic (P/N: 8560K172, McMaster-Carr) with a polypropylene mesh adhered for traction (mesh P/N: 9265T51, McMaster-Carr). A 4:1 run:move ratio was used for closed-loop stimulus rotation, to allow full running movements with a small stimulus cylinder. Mice traveled ~6 cm to bring the stimulus patch into whisker contact (~1.5 cm of stimulus rotation).
The stimulus cylinder stepper motor was mounted to a linear actuator that retracted the stimulus cylinder between trials, and brought it back into whisker contact prior to the start of each trial (except for Air trials, in which it was brought to a position just out of reach). The linear actuator was LP28 with NEMA11 motor, Parker Automation; Nippon Pulse AD1431 motor driver, 16x μsteps, 3,211 steps/cm. This linear sled was positioned at an angle of 52° from midline, and moved at a velocity of 3.1 cm/s. The linear onset had an S-curve velocity profile (max acceleration=12 cm/s2 in 150ms onset/offset acceleration trapezoids). Touch onset occurred during this linear translation of the stimulus assembly to the mystacial pad. During stimulus delivery (full whisker contact), the stimulus cylinder was 1.45 ± 0.05 cm from the mystacial pad. In between trials, during stimulus randomization, the stimulus assembly was retracted to 2.94 ± 0.06 cm from the mystacial pad, where there was no whisker contact.
Spike sorting
Neural signals were recorded with 16 channel (A1×16–5mm-25–177-A16) or 32 channel (A1×32–5mm-25–177-A32, NeuroNexus) linear probes, and were digitized at 24.4 kHz by a 32 channel TDT System 3 (RZ5D). A NeuroNexus A32-Z32 adapter was used, corrected for erroneous hardware mapping [16]. The same TDT system was used to digitize running and motor movement signals (48kHz).
Spike channels were filtered post-hoc (Bessel filter 300–6,000 Hz, using MATLAB filtfilt()) and were common average referenced [25]. To isolate single units, we performed spike detection, clustering and spike sorting using UltraMegaSort 2000 [26] on groups of 4-adjacent recording pads, each group considered as one tetrode. Candidate spike events were detected using a negative-going threshold 3–4 SD below the mean, and a 0.75 ms shadow period. These events were then clustered using k-means clustering (kmeans_clustersize=50), aggregated based on interface energy (agg_cutoff=0.2, [27]) and manually inspected for spike waveform, stability over time in the recording session, and inter-spike interval refractory period violations (< 0.5% of intervals < 1.5 ms). All units reported here were well-isolated single units. Single units were classified as fast-spiking if trough to peak duration was below 0.45ms and regular-spiking otherwise [28].
Identification of laminar position of recorded units
Units were assigned to cortical layers by position relative to laminar boundaries determined from current source density (CSD) analysis of slip-evoked local field potentials (LFPs) [16]. LFPs were filtered (Butterworth 0.1–300 Hz, in Matlab) cleared of electrical artifacts (samples >15 SD above mean), normalized to account for differences in channel impedance, and interpolated between channels (25um site spacing, 10–20x interpolation) before calculating the CSD defined as the second spatial derivative [29]. CSDs were convolved with a 2D Gaussian and the L4–L5A boundary was identified as the zero-crossing between the most negative current sink (putative L4) and the next current source (putative L5A). This search was restricted to sites estimated to lie 400–650um below pia as measured via micromanipulator. Units were then assigned to layers using position of each layer boundary relative to the L4–L5A boundary in mouse S1, from [30].
Histology
After the final recording in each mouse, mice were anesthetized with isoflurane and 3 fluorescent tracks were created relative to cortical landmarks and penetration locations using a linear recording probe covered in 1,1′-Dioctadecyl-3,3,3′,3′-Tetramethylindo-carbocyanine Perchlorate (DiI, D282, ThermoFisher). Mice were then deeply anesthetized, euthanized, and the brain was removed and fixed in 4% paraformaldehyde. The cortex was flattened, tangentially sectioned (50μm) and stained for cytochrome oxidase (CO) to identify whisker barrels in L4. DiI-labeled tracks were imaged relative to CO-stained barrel boundaries, in order to reconstruct locations of recording penetrations.
Behavioral data analysis
Mice typically licked on all trials for the first few trials of each daily behavioral session (likely due to initial thirst), then exhibited high-accuracy, stable behavioral performance for most of the day, then licked to few or no trials at the end of the day (likely due to satiety). We quantified daily discrimination excluding these early and late epochs. To do this, we identified the first and last trials that exceeded d′ =1, calculated in a sliding window of 50 trials centered on the current trial [31]:
where hit=hit rate, fa=false alarm rate, and z=inverse of the normal cumulative distribution function, with mean=0 and standard deviation=1. We implemented the log-linear correction for rate values of 0 and 1 [32]. All discrimination metrics (percent lick, d′, % correct) were calculated using all trials between the first trial with a sliding d′ > 1 to the last trial with a sliding d′ > 1. This criterion excluded trials dominated by satiety effects at the beginning and ending of a training session, while retaining the vast majority of trials (85%=66,906/78,713 trials). Trials were also excluded if the mouse failed to run enough distance along the surface to open the response window.
Whisker data analysis
Whisker data were analyzed from all trials i) that the mouse successfully initiated, ii) in which the mouse ran far enough to touch the stimulus patch and trigger response window onset, and iii) in which whiskers were not obscured during imaging.
Identification of whisker angular position, stick-slip events and whisking phase
Whiskers were imaged as 1D shadows in a collimated IR laser curtain (904nm laser, L904P010, Thorlabs) at 4kHz using a custom linear CCD array. Imaging was performed 0.8–1.0 cm from mystacial pad (Figure 1A). Methods were as in Jadhav et al., 2009. Pixel positions were spatially corrected for lens distortion. Raw movies were pre-processed by subtracting median pixel values. Whisker shadows were detected and the peak localized by Gaussian fit, which interpolates between pixels. Whisker position traces over time were de-noised by down-sampling to 1 kHz (decimate(), MATLAB) and up-sampling with a spline fit to the original sampling rate. This yielded a time series of whisker position within the CCD imaging plane on each trial. To calculate whisker angle relative to the follicle (Figure 1C), we localized each point in the CCD imaging plane in 2D coordinates relative to bregma using a calibrated webcam (C510, Logitech; MATLAB 2014b, Machine Vision Toolbox), and we localized C1 and C2 whisker follicle positions relative to bregma both at rest (during non-whisking periods) and during active running/whisking on surfaces, where whiskers were in an active set position ~1 mm rostral of resting position. This allowed whisker position to be calculated both in angular coordinates from the follicle, and in absolute positions in space. To determine whisker contact location on the surface (Figure 5C), we combined our knowledge of surface and ridge position at each time point in the trial with a correction for whisker bend between the CCD imaging plane and the surface, determined by fitting a Gaussian model to projection errors measured in high-speed video analysis.
To identify stick-slip events, whisker acceleration was calculated numerically as the second derivative of position with respect to time (diff(), Matlab). Stick-slip events were detected as peaks in acceleration that exceeded ± 2.5 SD from the mean acceleration within each session for that whisker. To calculate whisking phase at each time point in the trial, we used the smoothed whisker position trace, and removed high-frequency stick-slip events by filtering whisker position (10–50 Hz, fdesign.bandpass(), Matlab, order=10). We then performed a Hilbert transform (hilbert(), Matlab), and extracted phase from the complex array output (angle(), Matlab).
In one analysis, we limited analysis to stick-slip events that had equal mean amplitude (i.e., peak |acceleration|) across phase bins (Figure 3E–F). To do this, stick-slips during protraction and stick-slip events during retraction were each binned by amplitude (30 bins). For each bin, the distribution with a greater number of events was randomly down-sampled so that an equal number of events occurred in each amplitude bin. This yielded a set of stick-slip events with equal amplitude distribution across phase bins (Figure 3F).
Neural Data Analysis
Neural data are from 5 mice with successful recordings (15 recording sessions), in the same trials as whisker data analysis. Neural data analysis was restricted to periods when the whisker was in continuous contact with the surface. When measuring neural firing rate, we calculated rate during a palpation window, defined as beginning 50 ms before the whisker first encountered the stimulus patch, and ending 200 ms before first lick on that trial. For trials in which the mouse did not lick, a 650 ms duration window was used. When calculating net firing rate (palpation window - baseline), the baseline period was defined from trial onset (i.e. the beginning of stimulus wheel rotation) to the onset of the palpation window.
To calculate phase tuning, the measured phase of the columnar whisker was assigned to each spike assuming a 4 ms response latency. Phase tuning was calculated by binning spikes by whisker phase during the palpation window of surface trials (Rough or Smooth) and dividing these spike counts by the amount of time the whisker spent in each phase bin (occupancy). To test whether each unit was phase responsiveness, this phase-related firing rate distribution was compared to a uniform distribution using a X2 goodness of fit test (α=0.05). Preferred phase was measured as the weighted circular mean of the firing rate distribution across phase (circ_mean(), CircStat Toolbox, Matlab). To calculate modulation depth, the phase tuning curve was fit with a smoothing spline (fit( ), Matlab) and the maximum, minimum and mean firing rate values of fitted tuning curve were used:
where all FR measurements were made during the stimulus condition of interest (Air, Rough, Smooth, etc) except where otherwise noted (Figure S2D).
To control for the effect of angle tuning on phase tuning (Figure S1C–J), we resampled each unit’s spiking in 5-degree bins of angle until a uniform tuning curve was created. To do this, we randomly added or removed spikes in each bin (with replacement), until the bin firing rate matched the median firing rate of the original angle tuning curve. The resampled bin firing rate was calculated using the original duration of whisker occupancy in that bin as the denominator. Angle bins had to have > 5s of data to avoid undersampled parts of the tuning curve. We then took these resampled spike events and instead binned them by phase, using the original duration of whisker occupancy in each phase bin to generate firing rate. This procedure was repeated 100 times per unit and averaged. The significance of phase tuning and phase modulation depth were re-calculated from the averaged outputs.
To calculate z-scored PSTHs (zPSTH), we subtracted mean firing rate from each PSTH and then divided by the standard deviation of firing rate. To measure stick-slip responses, we used columnar whisker slip-stick events with amplitude > 2.5 SD above baseline. We identified slip-stick responsive units by comparing firing rate in a 20-ms window after the slip-stick peak acceleration vs. a 20-ms baseline window 40 ms before the slip-stick peak (paired t-test, α=0.05). Slip response latency was measured using a binless Poisson method [33].
To estimate the non-stick-slip surface phase tuning of units (Figure 3H), we identified for each unit, n periods of time during surface trials in which no stick-slip events > 2.5 SD occurred, and we measured spiking aligned to these non-stick-slip events. This spiking was summed into 8 phase bins, firing rate was calculated, and the resulting response planes were convolved with a 2D gaussian for visualization (conv2(), MATLAB). To estimate the phase modulation of isolated stick-slip responses (Figure 3I), we subtracted the non-stick-slip phase tuning from the stick-slip triggered phase response of each unit separately. Bins with negative firing rate were set to zero and the significance of phase tuning and phase modulation depth were re-calculated.
PCA (Figure S3) was performed on vectors composed of a concatenation of the phase tuning curve and the stick-slip firing response (PSTH) of each unit. The phase tuning portion was the z-scored smoothing spline-fit phase tuning curve for the unit. The stick-slip PSTH was a smoothed z-scored PSTH for each unit (smooth(), 20 ms, ‘lowess’, Matlab) PCA was performed using pca(‘centered′, true) in Matlab).
Single unit ROC analysis
To assess the ability of individual units to discriminate Rough vs. Smooth trials we used ROC analysis. For each unit, we generated an ROC curve with 20 operating points by sliding a threshold from the unit’s minimum to maximum trial firing rate. For each threshold, we classified trials as Smooth if the firing rate fell below the threshold, and Rough if the firing rate fell at or above the threshold. Thus, for each operating point, we calculated Hit rate as the number of correctly predicted Rough trials divided by total number of Rough trials, and False Alarm rate as the number of Smooth trials incorrectly predicted as Rough divided by the total number Smooth trials. The area under the ROC curve (AUROC) was calculated by integration (trapz(), MATLAB).
Spatial accuracy measurement
To assess spatial accuracy in protraction- and retraction-tuned units, we measured how well spike locations correlated with ridge positions on 2, 4, 8 and 10mm gratings. We first calculated the spatial density of spikes near ridges in 0.3mm bins of whisker movement. For each bin, we calculated the fraction of additional spikes evoked by rough over smooth stimuli as (SCrough − SCsmooth) / max (SCall), where SCall was the maximum response of each unit, and SC = mean spike count / mm whisker travel. To account for the fact that greater C1 whisker bend obscured whisker alignment compared to C2 whisker bend (Isett & Feldman 2018), we cross-correlated (xcorr(), MATLAB) spatial spike density with grating locations. We then assessed spatial accuracy using the maximum correlation value observed across lags. The optimal lag was then used to adjust the x-position of spatial spike density in the shown examples (Figure 4F).
QUANTIFICATION AND STATISTICAL ANALYSIS
Statistics were calculated using custom code in Matlab 2019b. The text and figures report mean ± 95% confidence interval of the mean (CI95) unless otherwise stated. Median and CI95 of the median were determined by bootstrap. Neural data are from 426 units recorded in 5 mice across 15 behavior sessions.
Supplementary Material
KEY RESOURCES TABLE
| REAGENT or RESOURCE | SOURCE | IDENTIFIER |
|---|---|---|
| Deposited Data | ||
| Underlying data (posted at Center for Open Science) | This paper | https://osf.io/szg6e/ |
| Experimental Models: Cell Lines | ||
| Mouse: C57BL/6J | Harlan | Cat#C57BL/6NHsd |
| Software and Algorithms | ||
| Custom data analysis code (Matlab functions) | This paper | https://osf.io/szg6e/ |
| MATLAB 2019b | The Mathworks | RRID:SCR_001622 |
| Circular Statistics Toolbox (CircStat) | [34] | RRID:SCR_016651 |
| UltraMegaSort 2000 | [26] | RRID:SCR_015857 |
| Other | ||
| Stepper motor with driver | Applied Motion | Cat#STM17R |
| Optical encoder | US Digital | Cat#H5–1000-IE-S |
| Silicon polytrode recording probe, 16 channel | NeuroNexus | Cat#A1×16–5mm-25–177-A16 |
| Silicon polytrode recording probe, 32 channel | NeuroNexus | Cat#A1×32–5mm-25–177-A32 |
| Spike data acquisition system | TDT | Cat#RZ5D |
Highlights.
Tuning for whisking phase is highly prominent in S1 during whisking on surfaces
Most units are tuned for protraction, including nearly all fast-spiking interneurons
Coding of elementary stick-slip whisker events is enhanced during protraction
This protraction bias strongly shapes coding of surface features including texture
Acknowledgments
We thank Janice Chua, Sierra Feasel, Monet Lane, Suchetana Dutta, and Karan Patel for animal training and histology. This work was supported by NIH 1R01NS072416 and R37NS092367. B.R.I. was supported by NSF predoctoral fellowship DGE 1106400.
Footnotes
Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.
Declaration of Interests
The authors declare no competing interests.
References
- 1.Kleinfeld D, and Deschênes M (2011). Neuronal basis for object location in the vibrissa scanning sensorimotor system. Neuron 72, 455–468. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 2.Cheung J, Maire P, Kim J, Sy J, and Hires SA (2019). The Sensorimotor Basis of Whisker-Guided Anteroposterior Object Localization in Head-Fixed Mice. Curr. Biol 29, 3029–3040.e4. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 3.Diamond ME, von Heimendahl M, Knutsen PM, Kleinfeld D, and Ahissar E (2008). “Where” and “what” in the whisker sensorimotor system. Nat. Rev. Neurosci 9, 601–612. [DOI] [PubMed] [Google Scholar]
- 4.Ahissar E, and Knutsen PM (2008). Object localization with whiskers. Biol Cybern 98, 449–458. [DOI] [PubMed] [Google Scholar]
- 5.Moore JD, Mercer Lindsay N, Deschênes M, and Kleinfeld D (2015). Vibrissa Self-Motion and Touch Are Reliably Encoded along the Same Somatosensory Pathway from Brainstem through Thalamus. PLoS Biol. 13, e1002253. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Severson KS, Xu D, Van de Loo M, Bai L, Ginty DD, and O’Connor DH (2017). Active Touch and Self-Motion Encoding by Merkel Cell-Associated Afferents. Neuron 94, 666–676.e9. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Wallach A, Bagdasarian K, and Ahissar E (2016). On-going computation of whisking phase by mechanoreceptors. Nat. Neurosci 19, 487–493. [DOI] [PubMed] [Google Scholar]
- 8.Szwed M, Bagdasarian K, and Ahissar E (2003). Encoding of vibrissal active touch. Neuron 40, 621–30. [DOI] [PubMed] [Google Scholar]
- 9.Fee MS, Mitra PP, and Kleinfeld D (1997). Central versus peripheral determinants of patterned spike activity in rat vibrissa cortex during whisking. J. Neurophysiol 78, 1144–9. [DOI] [PubMed] [Google Scholar]
- 10.Curtis JC, and Kleinfeld D (2009). Phase-to-rate transformations encode touch in cortical neurons of a scanning sensorimotor system. Nat. Neurosci 12, 492–501. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 11.de Kock CPJ, and Sakmann B (2009). Spiking in primary somatosensory cortex during natural whisking in awake head-restrained rats is cell-type specific. Proc. Natl. Acad. Sci. U. S. A 106, 16446–16450. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12.Wolfe J, Hill DN, Pahlavan S, Drew PJ, Kleinfeld D, and Feldman DE (2008). Texture coding in the rat whisker system: slip-stick versus differential resonance. PLoS Biol. 6, e215. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13.Jadhav SP, Wolfe J, and Feldman DE (2009). Sparse temporal coding of elementary tactile features during active whisker sensation. Nat. Neurosci 12, 792–800. [DOI] [PubMed] [Google Scholar]
- 14.Waiblinger C, Brugger D, Whitmire CJ, Stanley GB, and Schwarz C (2015). Support for the slip hypothesis from whisker-related tactile perception of rats in a noisy environment. Front. Integr. Neurosci 9, 53. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 15.Zuo Y, Perkon I, and Diamond ME (2011). Whisking and whisker kinematics during a texture classification task. Philos. Trans. R. Soc. B Biol. Sci 366, 3058–3069. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 16.Isett BR, Feasel SH, Lane MA, and Feldman DE (2018). Slip-Based Coding of Local Shape and Texture in Mouse S1. Neuron 97, 418–433.e5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 17.Schwarz C (2016). The Slip Hypothesis : Tactile Perception and its Neuronal Bases. Trends Neurosci. 39, 449–462. [DOI] [PubMed] [Google Scholar]
- 18.Arabzadeh E, Zorzin E, and Diamond ME (2005). Neuronal encoding of texture in the whisker sensory pathway. PLoS Biol. 3, e17. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Chen JL, Margolis DJ, Stankov A, Sumanovski LT, Schneider BL, and Helmchen F (2015). Pathway-specific reorganization of projection neurons in somatosensory cortex during learning. Nat. Neurosci 18, 1101–1108. [DOI] [PubMed] [Google Scholar]
- 20.Gabernet L, Jadhav SP, Feldman DE, Carandini M, and Scanziani M (2005). Somatosensory integration controlled by dynamic thalamocortical feed-forward inhibition. Neuron 48, 315–327. [DOI] [PubMed] [Google Scholar]
- 21.Yu J, Gutnisky DA, Hires SA, and Svoboda K (2016). Layer 4 fast-spiking interneurons filter thalamocortical signals during active somatosensation. Nat. Neurosci 19, 1647–1657. [DOI] [PubMed] [Google Scholar]
- 22.Carvell GE, and Simons DJ (1995). Task- and subject-related differences in sensorimotor behavior during active touch. Somatosens. Mot. Res 12, 1–9. [DOI] [PubMed] [Google Scholar]
- 23.Cardin JA, Carlén M, Meletis K, Knoblich U, Zhang F, Deisseroth K, Tsai L-H, and Moore CI (2009). Driving fast-spiking cells induces gamma rhythm and controls sensory responses. Nature 459, 663–667. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 24.Drew PJ, and Feldman DE (2009). Intrinsic signal imaging of deprivation-induced contraction of whisker representations in rat somatosensory cortex. Cereb. Cortex 19, 331–348. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 25.Ludwig KA, Miriani RM, Langhals NB, Joseph MD, Anderson DJ, and Kipke DR (2009). Using a common average reference to improve cortical neuron recordings from microelectrode arrays. J. Neurophysiol 101, 1679–1689. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Hill DN, Mehta SB, and Kleinfeld D (2011). Quality metrics to accompany spike sorting of extracellular signals. J. Neurosci 31, 8699–8705. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Fee MS, Mitra PP, and Kleinfeld D (1996). Automatic sorting of multiple unit neuronal signals in the presence of anisotropic and non-Gaussian variability. J. Neurosci. Methods 69, 175–188. [DOI] [PubMed] [Google Scholar]
- 28.Barthó P, Hirase H, Monconduit L, Zugaro M, Harris KD, and Buzsáki G (2004). Characterization of neocortical principal cells and interneurons by network interactions and extracellular features. J. Neurophysiol 92, 600–608. [DOI] [PubMed] [Google Scholar]
- 29.Freeman JA, and Nicholson C (1975). Experimental optimization of current source-density technique for anuran cerebellum. J. Neurophysiol 38, 369–382. [DOI] [PubMed] [Google Scholar]
- 30.Lefort S, Tomm C, Floyd Sarria J-C, and Petersen CCH (2009). The excitatory neuronal network of the C2 barrel column in mouse primary somatosensory cortex. Neuron 61, 301–316. [DOI] [PubMed] [Google Scholar]
- 31.Siegle JH, Pritchett DL, and Moore CI (2014). Gamma-range synchronization of fast-spiking interneurons can enhance detection of tactile stimuli. Nat. Neurosci 17, 1371–1379. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Stanislaw H, and Todorov N (1999). Calculation of signal detection theory measures. Behav. Res. Methods. Instrum. Comput 31, 137–149. [DOI] [PubMed] [Google Scholar]
- 33.Chase SM, and Young ED (2007). First-spike latency information in single neurons increases when referenced to population onset. Proc. Natl. Acad. Sci. U. S. A 104, 5175–5180. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34.Berens P (2009). CircStat: A MATLAB Toolbox for Circular Statistics. Journal of Statistical Software 31, 10. doi: 10.18637/jss.v031.i10 [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Experimental data and custom Matlab code used for analyses are available from the Center for Open Science https://osf.io/szg6e/ (DOI 10.17605/OSF.IO/SZG6E).
