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.

4 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.

The 4 matches · 2 of them tie a paragraph to a whole file without 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 · block oscr:b:7D0X3V8M2ZZZK-L · Report a mismatch
  2. [2] § Methods › Histology and localization of electrode tracks ↔ ProbeFinder.m, lines 1 to 42 · score 0.76 · Universal Probe Finder, Mouse Brain Atlas, Allen CCF, v3, alignment, MATLAB · block oscr:b:JMGSJF4F7P91N-1 · Report a mismatch
  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 · block oscr:b:3KHAQPWPJXWYW-U · Report a mismatch
  4. [4] § Results › Spatiotemporal dynamics of neocortical activity ↔ SHARP-Track/Convert_CCF_Coords_to_FP_Regions.m, lines 11 to 47 · score 0.52 · mouse brain atlas, Allen CCF, located, Neuropixels, tracks, probes · block oscr:b:HXT57AYGB20NM-4 · Report a mismatch

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: 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 (how the code is found and 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 29 October 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: 2 checks, the latest on 29 October 2026: the link answers
  • 29 October 2026: the link answers
  • 27 September 2026: the link answers
62 files

JorritMontijn/UniversalProbeFinder

License: GPL-3.0
State: the link answers, verified on 2 November 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: 2 checks, the latest on 2 November 2026: the link answers
  • 2 November 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

Other data links

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 Portfolio},
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 Portfolio
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 Portfolio",
"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.1371/journal.pbio.3001667 [code]
Learning-related congruent and incongruent changes of excitation and inhibition in distinct cortical areas.
Journal: PLoS biology
In common: Parallel Computing Toolbox, Image Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 22 references, 2 authors
[3] doi:10.1101/2025.10.31.685738 [code]
Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation
Journal: bioRxiv (preprint)
In common: Statistics and Machine Learning Toolbox, 20 references, 2 authors
[4] doi:10.1016/j.heliyon.2024.e37831 [code]
Dopamine dynamics in nucleus accumbens across reward-based learning of goal-directed whisker-to-lick sensorimotor transformations in mice.
Journal: Heliyon
In common: mouse, 18 references, 2 authors
[5] doi:10.7554/elife.97602 [code]
Cell class-specific long-range axonal projections of neurons in mouse whisker-related somatosensory cortices.
Journal: eLife
In common: mouse, 18 references, 2 authors
[6] doi:10.3389/fnana.2021.791015 [code]
Axonal and Dendritic Morphology of Excitatory Neurons in Layer 2/3 Mouse Barrel Cortex Imaged Through Whole-Brain Two-Photon Tomography and Registered to a Digital Brain Atlas.
Journal: Frontiers in neuroanatomy
In common: Parallel Computing Toolbox, Signal Processing Toolbox, Image Processing Toolbox, 1 other tool, mouse, 14 references, 2 authors
[7] doi:10.1371/journal.pone.0287174
Membrane potential dynamics of excitatory and inhibitory neurons in mouse barrel cortex during active whisker sensing.
Journal: PloS one
In common: mouse, 10 references, 2 authors
[8] doi:10.1016/j.celrep.2024.113991 [code]
Tactile processing in mouse cortex depends on action context.
Journal: Cell reports
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 13 references
[9] doi:10.7554/elife.92620 [code]
Rule-based modulation of a sensorimotor transformation across cortical areas.
Journal: eLife
In common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, mouse, 12 references
[10] doi:10.1016/j.cell.2022.02.006 [code]
A midbrain-thalamus-cortex circuit reorganizes cortical dynamics to initiate movement.
Journal: Cell
In common: Parallel Computing Toolbox, Signal Processing Toolbox, Image Processing Toolbox, 1 other tool, mouse, 10 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.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1038/s41467-026-73622-y.svg)](https://openscicode.org/badge/doi/10.1038/s41467-026-73622-y)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-73622-y.svg
   :target: https://openscicode.org/badge/doi/10.1038/s41467-026-73622-y
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-73622-y"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-73622-y.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

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