OSCR

Contextual gating of whisker-evoked responses by frontal cortex supports flexible decision making.

A correction to this paper has been published: the notice, 42486857, from Europe PMC.

Code ↔ Paper

4 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 4 matches · 2 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Histology and localization of electrode tracks ↔ UniversalProbeFinder.m, the whole file · a weak match · score 0.85 · Universal Probe Finder, Mouse Brain Atlas, Pre processing, Allen CCF, v3, alignment
  2. [2] § Methods › Histology and localization of electrode tracks ↔ ProbeFinder.m, lines 1–42 · score 0.76 · Universal Probe Finder, Mouse Brain Atlas, Allen CCF, v3, alignment, MATLAB
  3. [3] § Methods › Electrophysiology data analysis ↔ common/DP_DetectSpikes.m, the whole file · a weak match · score 0.62 · Spike detection, kilosort2, thresholds, median, channels
  4. [4] § Results › Spatiotemporal dynamics of neocortical activity ↔ SHARP-Track/Convert_CCF_Coords_to_FP_Regions.m, lines 11–47 · score 0.52 · mouse brain atlas, Allen CCF, located, Neuropixels, tracks, probes

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

MATLAB · 128 lines · 5.4 KB · GPL-3.0 · 1 match

  1. function UniversalProbeFinder
  2. %The Universal Probe Finder consists of three independent programs:
  3. % - SlicePrepper: pre-process your images & annotate traces
  4. % - SliceFinder: align each slice to a brain atlas
  5. % - ProbeFinder: use ephys data to fine-tune your probe's location & export the brain at each
  6. % contact point or cluster
  7. %
  8. %To use any program, simply type the name of the program in the matlab prompt, e.g.:
  9. %ProbeFinder
  10. %
  11. %Please read the manual for more detailed instructions.
  12. %
  13. %The Universal Probe Finder can use multiple atlases and ephys data formats, and calculates the
  14. %stimulus responsiveness of your clusters with the zetatest using only an array of event-onset
  15. %times. Using these neurophysiological markers will allow a more reliable alignment of your probe's
  16. %contact points to specific brain areas.
  17. %
  18. %At this time, can use the following atlases:
  19. %a. Sprague Dawley rat brain atlas, downloadable at: https://www.nitrc.org/projects/whs-sd-atlas
  20. %b. Allen CCF mouse brain atlas, downloadable at: http://data.cortexlab.net/allenCCF/
  21. %c. CHARM/SARM macaque brain atlas: https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/nonhuman/macaque_tempatl/atlas_charm.html
  22. %It is also possible to add your own Atlas by editing the configAtlas.ini file that is created
  23. %when you first run the ProbeFinder (see manual).
  24. %
  25. %Please reach out to us (for example here: https://github.com/JorritMontijn/UniversalProbeFinder)
  26. %if you wish to have a different atlas added with out-of-the-box support. Adding an atlas is
  27. %very easy, and we're happy to extend the usefulness of our program for all its users.
  28. %
  29. %Acknowledgements
  30. %This work is based on earlier work by people from the cortex lab, most notably Philip Shamash
  31. %and Andy Peters. See for example this paper: https://www.biorxiv.org/content/10.1101/447995v1
  32. %
  33. %This repository includes various functions that come from other repositories, credit for these
  34. %functions go to their creators:
  35. %https://github.com/petersaj/AP_histology
  36. %https://github.com/JorritMontijn/Acquipix
  37. %https://github.com/JorritMontijn/GeneralAnalysis
  38. %https://github.com/kwikteam/npy-matlab
  39. %https://github.com/cortex-lab/spikes
  40. %https://github.com/JorritMontijn/zetatest
  41. %
  42. %License
  43. %This repository is licensed under the GNU General Public License v3.0, meaning you are free to
  44. %use, edit, and redistribute any part of this code, as long as you refer to the source (this
  45. %repository) and apply the same non-restrictive license to any derivative work (GNU GPL v3).
  46. %
  47. %The logo for the Universal Probe Finder uses this image as background (CC licensed):
  48. %https://upload.wikimedia.org/wikipedia/commons/7/75/Massive_galaxies_discovered_in_the_early_Universe.jpg
  49. %
  50. %Created by Jorrit Montijn at the Cortical Structure and Function laboratory (KNAW-NIN)
  51. %
  52. %Rev:20240221 - v1.1.0
  53. %ask which program to run
  54. %set disable/enable global
  55. global sUPF_ChooseGui
  56. if isfield(sUPF_ChooseGui,'hMain') && ishandle(sUPF_ChooseGui.hMain),return;end
  57. %create GUI
  58. hChooseGui = figure('WindowStyle','Normal','Name','Universal Probe Finder',...
  59. 'Menubar','none','NumberTitle','off','Position',[500 500 400 200],'CloseRequestFcn',@UPF_DeleteFcn);
  60. hChooseGui.Units = 'normalized';
  61. %add paths
  62. if ~isdeployed
  63. strFullpath = mfilename('fullpath');
  64. strPath = fileparts(strFullpath);
  65. sDir=dir([strPath filesep '**' filesep]);
  66. %remove git folders
  67. sDir(contains({sDir.folder},[filesep '.git'])) = [];
  68. cellFolders = unique({sDir.folder});
  69. for intFolder=1:numel(cellFolders)
  70. addpath(cellFolders{intFolder});
  71. end
  72. end
  73. %change icon
  74. try
  75. warning('off','MATLAB:ui:javaframe:PropertyToBeRemoved');
  76. warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame');
  77. jframe=get(hChooseGui,'javaframe');
  78. jIcon=javax.swing.ImageIcon(fullpath(SH_getIniPath(),'icon.png'));
  79. jframe.setFigureIcon(jIcon);
  80. catch
  81. end
  82. %create gui
  83. ptrTextPrepper = uicontrol(hChooseGui,'Style','text','String','Select the program you wish to run:',...
  84. 'Units','normalized','FontSize',12,'Position',[0.1 0.8 0.8 0.15],'backgroundcolor',[1 1 1]);
  85. ptrButtonPrepper = uicontrol(hChooseGui,'Style','pushbutton','String','Slice Prepper',...
  86. 'Units','normalized','FontSize',12,'Position',[0.2 0.63 0.6 0.15],...
  87. 'Callback',@SlicePrepper);
  88. ptrButtonFinder = uicontrol(hChooseGui,'Style','pushbutton','String','Slice Finder',...
  89. 'Units','normalized','FontSize',12,'Position',[0.2 0.43 0.6 0.15],...
  90. 'Callback',@SliceFinder);
  91. ptrButtonProber = uicontrol(hChooseGui,'Style','pushbutton','String','Probe Finder',...
  92. 'Units','normalized','FontSize',12,'Position',[0.2 0.23 0.6 0.15],...
  93. 'Callback',@ProbeFinder);
  94. %check for ini file
  95. strIni = strcat(SH_getIniPath(),filesep,'configPF.ini');
  96. %load ini
  97. ptrButtonSetter = uicontrol(hChooseGui,'Style','pushbutton','String','Settings',...
  98. 'Units','normalized','FontSize',12,'Position',[0.3 0.05 0.4 0.12],...
  99. 'Callback',@SetVariablesUPF);
  100. if exist(strIni,'file')
  101. ptrButtonSetter.Visible = 'on';
  102. else
  103. ptrButtonSetter.Visible = 'off';
  104. end
  105. %add handles to global
  106. sUPF_ChooseGui = struct;
  107. sUPF_ChooseGui.hMain = hChooseGui;
  108. sUPF_ChooseGui.handles.ptrTextPrepper = ptrTextPrepper;
  109. sUPF_ChooseGui.handles.ptrButtonPrepper = ptrButtonPrepper;
  110. sUPF_ChooseGui.handles.ptrButtonFinder = ptrButtonFinder;
  111. sUPF_ChooseGui.handles.ptrButtonProber = ptrButtonProber;
  112. sUPF_ChooseGui.handles.ptrButtonSetter = ptrButtonSetter;
  113. %move
  114. movegui(hChooseGui,'center');
  115. end

UniversalProbeFinder.m at commit d281538, under GPL-3.0 · at the source

Overview

  1. Laboratory of Sensory Processing, Brain Mind Institute, School of Life Sciences, Ecole Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland
Journal: Nature communications, volume 17, issue 1, article 5982
Dates: received 8 July 2025; accepted 13 May 2026; published online 26 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-73622-y · PMID 42191718 · PMCID PMC13346651 · OpenAlex W7162464462
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: mouse (organism), cognitive (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, Connectivity, Single-unit activity, calcium imaging, fMRI & imaging
Keywords: Decision, Barrel cortex, Sensory processing, Cortex, Premotor cortex
MeSH: Decision Making*, Frontal Lobe*, Motor Cortex*, Vibrissae*, Animals, Cues, Male, Mice, Mice, Inbred C57BL, Optogenetics (* major topic)
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Swiss National Science Foundation (182010, 310030_219343, 31003A_182010, TMAG-3_209271)
Citations: cited by 1 paper (Europe PMC); 59 references in the paper
Notices: A correction to this paper has been published (42486857, from Europe PMC)

Abstract

Context-dependent sensory processing underlies important aspects of flexible behavior. Here, we investigate how mice can use a briefly-presented auditory contextual Go or Nogo cue after a delay period to gate the transformation of a whisker deflection into licking for reward. Spatiotemporally-specific optogenetic inactivation demonstrated an important contribution of various cortical regions during distinct trial epochs, with only whisker secondary motor cortex (wM2) contributing strongly to all task epochs including auditory cue, delay and whisker stimulus. Electrophysiological recordings revealed prominent context representation in both wM2 and anterolateral motor cortex (ALM) in the form of persistent activity with stable population dynamics. Notably, we found that context and whisker sensory processing appeared to be integrated first in wM2, whose activity predicted future lick initiation in both correct hit trials and false alarm error trials already within 30 ms after whisker deflection. We thus identify wM2 as a key node for the contextual gating of the transformation of whisker sensation into motor commands for goal-directed licking.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.

cortex-lab/allenCCF

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: e5a57fe7e1c9fb333fec51c29a8471131c233a76, 15 July 2025
Languages: MATLAB (61)
Size: 75 files, 61 scripts
Software Heritage: not archived
Found in: the text, “Histology and localization of electrode tracks”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
62 files

JorritMontijn/UniversalProbeFinder

License: GPL-3.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: d2815385b6a980ffe2efba6560ab6d29a454f039, 20 March 2024
Languages: MATLAB (161)
Size: 172 files, 161 scripts
Software Heritage: not archived
Found in: the text, “Histology and localization of electrode tracks”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
163 files

Zenodo 17973874

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 2 files
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
At the source:

Code availability

MATLAB and Python code used for analyses are available via Zenodo at (10.5281/zenodo.17973874).

Reproduced under the paper's license (CC BY), from the paper cited above.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 222 scripts, each with its path and the digest of its content;
  • 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data availability

The data described in this study are available via Zenodo at (10.5281/zenodo.17973874). Source data are provided with this paper.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 5 keywords, 10 MeSH terms, 1 funder, 57 references, 1 integrity notice.

Cite

This paper

Ghaderi, P., Crochet, S., & Petersen, C. C. H. (2026). Contextual gating of whisker-evoked responses by frontal cortex supports flexible decision making. Nature communications, 17(1), 5982. https://doi.org/10.1038/s41467-026-73622-y

BibTeX

@article{ghaderi2026contextual,
author = {Ghaderi, Parviz and Crochet, Sylvain and Petersen, Carl C H},
title = {{Contextual gating of whisker-evoked responses by frontal cortex supports flexible decision making}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {5982},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-73622-y},
url = {https://doi.org/10.1038/s41467-026-73622-y},
pmid = {42191718},
pmcid = {PMC13346651}
}

RIS

TY - JOUR
AU - Ghaderi, Parviz
AU - Crochet, Sylvain
AU - Petersen, Carl C H
TI - Contextual gating of whisker-evoked responses by frontal cortex supports flexible decision making
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/05/26
VL - 17
IS - 1
SP - 5982
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-73622-y
UR - https://doi.org/10.1038/s41467-026-73622-y
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-73622-y",
"type": "article-journal",
"title": "Contextual gating of whisker-evoked responses by frontal cortex supports flexible decision making",
"container-title": "Nature communications",
"author": [
{
"family": "Ghaderi",
"given": "Parviz"
},
{
"family": "Crochet",
"given": "Sylvain"
},
{
"family": "Petersen",
"given": "Carl C H"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "5982",
"DOI": "10.1038/s41467-026-73622-y",
"PMID": "42191718",
"PMCID": "PMC13346651",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-73622-y",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
26
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.7554/elife.109717 [code]
Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation.
Journal: eLife
In common: Statistics and Machine Learning Toolbox, mouse, 29 references, 2 authors
[2] doi:10.7554/elife.109240 [code]
Neural activity profiles reveal overlapping, intermingled subpopulations spanning area borders in mouse sensorimotor cortex.
Journal: eLife
In common: Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 9 references
[3] doi:10.1371/journal.pbio.3003749
Somatosensory input drives membrane potential dynamics in motor cortex during voluntary limb movement.
Journal: PLoS biology
In common: mouse, 8 references
[4] doi:10.1038/s41467-026-71664-w [code]
Dorsal prefrontal cortex drives perseverative behavior in mice.
Journal: Nature communications
In common: Parallel Computing Toolbox, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse, 5 references
[5] doi:10.1016/j.celrep.2026.117456 [code]
Anterior lateral motor cortex enables contextual decision-making via dynamic reconfiguration of local circuits.
Journal: Cell reports
In common: Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 6 references
[6] doi:10.7554/elife.111876 [code]
Distinct sensorimotor encoding in tuft dendrites and somata associated with action, correction, and learning.
Journal: eLife
In common: mouse, 8 references
[7] doi:10.34133/research.1295
A Corticotectal Pathway Regulates Vibrissal Somatosensory-Mediated Predatory Hunting Learning.
Journal: Research (Washington, D.C.)
In common: 7 references
[8] doi:10.1038/s41467-026-76581-6 [code]
Thalamocortical bursts encode reward contingencies and drive associative learning.
Journal: Nature communications
In common: CircStat, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, mouse, 3 references
[9] doi:10.1016/j.neuron.2026.07.016 [code]
Inferring brain-wide interactions using data-constrained recurrent neural network models.
Journal: Neuron
In common: Parallel Computing Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 5 references
[10] doi:10.1038/s41467-026-75347-4 [code]
Sleep reveals dynamics integrating and segregating movement and stimulus representations in V1.
Journal: Nature communications
In common: CircStat, Parallel Computing Toolbox, Image Processing Toolbox, 2 other tools, mouse, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.