OSCR

Temporal predictions shape somatosensory perception.

Code ↔ Paper

2 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.

2 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 2 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
  1. [1] § Methods › EEG preprocessing ↔ EEG Preprocessing Pipeline/EEG_PreProcessing_PT.m, lines 97 to 116 · score 0.56 · 4–34 Hz, EEG preprocessing, 16 Hz · block oscr:b:PMF9QJ8CD2MYA-Y · Report a mismatch
  2. [2] § Methods › Stimuli and task ↔ Experimental Code/PT_Randomize.m, the whole file · a weak match · score 0.52 · consecutive trials, randomized, guarantee, blocks · block oscr:b:G0K5JV1XT3WYE-B · 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 · 334 lines · 8.7 KB · no license · 1 match

  1. %% General Configuration
  2. warning('OFF');
  3. %%%List of EEG DATASETS
  4. directory = 'D:\Old USB\Predictive Timing Analysis 13032024\Raw EEG Data\';
  5. list = dir(sprintf('%s*.eeg',directory));
  6. load('timing_matrix.mat');
  7. load('level_matrix.mat');
  8. %% 1. Reading Data and Trial Definition %% /// AllTrials.mat
  9. for VPLoop = 1:35
  10. fpd = {};
  11. cfg = {};
  12. cfg.sub = VPLoop;
  13. cfg.level_matrix = level_matrix;
  14. cfg.timing_matrix = timing_matrix;
  15. cfg.demean = 'yes';
  16. cfg.detrend = 'no'; %SEE detrend, we will not detrend based on different trial lengths.
  17. %%%Channel Location
  18. cfg.dataset = sprintf('%s%s',directory,list(VPLoop).name);
  19. cfg.layout = 'easycapM11.lay';
  20. cfg.hpfilter = 'no';
  21. %%%Trial Definition
  22. cfg.trialdef.pre = 3; % in seconds, we will take 1 seconds before the cue as a baseline, +2 seconds for taper
  23. cfg.trialdef.post1 = 12; % for ICA and to make comparable, we use the same post-trial-def for all trial types
  24. cfg.trialdef.post2 = 12;
  25. cfg.trialdef.post3 = 12; % in seconds, we will need 2sec cue,4 second delay, 4 seconds stimulus, +2 seconds for taper
  26. cfg.trialfun = 'AllTrials_Correction';
  27. cfg = ft_definetrial(cfg);
  28. datp = ft_preprocessing(cfg);
  29. cfg = [];
  30. fpd = datp;
  31. clear datp
  32. %%% The channel number needed to be changed in certain participants
  33. %%% (swapped channels during EEG prep)
  34. if VPLoop == 1
  35. for i = 1:length(fpd.trial)
  36. fpd.trial{i} = fpd.trial{i}([1:61 63 62 64],:);
  37. end
  38. end
  39. if VPLoop == 4
  40. for i = 1:length(fpd.trial)
  41. fpd.trial{i} = fpd.trial{i}([1:36 39 38 37 40:64],:);
  42. end
  43. end
  44. if VPLoop == 19
  45. for i = 1:length(fpd.trial)
  46. fpd.trial{i} = fpd.trial{i}([1:2 4 3 5:64],:);
  47. end
  48. end
  49. if VPLoop == 33
  50. for i = 1:length(fpd.trial)
  51. fpd.trial{i} = fpd.trial{i}([1:5 9 7:8 6 10:64],:);
  52. end
  53. end
  54. cfg = [];
  55. cfg.implicitref = 'FCz';
  56. fpd = ft_preprocessing(cfg,fpd);
  57. cfg=[];
  58. cfg.reref = 'yes';
  59. cfg.refchannel = 'EEG';
  60. fpd = ft_preprocessing(cfg, fpd);
  61. %%% Manually screen if a channel needs interpolation, see interpolation.m
  62. %
  63. % cfg = [];
  64. % cfg.viewmode = 'vertical'
  65. % ft_databrowser(cfg, fpd);
  66. %%% We need to repair ch7 P3 for participants 29-35
  67. for j = 1:2
  68. cfg = [];
  69. if j == 1
  70. cfg.bpfilter = 'yes';
  71. cfg.bpfreq = [4 34];
  72. cfg.bpfilttype = 'but';
  73. cfg.bpfiltord = 6;
  74. elseif j == 2
  75. cfg.hpfilter = 'yes';
  76. cfg.hpfreq = [16];
  77. cfg.hpfilttype = 'but';
  78. cfg.hpfiltord = 6;
  79. end
  80. %
  81. icdata = ft_preprocessing(cfg,fpd);
  82. icdata.cfg = [];
  83. %%% Some summary statistics / change to method "trial" for single trial
  84. %%% evaluation
  85. cfg = {};
  86. cfg.method = 'summary';
  87. cfg.keepchannel = 'yes';
  88. cfg.metric = 'maxzvalue';
  89. cfg.channel = 'EEG';
  90. cfg.elec = ft_read_sens('standard_1005.elc');
  91. ncfg.layout = 'easycapM11.lay';
  92. ncfg.method = 'triangulation';
  93. cfg.neighbours = ft_prepare_neighbours(ncfg, icdata);
  94. icdata2 = ft_rejectvisual(cfg,icdata);
  95. %%% We also used this stage to interpolate channels.
  96. cfg = {};
  97. cfg.method = 'summary';
  98. cfg.keepchannel = 'repair';
  99. cfg.metric = 'maxzvalue';
  100. cfg.channel = 'all';
  101. cfg.elec = ft_read_sens('standard_1005.elc');
  102. ncfg.layout = 'easycapM11.lay';
  103. ncfg.method = 'triangulation';
  104. cfg.neighbours = ft_prepare_neighbours(ncfg, icdata);
  105. icdata2 = ft_rejectvisual(cfg,icdata2);
  106. if j == 1
  107. save(sprintf('icdata2_low_%i.mat',VPLoop),'icdata2');
  108. elseif j == 2
  109. save(sprintf('icdata2_high_%i.mat',VPLoop),'icdata2');
  110. end
  111. end
  112. end
  113. for j = 1:2
  114. for k = 4
  115. if k == 1
  116. sub = 1:6;
  117. elseif k == 2
  118. sub = 7:12;
  119. elseif k == 3
  120. sub = 13:18;
  121. elseif k == 4
  122. sub = 19:22;
  123. elseif k == 5
  124. sub = 23:26;
  125. elseif k == 6
  126. sub = 27:30;
  127. elseif k == 7
  128. sub = 31:35;
  129. end
  130. parfor VPLoop = sub
  131. if j == 1
  132. icdata2 = load(sprintf('icdata2_low_%i.mat',VPLoop));
  133. icdata2 = icdata2.icdata2;
  134. elseif j == 2
  135. icdata2 = load(sprintf('icdata2_high_%i.mat',VPLoop));
  136. icdata2 = icdata2.icdata2;
  137. end
  138. cfg = [];
  139. cfg = [];
  140. cfg.channel = {'all'};
  141. cfg.method = 'runica';
  142. cfg.numcomponent = 64;
  143. cfg.runica.extended = 0;
  144. cfg.runica.maxsteps = 1000;
  145. icdata3{VPLoop} = ft_componentanalysis(cfg,icdata2);
  146. % if j == 1
  147. % save(sprintf('icdata3_low_%i.mat',VPLoop),'icdata3');
  148. % elseif j == 2
  149. % save(sprintf('icdata3_high_%i.mat',VPLoop),'icdata3');
  150. % end
  151. end
  152. for VPLoop = sub;
  153. icdataf = icdata3{VPLoop};
  154. if j == 1
  155. save(sprintf('icdataf_low_%i.mat',VPLoop),'icdataf');
  156. elseif j == 2
  157. save(sprintf('icdataf_high_%i.mat',VPLoop),'icdataf');
  158. end
  159. end
  160. clear icdata3
  161. end
  162. end
  163. %%saving procedure
  164. clear all;
  165. for VPLoop = 1:35
  166. for j = 1:2
  167. if j == 1
  168. load(sprintf('icdataf_low_%i.mat',VPLoop));
  169. else
  170. load(sprintf('icdataf_high_%i.mat',VPLoop));
  171. end
  172. a = icdataf.label;
  173. icdataf.label = icdataf.topolabel(1:64);
  174. cfg = [];
  175. cfg.path = 'D:/';
  176. cfg.layout = 'easycapM11.lay';
  177. cfg.prefix = 'IC';
  178. rej_comp = ft_icabrowser_sls(cfg,icdataf); %%% replace with ft_icabrowser or request file per mail, ft_icabrowser_sls is an adapted version which has trial-by-trial representations and ICA signal over trials
  179. cfg.component = find(rej_comp);
  180. icdataf.label = a;
  181. ICDataNew = ft_rejectcomponent(cfg, icdataf);
  182. if j == 1
  183. save(sprintf('ICDataNew_low_%i',VPLoop),'ICDataNew');
  184. else
  185. save(sprintf('ICDataNew_high_%i',VPLoop),'ICDataNew');
  186. end
  187. end
  188. end
  189. %%% Evaluate on summary / trial level
  190. for VPLoop = 1:35
  191. for j = 1:2
  192. if j == 1
  193. load(sprintf('ICDataNew_low_%i.mat',VPLoop));
  194. else
  195. load(sprintf('ICDataNew_high_%i.mat',VPLoop));
  196. end
  197. cfg = {};
  198. cfg.method = 'summary';
  199. cfg.keepchannel = 'yes';
  200. cfg.metric = 'range';
  201. cfg.channel = 'EEG';
  202. %cfg.latency = [0 8]
  203. cfg.preproc.bpfilter = 'no';
  204. cfg.elec = ft_read_sens('standard_1005.elc');
  205. ncfg.layout = 'easycapM11.lay';
  206. ncfg.method = 'triangulation';
  207. cfg.neighbours = ft_prepare_neighbours(ncfg, ICDataNew);
  208. ICDataNew = ft_rejectvisual(cfg,ICDataNew);
  209. cfg = {};
  210. cfg.method = 'trial';
  211. cfg.keepchannel = 'yes';
  212. cfg.elec = ft_read_sens('standard_1005.elc');
  213. ncfg.layout = 'easycapM11.lay';
  214. ncfg.method = 'triangulation';
  215. cfg.neighbours = ft_prepare_neighbours(ncfg, ICDataNew);
  216. ICDataNew = ft_rejectvisual(cfg,ICDataNew);
  217. % cfg = [];
  218. % cfg.viewmode = 'vertical'
  219. % ncfg = ft_databrowser(cfg, ICDataNew);
  220. %
  221. if j == 1
  222. save(sprintf('ICDataNew_lowC_%i.mat',VPLoop),'ICDataNew');
  223. else
  224. save(sprintf('ICDataNew_highC_%i.mat',VPLoop),'ICDataNew');
  225. end
  226. end
  227. end
  228. %%% Final artifact rejection step
  229. for VPLoop = 1:35
  230. for j = 1:2
  231. if j == 1
  232. load(sprintf('ICDataNew_lowC_%i.mat',VPLoop));
  233. else
  234. load(sprintf('ICDataNew_highC_%i.mat',VPLoop));
  235. end
  236. cfg = {};
  237. cfg.method = 'trial';
  238. cfg.keepchannel = 'yes';
  239. cfg.elec = ft_read_sens('standard_1005.elc');
  240. ncfg.layout = 'easycapM11.lay';
  241. ncfg.method = 'triangulation';
  242. cfg.neighbours = ft_prepare_neighbours(ncfg, ICDataNew);
  243. ICDataNew = ft_rejectvisual(cfg,ICDataNew);
  244. if j == 1
  245. save(sprintf('ICDataNew_lowC_%i.mat',VPLoop),'ICDataNew');
  246. else
  247. save(sprintf('ICDataNew_highC_%i.mat',VPLoop),'ICDataNew');
  248. end
  249. end
  250. end

