Letter https://doi.org/10.1038/s41586-018-0527-y Sensation, movement and learning in the absence of barrel cortex ­Y. Kate Hong1 , Clay O. Lacefield1 , Chris C. Rodgers1 & Randy M. Bruno1 * For many of our senses, the role of the cerebral cortex in detecting stimuli is controversial1–17 . Here we examine the effects of both acute and chronic inactivation of the primary somatosensory cortex in mice trained to move their large facial whiskers to detect an object by touch and respond with a lever to obtain a water reward. Using transgenic mice, we expressed inhibitory opsins in excitatory cortical neurons. Transient optogenetic inactivation of the primary somatosensory cortex, as well as permanent lesions, initially produced both movement and sensory deficits that impaired detection behaviour, demonstrating the link between sensory and motor systems during active sensing. Unexpectedly, lesioned mice had recovered full behavioural capabilities by the subsequent session. This rapid recovery was experience-dependent, and early re-exposure to the task after lesioning facilitated recovery. Furthermore, ablation of the primary somatosensory cortex before learning did not affect task acquisition. This combined optogenetic and lesion approach suggests that manipulations of the sensory cortex may be only temporarily disruptive to other brain structures that are themselves capable of coordinating multiple, arbitrary movements with sensation. Thus, the somatosensory cortex may be dispensable for active detection of objects in the environment. Sensory detection tasks have become a staple for probing cortical circuitry during behaviour, but the role of the primary sensory cortex in visual1–3 , auditory4–6 , gustatory7,8 and somatosensory behav- iours9–17 remains unclear. Whether a brain structure is necessary for a behaviour is typically assessed by inactivation or ablation. Ablation experiments may underestimate behavioural deficits, owing to the long recovery periods used (more than one week), during which compensatory relearning or rewiring can occur. Transient optogenetic or pharmacological manipulations often yield stronger deficits and are currently preferred, being thought to reveal an area’s normal function before compensation. However, the sudden loss of a silenced area may disrupt downstream areas that are vital for behaviour, a phenomenon 1 Department of Neuroscience, Mortimer Zuckerman Mind Brain Behavior Institute and Kavli Institute for Brain Science, Columbia University, New York, NY, USA. *e-mail: randybruno@columbia.edu a High-speed camera Pole Laser Lever Water Lever WaterMotor Pole Optic fibre C2 0.3 0.2 0.1 0 Responselatency(s) j OFF ON 100 75 50 Percentcorrect g OFF ON *** Falsealarmrate 1.0 0.5 0 i OFF ON ** h OFF ON Hitrate 1.0 0.5 0 *** stop–Halo Emx1–Halo Time (s) 0 1 2 c Trial 0 1 2 Time (s) Firingrate(Hz) 0 1 2 Time (s) d 0 10 20 OFFON Laser Laser Lever Lever Trial OFFON 30 Firingrate(Hz) 0 10 20 30 e f b Pole Pole Firingrate(Hz) 0 250 Time from contact (ms) 0 200 400 Firingrate (%ofbaseline) 600 OFF ON 0 10 20 30 Fig. 1 | Transient inactivation of barrel cortex impairs whiskermediated detection. a, Head-fixed detection task. A high-speed camera imaged whiskers. Pole movement (GO or NOGO) and laser (ON or OFF) were randomized across trials. b, Coronal section of Emx1–GFP mouse brain. White dotted lines, barrel cortex boundaries; green, GFP; magenta, NeuN. Scale bar, 1 mm. c, Cortical array recordings during detection task and photoinactivation. Example rasters (top) and peri-stimulus time histograms (middle) for a single unit when no response was made (miss or correct reject) during an example session. d, Same neuron for trials with lever response (hit or false alarm). The laser turns off when the mouse responds, ending the trial. Trials sorted by response time, which varied (arrows in schematic at bottom). e, Effect of laser on neuronal spiking (n = 62 putative excitatory neurons, 8 sessions, 3 mice; mean ± s.d. 7.02 ± 6.81 and 0.16 ± 0.94 Hz for laser OFF versus ON, respectively). f, Average spiking activity aligned to first whisker contact of trial during an example session (n = 10 neurons). Contact times are defined as the local maxima, rather than onset, of curvature change (Extended Data Fig. 3; see Methods). Firing rates were normalized to mean rate during 100 ms before contact during laser-OFF trials. Thin lines, individual cells; thick lines, means of OFF (black) and ON (orange). g–i, Behavioural performance for laser OFF versus ON trials. g, Per cent correct trials. h, Hit rate. i, False alarm rate. j, Response latency for hit trials. Emx1–Halo (n = 10 mice, red), negative control (n = 7 cre-negative, stop–Halo mice, black). Data shown as mean ± s.e.m. **P < 0.01, ***P < 0.001. N A t U r e | www.nature.com/nature © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH known as diaschisis. Recent studies in the motor system have underscored how the off-target effects of transient inactivation can lead to false conclusions18 . To address these disparate outcomes, we compare transient and chronic manipulations of the barrel cortex subdivision of the primary somatosensory cortex (S1) during a simple detection task. Water-restricted mice were trained in the dark to perform a GO/NOGO sensory detection task with their C2 whisker (Fig. 1a). Mice self-initiated trials by holding down a lever. On GO trials, a pole moved within reach of the whisker when protracted. Mice had to release the lever when they detected the pole to obtain a water reward (hit). On NOGO trials, the pole moved away from the mouse. Incorrect responses to NOGO trials (false alarms) were punished with a timeout. Misses and correct rejects were neither rewarded nor punished. Conventionally, cortex is optogenetically silenced by activating inhibitory cells with channelrhodopsin (ChR), but this may inadvertently stimulate long-range inhibitory connections. We therefore developed an approach to directly silence excitatory cells by stably expressing halorhodopsin (Halo) in cortical excitatory neurons. Emx1IRES-cre mice express Cre recombinase in excitatory cortical neurons while excluding subcortical structures (Fig. 1b). Halorhodopsin can be targeted to these neurons by crossing Emx1-IRES-cre with stopHalo reporter mice (Emx1–Halo). Optogenetic silencing (by shining a laser onto these neurons during behaviour) was highly efficacious, blocking 95 ± 4% (mean ± s.e.m.) of spikes in putative excitatory cells (Fig. 1c–e, Extended Data Fig. 1j, k) including during whisker contacts, which normally strongly activate barrel cortex (Fig. 1f). Optogenetics efficiently silenced spontaneous and sensory-evoked activity in neurons across all cortical layers within a 1-mm radius, encompassing nearly all of the barrel columns that represent the large facial whiskers (Extended Data Fig. 1a–i). Inactivation of barrel cortex significantly reduced overall performance (P = 3.6 × 10−4 ; n = 10 mice; Fig. 1g, Extended Data Fig. 2a), but performance remained significantly above chance (50%; P = 1.1 × 10−8 , one-sample t-test). Despite the fact that mice made fewer responses to both GO and NOGO trials (Fig. 1h, i), response time was unaffected by the laser (Fig. 1j), demonstrating that the mice could still manoeuvre the lever. Control mice lacking Cre were behaviourally unaffected by the laser (n = 7 stop–Halo mice; Fig. 1g–j). Conventional photoinhibition by activating parvalbumin (PV)positive inhibitory cells (n = 5 PV–ChR mice) yielded similar results to Emx1–Halo (Extended Data Fig. 2a). Thus, transient silencing of barrel cortex impaired detection. Touch is an active process, during which subjects adjust their movements as they contact objects in their environment19–21 . Even small changes in whisking could alter perception19 . Although activation of barrel cortex can trigger whisker movements16,22 , the effects of inactivation are less well understood12,23 . We tracked whisking using high-speed videography (Fig. 2a, b). During NOGO trials, in which no contacts were possible, barrel cortex inactivation slightly but significantly decreased protraction velocity, whisker angle and peak amplitude (Fig. 2c–f, P = 6.5 × 10−3 , 1.4 × 10−3 and 2.5 × 10−2 , for d, e and f, respectively). Similarly, during GO trials, when the pole was present inactivation of barrel cortex decreased peak protraction velocity (Fig. 2g). We found no significant changes in whisking setpoint or frequency. We also assessed changes in whisker curvature, a proxy for contact force24 (Extended Data Fig. 3). Small changes in whisker movement had a large effect on whisker contacts, resulting in a reduction in force (Fig. 2h) and an increase in the number of trials without contacts (Fig. 2i). Thus, silencing of the sensory cortex reduced the vigour of whisker movement. θ 0 8642 Presponse a b Max | curvature | (mm–1) Presponse j 0 0.05 0.15 0.5 0 1.0 0.5 0 1.0 No. contacts per trial k m 0 0.06 0.12 |K|threshold OFF ON OFF ON OFF ON OFF ON 0 20 40Slope Slope 0 0.5 1.0 0 3 6 nl o Contactthresh. *** ** i ON Peak amplitude (°) g 0 200 400 600 800 1,000 Time from trial start (ms) c d ON Peak velocity (° s–1) 0 2,500 5,000 *** 0 2,500 5,000 f ON Trials w/o contacts (%) 0 25 50 * 0 25 50 ON e 0 0.05 0.10 Max | K| (mm–1) 0 0.05 0.1 * h 0.10 0 1,000 2,000 0 1,000 2,000 Peak velocity (° s–1) ON ** 80 120 80 120 160 Max angle (°) ON ** 160 * 30 15 0 0 3015 400 6 NOGO GO 100 130 100 130 Whiskerangle(°) OFF ON NOGO GO Pole Laser Lever Water OFFOFFOFF OFFOFFOFF Fig. 2 | Transient optogenetic inactivation of barrel cortex alters whisking kinematics and sensory threshold. a, b, High-speed video frame depicting traced C2 whisker during NOGO trial (a, pole moves away) and GO trial (b, pole within whisker reach). Whisker position was measured as its angle (θ) relative to the face. The whisker bends upon contacting the pole, changing whisker curvature. c, Average whisker angle for NOGO and GO trials for an example session. A 200-ms window (blue shaded area), from when the pole was within reach and before the response, was analysed. Green, average response time. d–f, Whisking kinematics for each mouse during NOGO trials. d, Peak angular velocity of whisker protraction; e, maximum whisker angle; f, mean peak whisking amplitude. g–i, For GO trials: g, peak angular protraction velocity; h, average maximum change in curvature (ΔΚ); i, per cent of trials without any contacts. j, Logistic regression of response probability given maximum change in curvature for an example session. Tick marks indicate responses (0 for no response; 1 for lever response) on individual trials. Detection threshold was defined as the value at which response probability is 0.5. k, Detection threshold for maximum ΔΚ of each mouse. Thick orange line, means. l, Slope (sensitivity). m, Logistic regression of response probability against number of contacts per trial for an example session. n, o, Detection threshold (n) for number of contacts and slope (o). *P < 0.05, **P < 0.01, ***P < 0.001, n = 10 mice. N A t U r e | www.nature.com/nature © 2018 Springer Nature Limited. All rights reserved. Letter RESEARCH We investigated whether behavioural impairment was simply due to altered whisking or whether there was an accompanying sensory deficit: whether, for any given stimulus strength, transient inactivation of the sensory cortex decreased the probability of response. Cortical silencing significantly increased detection threshold (0.5 response probability) for curvature (Fig. 2j, k; P = 9.7 × 10−4 ) and number of contacts (Fig. 2m, n; P = 3.3 × 10−3 ), but not sensitivity (Fig. 2l, o). We observed similar motor and sensory deficits in PV–ChR mice (Extended Data Fig. 2b, c). Thus, transient optogenetic manipulations impair behaviour by both increasing sensory threshold and decreasing whisker movement. Increased sensory threshold is distinct from an absolute inability to detect stimuli. The observed threshold shift could reflect incomplete inactivation, as a few renegade spikes may suffice for detection25 . However, residual spiking during optogenetic silencing did not correlate with behavioural outcome (Extended Data Fig. 1l, m). To ensure complete inactivation, we removed contralateral barrel cortex by aspiration (n = 11) (Fig. 3a, b, Extended Data Fig. 4). Consistent with optogenetic results, behaviour was impaired one day after lesioning contralateral barrel cortex (Fig. 3c, red), but not in sham-operated controls (n = 4, black) or when ipsilateral barrel cortex was lesioned (n = 4, blue). Again, impairment was only partial, and behaviour remained significantly above chance levels (P < 10−6 , one-sample t-test). Unexpectedly, by the second session after lesioning, behaviour had recovered fully to pre-lesion levels (Fig. 3c). Mice recovered whether lesions encompassed only barrel cortex or additionally included the secondary somatosensory cortex (Extended Data Fig. 4). There was no evidence of gradual relearning within sessions; rather, performance abruptly recovered between the first and second post-lesion sessions (Fig. 3d), suggesting that recovery was unlikely to result from previously uninvolved circuits learning the task anew. Furthermore, sub­sequent lesioning of ipsilateral barrel cortex did not perturb performance, as these bilaterally lesioned mice performed similarly to sham and ipsilateral-only lesioned mice (Extended Data Fig. 5). Notably, additional damage to the dorsolateral striatum prevented behavioural recovery (Fig. 3c, n = 8, orange; Extended Data Fig. 6), suggesting that the striatum has an important role in detection behaviour. Consistent with optogenetic results, whisker movement and contacts were decreased during the first session after lesioning (Fig. 3e, f, pre versus1).However,whiskingkinematicsfortherecovered,secondsession never exceeded pre-lesion levels (Fig. 3e, f; pre versus 2), indicating that mice did not compensate for impaired sensation with greater contact force or frequency. Similarly, sensory thresholds pre-lesion and on the second post-lesion session did not differ significantly in contact force or number (Fig. 3h, i). Thus, after only a temporary impairment, both motor and sensory abilities returned to pre-lesion levels along with behavioural performance. Recent studies have suggested that homeostasis may spontaneously restore activity in connected structures within 24–48 h, similar to the time frame seen here18,26 . To test whether behavioural recovery was spontaneous or required re-exposure to the task, we gave another group of mice three days between lesion and retesting (n = 8). This group showed similar impairment on the first post-lesion session but also recovered (Fig. 3j), albeit more gradually, indicating that task re-exposure—rather than simply the passage of time—triggers recovery. Removing the C2 whisker reduced the performance of both groups (1 day rest and 3 days rest) to chance, confirming that lesions did not induce mice to switch from whisker-mediated touch to other sensory modalities (Fig. 3g, k). b h k a j c Pre 1 2 e Velocity(°s–1) GO f NOGO f d Max | curvature| (mm × 10–2) P(response) 1.0 0 0.5 Session from lesion Percentcorrect 50 75 100 Pre-lesion 1st session 2nd session 2080 4 1612 –2 1–1 2 3 4 3 days rest i Curvaturethreshold(mm–1) No.contactsthreshold Pre 1 2 Pre 1 2 Sham Contra Pre 1 2 Peakamplitude(o) Nocontacts(%trials) ΔCurvature(mm–1) 50 75 100 Percentcorrect *** 50 75 100 Percentcorrect C2 Trim *** C2 Trim g 0 1,000 2,000 3,000 10 15 20 25 0.04 0.06 0.08 0.1 0 20 40 60 0.02 0.04 0.06 0.08 * 1.0 1.5 2.0 2.5 Pre 1 2 Pre 1 2 10 20 30 Time within session (min) 50 100 Prelesion 1st session 2nd session Percentcorrect 75 Sham Contra S1 10 20 30 10 20 30 Sham Contra S1 Ipsi S1 Contra S1+ striatum Percentcorrect 50 75 100 1 day rest Session from lesion –2 –1 1 2 3 4 Fig. 3 | Behavioural performance recovers rapidly after barrel cortex lesions. a, Coronal section of L4-labelled mouse brain (white dashed lines, barrel cortex boundaries; blue, DAPI; green, eYFP) in unlesioned hemisphere. b, Lesioned hemisphere shows complete removal of barrel cortex. c, Behavioural performance before and after S1 lesions (sham n = 5, ipsilateral n = 4, contralateral n = 11, contralateral with striatal lesion n = 8). d, Behavioural performance of contralateral S1 lesioned mice recovers abruptly between first and second sessions after lesioning. e, f, Whisking kinematics during NOGO trials (e) and GO trials of mice (f) are altered on first post-lesion session but return to normal by second post-lesion session (n = 10 contralaterally lesioned mice). g, Post-lesion trimming confirms that task remained whisker-dependent. Dashed line indicates chance performance. h, Example logistic regression of response probability given whisker curvature. Sensory detection threshold for whisker curvature increases on first session post-lesion (pink) and returns to pre-lesion levels (black) by second session (red). i, Average detection thresholds for whisker curvature and number of contacts before lesion and for second session after lesion (n = 10). j, Mice with three days of rest after lesion still had impaired performance on the first post-lesion session but subsequently recovered (n = 8). k, Behavioural performance for three-day rest group remains whisker-dependent. ***P < 0.001. N A t U r e | www.nature.com/nature © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH Thus, three different manipulations of barrel cortex—Emx1–Halo, PV–ChR and lesions—transiently disrupt the execution of active detection behaviour. Recent studies have shown that the motor cortex might not be required for the execution of skilled movements, but is required for motor learning27 . To determine whether the sensory cortex is required for learning of the detection task, we lesioned contralateral S1 of naive mice. Subjects were habituated and trained on lever manoeuvring. Learning rate was assessed, starting with the introduction to the pole (Fig. 4a, learning assessment, red). Initially, sessions consisted of 90% GO trials until mouse weight stabilized (3.6 ± 1.5 sessions), after which mice still performed at chance (Extended Data Fig. 7a–c). Lesioned and unlesioned mice learned at similar rates (Fig. 4b, c). Nonlearners were equally present in both groups (Fig. 4d; 6/17 unlesioned, 5/14 lesioned, P = 1, Fisher’s exact test), and failure to learn was not correlated with lesion size (Fig. 4e). In fact, among learners, mice with larger lesions learned faster than those with smaller lesions (Fig. 4e, linear regression, P = 0.02). Again, performance remained whiskerdependent (Fig. 4f, g). Thus, barrel cortex is not essential for learning the detection behaviour. Task acquisition involves motor (lever press or lift), perceptual (pole detection) and contingency learning (lever→reward, contact→lever→reward). Notably, mice acquired the task whether they were lesioned before handling and lever training (Fig. 4a, open triangle, n = 4) or just before introduction of the pole (closed triangle, n = 5). Mice spent similar amounts of time in pre-training whether lesioned before pre-training or unlesioned (P = 0.13). Thus, barrel cortex appears not to be required for motor, perceptual and contingency learning of this task. Our results demonstrate the potential for structures other than the sensory cortex to direct learned behaviours that require arbitrary coordination of multiple movements (lever press, whisking and licking) around a sensory event. This raises concerns about the interpretation of cortical physiology studies that use detection behaviours, as well as tasks requiring discrimination of elementary features encoded at the periphery (body location, retinotopic location, taste and sound frequency), which subjects may circumvent with detection strategies. It underscores the need to identify the behavioural conditions for which sensory cortex is indispensable, which might involve more complex discrimination, egocentric or allocentric context10,28 , or working memory29 . In conclusion, impairment after transient inactivation does not absolutely indicate necessity. This raises the question of  what the functional relevance of barrel cortex is to active detection. One possibility is that the barrel cortex and other structures are redundant for active detection30 . Multiple subcortical structures receive barrel cortex input and, via other routes, whisker-related sensory signals. The trigeminal brainstem complex projects directly to the superior colliculus and cerebellum, and indirectly to the dorsolateral striatum via the secondary somatosensory thalamus30–32 . Indeed, damage to striatum prevented recovery. Further studies are needed to assess the roles of other subcortical areas. A second possibility is that manipulation of any cortical area may temporarily disrupt connected structures that are primarily involved in the task. In this scenario, the sudden loss of barrel cortex activity, rather than the sensory information it conveys, can be disruptive. The incomplete behavioural impairments we observed, as well as the sudden recovery after lesioning, raise the possibility of a disruptive effect, rather than redundancy. Subcortical systems are major targets of deep layer cortical pyramidal cells, which have high baseline firing rates, and removing their tonic activity may disrupt the responses of corticofugal targets to sensory inputs. In the birdsong motor system, lesions transiently disrupt activity in downstream areas and the production of song, both of which recover overnight18 . In the birdsong study, it was unclear whether recovery was spontaneous or required some attempts, even if unsuccessful, at singing. A major advantage of our study is that we could control the time of re-exposure to the task after lesioning. Early task-specific experience accelerated recovery, and this may have important implications for early rehabilitation after stroke or head trauma. Whether recovery is always experience-dependent or whether sensory and motor systems differ are intriguing questions for further study. Online content Any methods, additional references, Nature Research reporting summaries, source data, statements of data availability and associated accession codes are available at https://doi.org/10.1038/s41586-018-0527-y. Received: 28 September 2017;Accepted: 27 July 2018; Published online xx xx xxxx. 1. Glickfeld, L. L., Histed, M. H. & Maunsell, J. H. R. Mouse primary visual cortex is used to detect both orientation and contrast changes. J. Neurosci. 33, 19416–19422 (2013). 2. Petruno, S. K., Clark, R. E. & Reinagel, P. Evidence that primary visual cortex is required for image, orientation, and motion discrimination by rats. PLoS ONE 8, e56543 (2013). 3. Lashley, K. S. The mechanism of vision IV. The cerebral areas necessary for pattern vision in the rat. J. Comp. Neurol. 53, 419–478 (1931). 4. Kato, H. K., Gillet, S. N. & Isaacson, J. S. Flexible sensory representations in auditory cortex driven by behavioral relevance. Neuron 88, 1027–1039 (2015). 5. Kelly, J. B. & Glazier, S. J. Auditory cortex lesions and discrimination of spatial location by the rat. Brain Res. 145, 315–321 (1978). 6. Talwar, S. K., Musial, P. G. & Gerstein, G. L. Role of mammalian auditory cortex in the perception of elementary sound properties. J. Neurophysiol. 85, 2350–2358 (2001). 7. Oliveira-Maia, A. J. et al. The insular cortex controls food preferences independently of taste receptor signaling. Front. Syst. Neurosci. 6, 5 (2012). 8. Peng, Y. et al. Sweet and bitter taste in the brain of awake behaving animals. Nature 527, 512–515 (2015). 9. Waiblinger, C., Brugger, D. & Schwarz, C. Vibrotactile discrimination in the rat whisker system is based on neuronal coding of instantaneous kinematic cues. Cereb. Cortex 25, 1093–1106 (2015). 10. Hutson, K. A. & Masterton, R. B. The sensory contribution of a single vibrissa’s cortical barrel. J. Neurophysiol. 56, 1196–1223 (1986). 403020 Sessions to criterion 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Lesioned (n = 14) Unlesioned (n = 17) e a ****** Cum.fractionofmice 50 100 Percentcorrect 75 C2 Trim C2 Trim No. of sessions to criterion 0 10 f Lesiondiameter(mm) 0 0.5 1.0 1.5 2.0 2.5 Fractionofnon-learners +– 50 100Percentcorrect 75 0 0.5 1.0 b Handling Lever training ~4 ~9 No. of sessions Pretraining Learning assessment d g c 0 10 20 30 40 50 Lesion +– Sessionstocriterion < 48 90% GO 50 4030200 10 50 NL ~4 60% GO Fig. 4 | Barrel cortex is not required for learning whisker-dependent sensory detection task. a, Timeline for learning assay. b, Cumulative histogram of number of sessions to reach learning criterion (>74% correct for two consecutive sessions). The speed of learning was similar between unlesioned (n = 17) and lesioned (n = 14) mice. c, Among mice that learned the task, the number of sessions to criteria did not differ between unlesioned (n = 11) and lesioned (n = 9) mice. d, The fraction of mice that did not learn within the assessment period was similar between groups (unlesioned n = 6, lesioned n = 5 mice). e, Inability to learn was not due to larger lesion size. NL, non-learners. f, g, Unlesioned (f) and lesioned mice (g) that did learn could no longer perform the task when the C2 whisker was trimmed. ***P < 0.001. N A t U r e | www.nature.com/nature © 2018 Springer Nature Limited. All rights reserved. Letter RESEARCH 11. Morita, T., Kang, H., Wolfe, J., Jadhav, S. P. & Feldman, D. E. Psychometric curve and behavioral strategies for whisker-based texture discrimination in rats. PLoS ONE 6, e20437 (2011). 12. Guo, Z. V. et al. Flow of cortical activity underlying a tactile decision in mice. Neuron 81, 179–194 (2014). 13. O’Connor, D. H., Peron, S. P., Huber, D. & Svoboda, K. Neural activity in barrel cortex underlying vibrissa-based object localization in mice. Neuron 67, 1048–1061 (2010). 14. Kwon, S. E., Yang, H., Minamisawa, G. & O’Connor, D. H. Sensory and decisionrelated activity propagate in a cortical feedback loop during touch perception. Nat. Neurosci. 19, 1243–1249 (2016). 15. Miyashita, T. & Feldman, D. E. Behavioral detection of passive whisker stimuli requires somatosensory cortex. Cereb. Cortex 23, 1655–1662 (2013). 16. Sachidhanandam, S., Sreenivasan, V., Kyriakatos, A., Kremer, Y. & Petersen, C. C. H. Membrane potential correlates of sensory perception in mouse barrel cortex. Nat. Neurosci. 16, 1671–1677 (2013). 17. Stüttgen, M. C. & Schwarz, C. Barrel cortex: what is it good for? Neuroscience 368, 3–16 (2018). 18. Otchy, T. M. et al. Acute off-target effects of neural circuit manipulations. Nature 528, 358–363 (2015). 19. Deutsch, D., Pietr, M., Knutsen, P. M., Ahissar, E. & Schneidman, E. Fast feedback in active sensing: touch-induced changes to whisker-object interaction. PLoS ONE 7, e44272 (2012). 20. Grant, R. A., Mitchinson, B., Fox, C. W. & Prescott, T. J. Active touch sensing in the rat: anticipatory and regulatory control of whisker movements during surface exploration. J. Neurophysiol. 101, 862–874 (2009). 21. Mitchinson, B. et al. Active vibrissal sensing in rodents and marsupials. Phil. Trans. R. Soc. Lond. B 366, 3037–3048 (2011). 22. Matyas, F. et al. Motor control by sensory cortex. Science 330, 1240–1243 (2010). 23. Harvey, M. A., Sachdev, R. N. & Zeigler, H. P. Cortical barrel field ablation and unconditioned whisking kinematics. Somatosens. Mot. Res. 18, 223–227 (2001). 24. Pammer, L. et al. The mechanical variables underlying object localization along the axis of the whisker. J. Neurosci. 33, 6726–6741 (2013). 25. Stüttgen, M. C. & Schwarz, C. Psychophysical and neurometric detection performance under stimulus uncertainty. Nat. Neurosci. 11, 1091–1099 (2008). 26. Keck, T. et al. Synaptic scaling and homeostatic plasticity in the mouse visual cortex in vivo. Neuron 80, 327–334 (2013). 27. Kawai, R. et al. Motor cortex is required for learning but not for executing a motor skill. Neuron 86, 800–812 (2015). 28. Brecht, M. The body model theory of somatosensory cortex. Neuron 94, 985–992 (2017). 29. Stüttgen, M. C., Schwarz, C. & Jäkel, F. Mapping spikes to sensations. Front. Neurosci. 5, 125 (2011). 30. Cohen, J. D. & Castro-Alamancos, M. A. Detection of low salience whisker stimuli requires synergy of tectal and thalamic sensory relays. J. Neurosci. 30, 2245–2256 (2010). 31. Huerta, M. F., Frankfurter, A. & Harting, J. K. Studies of the principal sensory and spinal trigeminal nuclei of the rat: projections to the superior colliculus, inferior olive, and cerebellum. J. Comp. Neurol. 220, 147–167 (1983). 32. Smith, J. B., Mowery, T. M. & Alloway, K. D. Thalamic POm projections to the dorsolateral striatum of rats: potential pathway for mediating stimulus-response associations for sensorimotor habits. J. Neurophysiol. 108, 160–174 (2012). Acknowledgements We thank B. C. Pil and A. Kase for assistance with mouse training, H. Zeng and M. Kheirbek for Ai39 mice, A. Losonczy for PV–Cre mice, J. Huang for Rosa–H2B–GFP mice, N. Clack for suggestions on video analysis of whisker motion, B. Grewe for advice on cortical aspiration, and J. C. Tapia, M. Goldberg, N. Sawtell, T. Jessell, A. Kinnischtzke, D. Kato and G. Pierce for comments on the manuscript. Funding was provided by NIH R01 NS094659, R01 NS069679, the Klingenstein Fund, the Rita Allen Foundation, the Dana Foundation and the Ludwig Schaefer Scholars Program (R.M.B.); NIH F32 NS084768 (Y.K.H.), T32 MH015174 (Y.K.H., C.O.L.) and F32 NS096819 (C.C.R.). Reviewer information Nature thanks C. Schwarz and the other anonymous reviewer(s) for their contribution to the peer review of this work. Author contributions Y.K.H. and R.M.B. conceived the experiments, analysed data and wrote the manuscript. Y.K.H. performed the experiments. C.O.L. and Y.K.H. developed the behavioural assay. C.C.R. assembled videography setup, C.C.R. and Y.K.H. performed array recordings, and C.C.R. analysed array data. Competing interests The authors declare no competing interests. Additional information Extended data is available for this paper at https://doi.org/10.1038/s41586- 018-0527-y. Supplementary information is available for this paper at https://doi.org/ 10.1038/s41586-018-0527-y. Reprints and permissions information is available at http://www.nature.com/ reprints. Correspondence and requests for materials should be addressed to R.M.B. Publisher’s note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. N A t U r e | www.nature.com/nature © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH Methods Transgenic mice. All mouse procedures complied with the NIH Guide for the Care and Use of Laboratory Animals and were approved by the Institutional Animal Care and Use Committee at Columbia University. Emx1–Halo mice (n = 10) were generated by crossing Emx1-IRES-Cre33 knock-in mice (Jackson Laboratories, stock #005628) to Rosa-lox-stop-lox (RSL)-eNpHR3.0/eYFP mice (stop-Halo Ai39, JAX, stock# 006364), which express halorhodopsin after excision of a stop cassette by Cre recombinase. Cre expression was assessed by crossing Emx1–Cre mice to RSL-H2B–GFP mice (provided by J. Huang). Negative control mice were Cre-negative and could not express the halorhodopsin transgene (n = 7 stopHalo mice). PV–ChR mice (n = 5) were generated by crossing parvalbumin-Cre mice34 to RSL-channelrhodopsin2/eYFP mice (Ai32, Jackson Laboratories, stock# 024109). For visualizing barrels in S1, Nr5a1–Cre mice (JAX, stock# 006364) were crossed to RSL-Halo–eYFP (Nr5a1–eYFP). All mouse lines were maintained on a C57BL/6 background. Optogenetic experiments used mice that were heterozygous for the desired transgene. The experimenters were not blind to genotype during testing and analysis. Intrinsic signal optical imaging to locate C2 barrel. Mice were anaesthetized with isoflurane, and the skull over the left barrel cortex (centred ~1.5 mm posterior to bregma and 3.5 mm lateral to the midline) was thinned and sealed with Vetbond (3M) over a 4–5-mm area, or a glass window (3-mm coverslip, Warner Instruments) was implanted. Images were acquired with a CCD camera (Q-Imaging, Retiga 2000R) mounted on a stereomicroscope and software custom-written in LabVIEW. The vasculature on the brain surface was imaged with 510/40 band-pass filtered illumination (Chroma, D510/40), and functional imaging done with illumination with a 590-nm long-pass filter (Thorlabs, OG590). The C2 whisker was stimulated with 8 pulses of 4 directions at 5 Hz with a multi-directional piezo stimulator. The location of the maximum reflectance change was mapped relative to the surface vasculature. Two or three surrounding whiskers were also imaged to confirm proper identification of the C2 barrel location. Behavioural setup. The behavioural setup was controlled by a microcontroller (Arduino), and data collected using custom-written routines. Subjects selfinitiated trials by holding down a lever with their left forepaw for at least 100 ms. A pole (~2.15-mm-diameter wooden applicator stick) started from a position 3–4 cm below the mouse. After trial initiation, a stepper motor (Pololu Robotics and Electronics) rotated the pole to just in front of the whiskers (GO trials) or away from the whisker field entirely (NOGO trials). GO and NOGO trials were randomized. Rotation in either direction ensured that the sound and vibration generated by the motor was similar between trial types. The sound of the motor also served as a trial onset and offset cue. For GO trials, the pole was positioned 9–11 mm laterally and roughly aligned to the tip of the nose in the anterior– posterior dimension, such that mice were required to actively whisk forward to make contact. If the lever was lifted within the response window of 1.2 s during GO trials (hit), the response was rewarded with a drop of water and a reward tone. False alarm responses during NOGO trials were punished with a timeout period of 3–8 s accompanied by white noise sound, during which the mouse could not initiate a new trial. There was no reward for a correct reject and no punishment for a miss. The response latency was defined as the time from when the pole was first within reach of the mouse’s whisker (typically 480 ms from trial onset, identified from high-speed video for each session analysed) to the mouse’s lever lift response. Mouse training. Test of task performance. Adult mice (P116 ± 60 days, mean and s.d., 34% male) were implanted with a custom-designed 22-gauge stainless steel laser-cut (Laser Alliance) headplate with dental acrylic. After ~1 week of recovery, subjects in optogenetics experiments were water-restricted and then trained in stages. Progression through each stage depended on the individual mouse’s weight stabilization (indication of health). (1) Freely moving mice were habituated to the behavioural apparatus, where water reward was given for holding down a lever (2–3 days). (2) Mice were head-fixed and continued lever training: water was awarded for holding down lever for 500 ms to initiate trial, followed by releasing the lever for >100 ms (2–4 days). (3) Mice were trained in a dark chamber where no visual cues could be used. Mice were trained with 90% GO trials with a pole, and received water for responding by lifting a lever on GO trials, or a 3–5 s timeout if response was on a NOGO trial (2–8 days). We found that adding this gradual training stage with 90% GO trials facilitated learning. (4) Mice were trained at 60% GO trials until learning criterion (defined as >74% correct performance for 2 consecutive days) was reached. Once subjects learned the detection task with all whiskers intact, the location of the C2 barrel was functionally mapped using intrinsic signal optical imaging. All whiskers except C2 on the mouse’s right side were trimmed. Mice were retrained with a single C2 whisker until >74% performance was reached with 50% GO trials. In most cases, behavioural performance dropped after the initial whisker trimming but recovered over 1–7 days. Trimming was maintained twice a week. Lesions or sham operations were made after the performance of the mice stabilized above the performance criterion. Experimenters were not blind to whether mice were lesioned. Any animals that could still perform well (>60% correct) in the absence of all whiskers were excluded from analysis. Test of task learning. Experimenters were blind to whether mice were lesioned or sham. For learning experiments, mice were trained as above but with more standardized training periods. Mice recovered from surgery and were habituated to handling by the trainer for 1–2 days. Mice were water-restricted and habituated through a series of pre-training stages. Progression through each step depended on the individual mouse’s weight stabilization (indication of health), or whether rest days (weekends) interrupted training, rather than an explicit behavioural criterion. (1) Freely moving mice were habituated in the light to the behavioural apparatus, where water reward was given for holding down a lever (1–2 days). (2) Mice were head-fixed and continued to hold down the lever to drink (4 ± 2 days, mean and s.d.). (3) Mice were rewarded for holding down the lever and subsequently lifting for >100 ms (4 ± 2 days). All whiskers excluding C2 were trimmed twice a week for the remainder of the learning experiment. We quantified learning time for the following stages: mice were first introduced to the pole with 90% GO trials (~4 days, Extended Data Fig. 7). This stage and successive ones were performed in a light-tight box where no visual cues could be used. Mice were given <48 sessions to reach learning criterion of 74% correct for 2 consecutive sessions. To factor in the different number of GO and NOGO trials, we calculated per cent correct performance as 100 × (Nhit/NGO + NCR/Nnogo)/2 in which the N variables are the numbers of hit, go, correct reject and NOGO trials, respectively. A total of 29 mice were lesioned before learning. Of these, several mice were excluded from analysis, including 6 mice that performed >60% correct after full whisker trimming; 3 mice that were found to have lesions that did not include the C2 barrel; and 6 mice that had lesions that extended below the cortex, including white matter and striatum. Quantification of whisker movements and contacts. Whisking was monitored with a high-speed camera (Photonfocus AG, MV1-D1312-100-G2) at 250 fps and 640 × 480 pixels/frame under infrared illumination. Whiskers were automatically traced offline and whisker position (angle) and curvature were obtained using Whisk35,36 . Trials in which tracing failed >10% of frames were omitted from analysis. For each session, mice were given a 5-min warm-up before analysis began, except for quantification of within-session performance (Fig. 3d) for which the entire session was included for analysis. Whisking analysis was restricted to a 200-ms window starting from the first frame in which whisker contact with the pole was possible. This window was chosen to best isolate the whisking associated with the sampling of the object and before the response, after which, whisking tended to increase in association with licking for water reward (Fig. 2g). For whisking amplitude and phase, the azimuthal whisking angle was band-pass filtered (four-pole Butterworth, 4–50 Hz) followed by a Hilbert transform37,38 . Instantaneous frequency was calculated from the phase. The setpoint was measured as the midpoint between the whisking envelope defined by the maximum and minimum whisker angles for each whisk cycle. Whisker contacts were defined using whisker angle and curvature parameters for each session. We first determined the range of angle-curvature values during free whisking in air (NOGO trials). The baseline curvature for each trial (mean change in curvature during 200-ms period before each trial onset) was subtracted to obtain the change in curvature (ΔΚ). Linear regression of the whisker angle and change in curvature was used to find the line of best fit (Extended Data Fig. 3). Upper and lower contact thresholds were set by finding the offset of the lines that encompassed the angle-curvature parameter space for all NOGO trials (1–5 s.d.). Putative contacts were defined as points at which local maxima or minima of ΔΚ were above or below the defined contact thresholds. Optogenetic modulation of cortical activity. For optogenetic experiments during detection behaviour, the laser was on for 33–50% of trials, which were randomly interleaved with laser-off trials. For laser-on trials, an optical shutter opened at the onset of the trial, before movement of the pole. The pole moved within reach of the whisker field 200–400 ms after the onset of the laser, ensuring photoinactivation before contacts were possible. The laser remained on until after the mouse responded, or for the duration of the trial if no response was made, for a maximum of 1.5 s. Spiking activity during photoinhibition could be efficiently silenced for at least 2 s; all trials were 1.2–1.5 s in duration with a 1-s inter-trial-interval (Extended Data Fig. 1). Exposure to laser was limited to minimize photodamage to tissue. With the protocol described, no physiological or physical damage was detectable. A 593- or 594-nm laser (OEM or Coherent) was used with Emx1–Halo mice. For PV–ChR mice, an optical chopper (Thorlabs, MC2000B) modulated the 4 mW output of a 473-nm laser (OEM) to produce pulses at 40 Hz. Lasers were coupled to a 200-μm diameter, 0.39 NA optic fibre (Thorlabs) via a fibreport, and the diamond-knife cut fibre tip was placed above the optical window and positioned over C2 using the vasculature-referenced intrinsic signal map. Electrophysiology. For recordings without behaviour, Emx1–Halo mice (n = 4) were habituated to head-fixation. Juxtasomal recordings were made using pipettes filled with artificial cerebral spinal fluid and an Axoclamp 900A amplifier. Airpuff © 2018 Springer Nature Limited. All rights reserved. Letter RESEARCH stimuli for each test condition were delivered by opening an air valve for 50 ms during trials ranging from 0.5 to 2 s, and an inter-trial interval of 1.5–3 s for 30–50 trials. Laser-on trials were randomly interleaved for 50% of the trials. Glass pipettes were inserted perpendicular to the cortical surface (~30° from vertical), and the optic fibre was positioned vertically near the pipette entry point, above a thinned skull. To test the effect of photoinhibition at various distances, the optic fibre was positioned 0, 0.5, 1, 1.5 and 2 mm from the original recording site along a thinned and transparent skull (n = 21, 11, 10, 12 and 16, respectively). Regular spiking (RS, putative excitatory) versus fast-spiking (FS, putative inhibitory) cells were categorized based on their spike waveforms as previously described39 . Cortical depth was defined as the microdrive depth relative to the pial surface. For recordings during the behavioural task, a linear silicon array (Cambridge NeuroTech H3), consisting of 64 sites spanning 1,275 μm, was used. Each site was 11 × 15 μm and coated with PEDOT to obtain an impedance of 50–150 kΩ. Signals were band-pass filtered 1–7,500 Hz and sampled at 30 kHz (OpenEphys). Between sessions, the array was withdrawn and the craniotomy sealed with silicone. Spikes were clustered and inspected using Kilosort40 and Phy41 . Cortical lesions. Mice were deeply anaesthetized under isoflurane. A 1–4-mm craniotomy was made and the underlying cortical tissue was aspirated with a sterile blunt-tipped syringe needle connected to a vacuum. Lesions were made by aspirating all cortical layers to encompass, at a minimum, the C2 barrel and the immediately adjacentbarrels,andatamaximum,themajorityofS1representingthelargewhiskers (macrovibrissae) and secondary somatosensory cortex (Extended Data Figs. 4, 5). Sham-operated mice were anaesthetized under the same conditions, and the skull was thinned with a dental drill. Lesioned and sham-operated mice were allowed to recover for 1 or 3 days after surgery before testing. After behavioural testing was complete, mice were perfused and brains extracted for histological analysis. Brains were sectioned tangentially or coronally (100 μm thick) with a vibratome. Lesion diameter was quantified in ImageJ by outlining the lesioned area for each section, quantifying the mean Feret diameter and averaging across all sections. Volume was measured by summing each section’s lesion area multiplied by 100 (the section thickness). In some cases, lesions extended beyond S1 and into subcortical tissue including the striatum. To objectively score striatal damage, the extent of cortical and subcortical damage was scored by five raters experienced at looking at coronal sections of mouse brains and blind to the behavioural data. Data analysis. Analyses were done with custom-written scripts in MATLAB. For all figures, statistical significance is denoted as *P < 0.05, **P < 0.01, ***P < 0.001. Differences were not significant (P > 0.05) unless otherwise indicated. Nonnormally distributed data (D’Agostino–Pearson test) were reported using medians and interquartile ranges, and normally distributed data with means and s.e.m. Two-sided paired t-tests were used unless otherwise indicated. Based on the mean and s.d. of normal performance levels of trained mice, power analysis indicated that detecting a drop in performance to chance levels with a significance criterion of 0.05 required a minimum sample size of three, which we exceeded in all cases. Reporting summary. Further information on experimental design is available in the Nature Research Reporting Summary linked to this paper. Code availability. All computer codes are available from the corresponding author upon reasonable request. Data availability All data are available from the corresponding author upon reasonable request. 33. Gorski, J. A. et al. Cortical excitatory neurons and glia, but not GABAergic neurons, are produced in the Emx1-expressing lineage. J. Neurosci. 22, 6309–6314 (2002). 34. Scholl, B., Pattadkal, J. J., Dilly, G. A., Priebe, N. J. & Zemelman, B. V. Local integration accounts for weak selectivity of mouse neocortical parvalbumin interneurons. Neuron 87, 424–436 (2015). 35. O’Connor, D. H. et al. Vibrissa-based object localization in head-fixed mice. J. Neurosci. 30, 1947–1967 (2010). 36. Clack, N. G. et al. Automated tracking of whiskers in videos of head fixed rodents. PLoS Comput. Biol. 8, e1002591 (2012). 37. Hill, D. N., Curtis, J. C., Moore, J. D. & Kleinfeld, D. Primary motor cortex reports efferent control of vibrissa motion on multiple timescales. Neuron 72, 344–356 (2011). 38. Kleinfeld, D. & Deschênes, M. Neuronal basis for object location in the vibrissa scanning sensorimotor system. Neuron 72, 455–468 (2011). 39. Bruno, R. M. & Simons, D. J. Feedforward mechanisms of excitatory and inhibitory cortical receptive fields. J. Neurosci. 22, 10966–10975 (2002). 40. Pachitariu, M., Steinmetz, N., Kadir, S., Carandini, M. & Harris, K. D. Kilosort: realtime spike-sorting for extracellular electrophysiology with hundreds of channels. Preprint at https://www.biorxiv.org/content/early/2016/06/30/ 061481 (2016). 41. Rossant, C. et al. Spike sorting for large, dense electrode arrays. Nat. Neurosci. 19, 634–641 (2016). 42. Paxinos, G. & Franklin, K. B. J. The Mouse Brain in Stereotaxic Coordinates. 2nd ed. (Academic, New York, 2001). © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH Extended Data Fig. 1 | See next page for caption. © 2018 Springer Nature Limited. All rights reserved. Letter RESEARCH Extended Data Fig. 1 | Optogenetic photoinhibition of cortical neurons in Emx1–Halo mice is highly efficacious. a, Juxtasomal recordings in awake, head-fixed mice were made below an optic fibre placed above a thinned, transparent skull. b, Raster plot for example neuron for randomly interleaved laser off (top) or on (bottom) trials, with air puff schematized below. c, Population peri-stimulus time histograms of 35 cells with regular-spiking (RS) waveforms (cortical depth: 280–1,120 µm, n = 4 mice) for laser-off and -on trials. Both spontaneous and whisker stimulusevoked spikes are silenced. Shaded area: laser on. d, e, Efficiency of RS cell inactivation as a function of laser power (d) and cortical depth (e), where per cent inactivation is relative to a cell’s spike rate during laseroff trials. f, Lateral extent of inactivation. Illumination of 20–40 mW reliably inactivated an area within a 1-mm radius. g, Photoinhibition at 40 mW fully blocked spontaneous and sensory-evoked spikes (100% inactivation relative to laser-off trials) in 83% of RS cells and >96% of spikes in 94% of RS cells (same cells as in c); P = 3.1 × 10−11 , Wilcoxon rank-sum test. h, Fast-spiking (FS) neurons (n = 8 cells) were similarly silenced; P = 3.1 × 10−8 , Wilcoxon rank-sum test. i, Estimated area of photoinhibition with 40-mW relative to barrel cortex (1-mm radius around C2 barrel, red circle) depicted with a tangential section through barrel cortex of an Nr5a1–eYFP mouse with layer 4 labelled to visualize barrels. j, Emx1–Halo-mediated cortical inactivation was also assessed during detection behaviour with array recordings (n = 8 session, 3 mice). k, Data from Fig. 1e replotted on a logarithmic scale to show low spike rates during laser-on trials. l, Behavioural performance during laser-off and -on trials did not correlate with spiking activity for each trial type (four sessions from three mice with per cent correct for laser-off trials: 82, 87, 80, and 78%). m, Laser-on data in l, replotted with larger scale to visualize data during laser-on trials. Data shown as median ± interquartile range (d–h); mean ± s.e.m. (l, m). © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH Extended Data Fig. 2 | Optogenetic manipulations of barrel cortex using PV–ChR and Emx1–Halo mice result in similar behavioural, motor, and sensory deficits. a, Photoinhibition of excitatory neurons in Emx1–Halo mice (orange) and photoactivation of inhibitory neurons in PV–ChR mice (blue) yielded similar behavioural deficits. Negative control mice (Cre-negative, stop-Halo mice; black) were unaffected by 593-nm laser illumination. P values for Emx1–Halo: hit, 1.6 × 10−5 ; false alarm (FA), 1.7 × 10−3 ; per cent correct, 3.6 × 10−4 ; d-prime, 1.8 × 10−3 . For PV–ChR: hit, 3.5 × 10−3 ; per cent correct, 3.9 × 10−3 ; d-prime, 0.0498. b, Optogenetic inactivation of S1 with either Emx1–Halo or PV–ChR mice decreases whisking kinematics. P values for Emx1–Halo: NOGO peak velocity, 6.6 × 10−3 ; max angle, 1.4 × 10−3 ; peak amplitude, 2.6 × 10−2 ; GO peak velocity, 4.3 × 10−4 ; max change in curvature (ΔΚ), 1.9 × 10−2 ; per cent trials with no contacts, 1.2 × 10−2 . PV–ChR: NOGO peak velocity, 8.1 × 10−3 ; max angle, 8.7 × 10−2 ; peak amplitude, 8.4 × 10−2 ; GO peak velocity, 5.7 × 10−3 ; ΔΚ, 8.7 × 10−3 ; per cent trials with no contacts, 7.5 × 10−3 . c, Sensory thresholds increase with optogenetic inactivation. P values for Emx1–Halo: curvature threshold, 9.7 × 10−4 ; contact threshold, 3.4 × 10−3 . PV–ChR: curvature threshold, 1.1 × 10−1 ; contact threshold, 1.2 × 10−2 . Data for negative control and Emx1–Halo mice are the same as in Figs. 2, 3 but repeated here for comparison with PV–ChR mice. © 2018 Springer Nature Limited. All rights reserved. Letter RESEARCH Extended Data Fig. 3 | Defining contacts based on whisker angle and change in curvature. a, Example curvature versus whisker position for a single session. Each circle represents the paired values for curvature and whisker angle for each frame during the session. Values for NOGO trials define whisker parameters during free whisking in air, when no contacts can be made (black); GO trials are shown in red. Linear regression was used to define the line of best fit (blue, solid line) for NOGO parameters, and upper and lower contact thresholds were set by finding the offsets that encompassed the no-contact parameter space (1–5 s.d. from the line of best fit, blue dashed lines). b, Putative contacts were defined as points at which the local maxima or minima of the change in curvature were above (forward contact with whisker) or below (reverse contact with whisker) the defined thresholds (tick marks). Whisking analysis was restricted to the 200-ms time window (yellow shaded area) during sampling, before the average response time (green). © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH Extended Data Fig. 4 | See next page for caption. © 2018 Springer Nature Limited. All rights reserved. Letter RESEARCH Extended Data Fig. 4 | Behavioural performance after lesions did not correlate with lesion size. a, Mice performed the task with a single C2 whisker. b, The location of the C2 barrel in a coronal section. The C2 barrel was functionally mapped with intrinsic imaging and Alexaconjugated cholera toxin subunit B (CTB, red) was injected into the centre of the C2 barrel. Blue, DAPI. Mappings in b and c are used to inform the locations of lesions made relative to the C2 barrel column. c, Equivalent location in section from an Nr5a1–eYFP mouse with barrels fluorescently labelled in L4 (white) overlaid on bright-field image to show extent of barrel cortex relative to section (black lines). C2 was located about 1.2–1.5 mm posterior to bregma, varying slightly between mice. Lesions were centred around C2. d, Size and locations of contralateral barrel cortex lesions for the 11 mice with 1-day rest shown in Fig. 3 (arranged from largest to smallest by lesion volume). For each mouse, three locations along the anterior–posterior axis are shown overlaid on atlas images, reproduced with permission from ref. 42 . In a few mice (for example, mice 1, 3 and 8), lesions extended into the secondary somatosensory area (S2). Numbers along anterior–posterior axis indicate approximate location relative to bregma. e, Lesion size did not correlate with the degree of impairment on the first (grey) or second post-lesion session when behavioural performance had recovered (red). Performance was normalized to the prelesion performance for each mouse. f, Lesion sizes were similar between groups with 1 or 3 days of rest after lesioning (P = 0.91). © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH Extended Data Fig. 5 | Ipsilateral S1 does not compensate for loss of contralateral S1. a, Behavioural performance of mice recovered rapidly after contralateral S1 lesions, as shown in Fig. 3c (red). Subsequent ipsilateral lesion (n = 6) had effects similar to sham and ipsilateral-only manipulations shown in Fig. 3c, indicating that ipsilateral S1 was not compensating for loss of contralateral S1 activity. b, C2 whisker-trim control. Performance of bilaterally lesioned mice dropped to chance when the C2 whisker was removed (P = 2.7 × 10−3 ). c, Sizes of bilateral lesions. © 2018 Springer Nature Limited. All rights reserved. Letter RESEARCH Extended Data Fig. 6 | Example histology from lesioned mice depicting lesion of contralateral S1 only or additional damage to striatum. a, Unlesioned example. b, c, Examples of S1-only lesions from two mice. d–f, Three examples of damage to striatum in addition to S1. Even minimal damage (arrows) to the dorsolateral striatum resulted in permanent behaviour deficits. Scale bar, 1 mm. © 2018 Springer Nature Limited. All rights reserved. LetterRESEARCH Extended Data Fig. 7 | Learning curves for unlesioned and lesioned mice in learning experiment. a, Individual learning curves for unlesioned mice (n = 11, blue lines) and mice with lesions of contralateral barrel cortex (n = 9, orange lines) that learned the detection task to criterion (74% correct performance for two consecutive sessions). Mice were first introduced to the pole with 90% GO trials (red lines). This intermediate step ensured that mice maintained a stable weight before moving on to the last step of training. Mice were moved onto 60% GO trials for the rest of the learning assessment. Mice were given 48 sessions to learn the task. b, Unlesioned and lesioned groups spent similar times on 90% GO sessions (3.8 ± 1.8 versus 3.5 ± 1.1 sessions for unlesioned and lesioned mice, respectively; P = 0.64). c, By the end of the 90% GO sessions, performance was still at chance levels (P = 0.34 and P = 0.37 for unlesioned and lesioned mice, respectively; one-sample t-test). © 2018 Springer Nature Limited. All rights reserved. 1 natureresearch|reportingsummaryApril2018 Corresponding author(s): Randy M. Bruno Reporting Summary Nature Research wishes to improve the reproducibility of the work that we publish. This form provides structure for consistency and transparency in reporting. For further information on Nature Research policies, see Authors & Referees and the Editorial Policy Checklist. Statistical parameters When statistical analyses are reported, confirm that the following items are present in the relevant location (e.g. figure legend, table legend, main text, or Methods section). n/a Confirmed The exact sample size (n) for each experimental group/condition, given as a discrete number and unit of measurement An indication of whether measurements were taken from distinct samples or whether the same sample was measured repeatedly The statistical test(s) used AND whether they are one- or two-sided Only common tests should be described solely by name; describe more complex techniques in the Methods section. A description of all covariates tested A description of any assumptions or corrections, such as tests of normality and adjustment for multiple comparisons A full description of the statistics including central tendency (e.g. means) or other basic estimates (e.g. regression coefficient) AND variation (e.g. standard deviation) or associated estimates of uncertainty (e.g. confidence intervals) For null hypothesis testing, the test statistic (e.g. F, t, r) with confidence intervals, effect sizes, degrees of freedom and P value noted Give P values as exact values whenever suitable. For Bayesian analysis, information on the choice of priors and Markov chain Monte Carlo settings For hierarchical and complex designs, identification of the appropriate level for tests and full reporting of outcomes Estimates of effect sizes (e.g. Cohen's d, Pearson's r), indicating how they were calculated Clearly defined error bars State explicitly what error bars represent (e.g. SD, SE, CI) Our web collection on statistics for biologists may be useful. Software and code Policy information about availability of computer code Data collection For array recording, open-source software (OpenEphys) was used. The behavior was implemented using custom code, which is available upon request. Data analysis Open-source software was used for whisker measurements (Clack et al 2012) and spike sorting and clustering (Kilosort and Phy). All other analyses were performed with custom MATLAB programs, which are available upon request. For manuscripts utilizing custom algorithms or software that are central to the research but not yet described in published literature, software must be made available to editors/reviewers upon request. We strongly encourage code deposition in a community repository (e.g. GitHub). See the Nature Research guidelines for submitting code & software for further information. Data Policy information about availability of data All manuscripts must include a data availability statement. This statement should provide the following information, where applicable: - Accession codes, unique identifiers, or web links for publicly available datasets - A list of figures that have associated raw data - A description of any restrictions on data availability All computer code and data are available from the corresponding author upon reasonable request. 2 natureresearch|reportingsummaryApril2018 Field-specific reporting Please select the best fit for your research. If you are not sure, read the appropriate sections before making your selection. Life sciences Behavioural & social sciences Ecological, evolutionary & environmental sciences For a reference copy of the document with all sections, see nature.com/authors/policies/ReportingSummary-flat.pdf Life sciences study design All studies must disclose on these points even when the disclosure is negative. Sample size (1) Inactivation of barrel cortex during behavior -- optogenetic inactivation and lesions Previous studies reported transient inactivation decreased performance to chance levels (50% performance, e. g., O'Connor et al., 2010, Guo et al., 2014, Sachidhanandam et al., 2013). Based on the mean and standard deviation of normal performance levels of trained animals (81.4% +/- 7.4%), power analysis yielded a minimum n of 3 to detect a change in performance to chance levels with a significance value of P = 0.05. In this study, n = 10 Emx-eNphR, n = 7 control animals, and n = 5 PV-ChR mice were included in the study. For lesion studies, n = 8 and n=9 mice were tested for each group (1 and 3-day rest groups). (2) Learning with lesions Based on the average learning speed of previously trained animals (25 +/- 8.6 sessions), power analysis indicated a sample size of 5 would be needed to detect a 2-fold increase in learning speed. In this study, we included 11 unlesioned, and 9 lesioned animals. Data exclusions Based on preestablished criteria, several conditions led to exclusion of data: (1) animals that were able to perform the detection task (>60% correct performance) after all whiskers were trimmed were deemed to be using other sensory modalities to perform the task and excluded from further analysis. (2) For the learning experiments, if animals lost their C2 whisker during training, subjects were excluded from further analysis. For cortical lesions included in learning experiments, animals that had inadvertent lesions beyond cortex, extending below the white matter tract were excluded from analysis. Replication All attempts at replication were successful. Randomization For learning experiments, cohorts of 10-15 mice from multiple litters were trained at a time. Animals were chosen at random, such that roughly half of the animals from the same litter (and home cage) received cortical lesions, while the other half received sham-operations. The first cohort was trained in 2016 by one trainer, and the experiment was repeated in 2017 by a second trainer. Blinding For learning experiments, the human trainers were blind to which animals received lesions. For analysis of the extent of lesion (cortex only vs. cortex plus subcortical areas (usually the striatum), histology images from all animals were scored blindly by 5 "experts" who had 3 or more years of mouse histology experience. Subjects were blind to the animal identity and outcome of the experiments (i.e., recovered behaviorally or whether they learned the task, if for learning experiments). Reporting for specific materials, systems and methods Materials & experimental systems n/a Involved in the study Unique biological materials Antibodies Eukaryotic cell lines Palaeontology Animals and other organisms Human research participants Methods n/a Involved in the study ChIP-seq Flow cytometry MRI-based neuroimaging Antibodies Antibodies used Mouse anti-NeuN Antibody, clone A60 (Millpore MAB377) Validation The anti-mouse NeuN was used in Figure 1a to label neurons relative to Emx1-cre positive cells. This monoclonal antibody clone has been validated for specificity in numerous publications (2000+, see https://www.citeab.com/antibodies/226230-mab377- anti-neun-antibody-clone-a60/publications). 3 natureresearch|reportingsummaryApril2018 Animals and other organisms Policy information about studies involving animals; ARRIVE guidelines recommended for reporting animal research Laboratory animals All animals used in this study (Emx1-cre, RCL-eNpHR3.0/YFP, Nr5a1-cre, PV-cre, and RCL-ChR2/YFP) were maintained on a C57 background. Animal ages ranged from P40 to P250 (average P111 +/- 50 days standard deviation) at the start of training. 65% of the subjects were female; 35% were male. Wild animals No wild animals were involved in the study. Field-collected samples No field-collected samples were used in the study.