EEG_PreProcessing_PT.m, no license · at the source

Overview

  1. Department of Systems Neuroscience, University Medical Center Hamburg-Eppendorf, Hamburg, Germany
  2. Present Address: Center for Depression, Anxiety and Stress Research, Department of Psychiatry, McLean Hospital, Harvard Medical School, Boston, MA USA
Institutions: Harvard University (United States); McLean Hospital (United States); University Medical Center Hamburg-Eppendorf (Germany)
Journal: Nature communications, volume 17, issue 1, article 3476
Dates: received 6 December 2024; accepted 23 March 2026; published online 14 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41467-026-71600-y · PMID 41974688 · PMCID PMC13079782 · OpenAlex W7154111147
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), human (organism), pain (population), cognitive (subfield)
Methods: Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Physiology & signal measures
Keywords: Emotion, Pain, Human behaviour
MeSH: Anticipation, Psychological*, Pain*, Pain Perception*, Somatosensory Cortex*, Adult, Alpha Rhythm, Beta Rhythm, Cold Temperature, Cues, Female, Hot Temperature, Humans, Male, Time Factors, Young Adult (* major topic)
Topic: Neuroscience and Music Perception (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Research Council (883892, AdG-883892-PainPersist); Deutsche Forschungsgemeinschaft (German Research Foundation) (422744262-TRR 289, 531626241)
Citations: cited by 2 papers (Europe PMC); 58 references in the paper

Abstract

Although intensity expectations have been thoroughly studied in relation to pain, there has been a notable lack of investigation into temporal expectations. One important temporal pain effect, the so-called dread effect, suggests that future pain becomes more aversive with increasing delay. Here we investigated temporal expectations including the dread effect by presenting probabilistically cued painful heat and non-painful cold stimuli after different delay periods. Actual stimulus latency had no effect on perceived intensity in both non-painful cold and painful heat conditions. However, our data clearly show that the expectation of longer delays amplified somatosensory perception, indicating that the dread effect is related to expected and not to experienced delay. Electroencephalography data show that temporal expectations modulate alpha/beta activity during cue presentation, but not during stimulation. Actual stimulus timing is represented in alpha-to-beta frequencies during heat and cold stimulation.

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

Repository

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

OSF tajch

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Languages: MATLAB (65)
Size: 142 files, 65 scripts
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Psychtoolbox (17 files), SPM (16 files), FieldTrip (9 files), Statistics and Machine Learning Toolbox (7 files)
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
65 files
At the source: osf.io/tajch/

Code availability

Code for this study is publicly available on https://osf.io/tajch/. Project 10.17605/OSF.IO/TAJCH58.

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:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 65 scripts, each with its path and the digest of its content;
  • 2 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

No dataset and no data link were found in the paper.

Data availability

Data for this study are publicly available on https://osf.io/tajch/. Project 10.17605/OSF.IO/TAJCH58.

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, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 3 keywords, 15 MeSH terms, 2 funders, 52 references.

Cite

This paper

Strube, A., & Büchel, C. (2026). Temporal predictions shape somatosensory perception. Nature communications, 17(1), 3476. https://doi.org/10.1038/s41467-026-71600-y

BibTeX

@article{strube2026temporal,
author = {Strube, Andreas and Büchel, Christian},
title = {{Temporal predictions shape somatosensory perception}},
journal = {Nature communications},
year = {2026},
month = apr,
volume = {17},
number = {1},
pages = {3476},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-71600-y},
url = {https://doi.org/10.1038/s41467-026-71600-y},
pmid = {41974688},
pmcid = {PMC13079782}
}

RIS

TY - JOUR
AU - Strube, Andreas
AU - Büchel, Christian
TI - Temporal predictions shape somatosensory perception
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/04/14
VL - 17
IS - 1
SP - 3476
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-71600-y
UR - https://doi.org/10.1038/s41467-026-71600-y
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-71600-y",
"type": "article-journal",
"title": "Temporal predictions shape somatosensory perception",
"container-title": "Nature communications",
"author": [
{
"family": "Strube",
"given": "Andreas"
},
{
"family": "Büchel",
"given": "Christian"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "3476",
"DOI": "10.1038/s41467-026-71600-y",
"PMID": "41974688",
"PMCID": "PMC13079782",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-71600-y",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
14
]
]
}
}

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.1016/j.neuron.2023.01.002 [code]
Agency affects pain inference through prior shift as opposed to likelihood precision modulation in a Bayesian pain model.
Journal: Neuron
In common: FieldTrip, SPM, pain, EEG, 14 references, author Andreas Strube
[2] doi:10.1371/journal.pbio.3003675 [code]
Dynamic expectation strength and precision shape human pain perception through shared and dissociable α-oscillatory mechanisms.
Journal: PLoS biology
In common: SPM, Statistics and Machine Learning Toolbox, pain, EEG, 13 references
[3] doi:10.1038/s41467-025-66038-7 [code]
Controllability changes pain perception by increasing the precision of expectations.
Journal: Nature communications
In common: pain, cognitive, 10 references, author Christian Büchel
[4] doi:10.1371/journal.pcbi.1013053 [code]
Expectation generation and its effect on subsequent pain and visual perception.
Journal: PLoS computational biology
In common: Statistics and Machine Learning Toolbox, pain, cognitive, 13 references
[5] doi:10.1126/sciadv.adq0261 [code]
Thermosensory predictive coding underpins an illusion of pain.
Journal: Science advances
In common: pain, cognitive, 12 references
[6] doi:10.1073/pnas.2116616119 [code]
Temporal-spectral signaling of sensory information and expectations in the cerebral processing of pain.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: FieldTrip, pain, EEG, cognitive, 12 references
[7] doi:10.1073/pnas.2212252120 [code]
Confidence of probabilistic predictions modulates the cortical response to pain.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: Psychtoolbox, Statistics and Machine Learning Toolbox, pain, EEG, cognitive, 10 references
[8] doi:10.7554/elife.90634 [code]
Statistical learning shapes pain perception and prediction independently of external cues.
Journal: eLife
In common: pain, cognitive, 9 references
[9] doi:10.1126/sciadv.ado8230 [code]
A computational mechanism of cue-stimulus integration for pain in the brain.
Journal: Science advances
In common: Statistics and Machine Learning Toolbox, pain, cognitive, 8 references
[10] doi:10.1038/s41467-022-34283-9 [code]
Computational and neural mechanisms of statistical pain learning.
Journal: Nature communications
In common: Psychtoolbox, SPM, pain, 7 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-71600-y.svg)](https://openscicode.org/badge/doi/10.1038/s41467-026-71600-y)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

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

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

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)

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