OSCR

Theta oscillations tag episodic memories for sleep-dependent consolidation.

Code ↔ Paper

14 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 14 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
  1. [1] § Materials and methods › Data analysis › EEG. ↔ tools/fun_so_spindle_coupling.m, lines 1–40 · score 0.90 · 0.5–4 Hz, circStats, spindle coupling density, fun_slow_oscillations, coupling phase, detected spindle
  2. [2] § Materials and methods › Statistical analysis ↔ code/figure_2C.m, lines 106–146 · score 0.85 · activity predicts later, Discovery Rate, cross correlation, theta power, xcorr, lagged
  3. [3] § Materials and methods › Data analysis › EEG. ↔ tools/fun_slow_oscillations.m, lines 111–129 · score 0.82 · negative zero crossings, 0.5–1.25 Hz, fun slow oscillations, peak amplitude, 0.5 Hz, event
  4. [4] § Materials and methods › Data analysis › EEG. ↔ tools/fun_sleep_spindles.m, lines 114–157 · score 0.79 · complex Morlet wavelet, fun sleep spindles, peak frequency, FWHM, bandwidth, empirically
  5. [5] § Results › Theta oscillations support the tagging of memories for sleep-dependent consolidation ↔ code/figure_2C.m, lines 106–146 · score 0.77 · classification accuracy, early theta, cross correlation, predicted later, theta power, lags
  6. [6] § Materials and methods › Data analysis › EEG. ↔ tools/fun_otsu_criterion.m, the whole file · a weak match · score 0.71 · empirically determined, sleep spindles, variance, class, median, wavelet
  7. [7] § Materials and methods › Statistical analysis ↔ code/figure_2E.m, lines 88–126 · score 0.70 · RobustOpts, robust linear, memory retention, fitlm, fitting, permutation
  8. [8] § Materials and methods › Statistical analysis ↔ code/figure_2B.m, lines 148–213 · score 0.59 · ft_freqstatistics, FieldTrip, permutation, TFRs, cluster, wake
  9. [9] § Materials and methods › Data analysis › EEG. ↔ code/figure_2B.m, lines 105–142 · score 0.59 · Theta power, 1–4 s, FieldTrip, 3–8 Hz, edge, TFRs
  10. [10] § Materials and methods › Statistical analysis ↔ code/figure_2A.m, lines 96–115 · score 0.57 · ft_timelockstatistics, Cohen, FieldTrip, zero, classification
  11. [11] § Materials and methods › Data analysis › EEG. ↔ tools/fun_detect_artifacts.m, lines 278–402 · score 0.56 · Hjorth parameters, sleep stage, mobility, epochs, activity, channel
  12. [12] § Results › Theta oscillations at learning predict slow oscillation-spindle coupling activity during sleep ↔ code/figure_2E.m, lines 33–56 · score 0.52 · robust linear regression, memory retention, permutation, cluster, coupled
  13. [13] § Results › Theta oscillations at learning predict slow oscillation-spindle coupling activity during sleep ↔ code/figure_2D.m, lines 72–95 · score 0.52 · robust linear regression, theta power, permutation, cluster, coupled
  14. [14] § Results › Theta oscillations at learning predict slow oscillation-spindle coupling activity during sleep ↔ code/figure_2E.m, lines 33–56 · score 0.50 · robust linear regression, memory retention, model, coupled

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 · 166 lines · 4.4 KB · no license · 3 matches

  1. % Denis et al (2026)
  2. % Figure_2E: Correlation between SO-spindle coupling and memory retention
  3. %
  4. % Requires: FieldTrip
  5. clear
  6. rng(11) % Set seed to match manuscript results
  7. %% Load coupling data
  8. start_folder = 'R:\YACL\Projects\memopt\memopt1\analysis\osf';
  9. addpath(fullfile(start_folder, 'auxillary'))
  10. load(fullfile(start_folder, 'data', 'sosp_grouplevel_data.mat'))
  11. % Define channel neighbours (for forming clusters)
  12. cfg = [];
  13. cfg.layout = 'mo1_layout.lay';
  14. layout = ft_prepare_layout(cfg);
  15. cfg = [];
  16. cfg.method = 'triangulation';
  17. cfg.layout = layout;
  18. neighbours = ft_prepare_neighbours(cfg);
  19. chan_neighbours = psg_neighbours(neighbours, layout.label(1:14));
  20. %% Load memory data
  21. memory = readtable(fullfile(start_folder, 'data', 'memory_retention.csv'));
  22. %% Configure test
  23. % Using the approach of Mylonas et al (2020) doi: 10.1038/s41386-020-00833-2
  24. % for fitting complex models (robust linear regression) within a cluster-based
  25. % permutation framework
  26. % Config
  27. cfg = [];
  28. cfg.nperm = 1000;
  29. cfg.p = .05;
  30. cfg.pctile = 95;
  31. cfg.labels = {All_cp{1, 1}.chan};
  32. cfg.neighbours = chan_neighbours;
  33. % Set the DV: which coupling metric do you want to use
  34. cp_metric = 'couplingDensity1';
  35. % Extract coupling data
  36. for i = 1:length(All_cp)
  37. coupling(i, :) = [All_cp{i, 1}.(cp_metric)];
  38. end
  39. % Set the IV: Sleep or wake memory retention?
  40. retention = memory.sleep_retention;
  41. %% RLM at each electrode
  42. for chan_i = 1:length(cfg.labels)
  43. % Make a table
  44. test_table = array2table([coupling(:, chan_i) retention], 'VariableNames', {'Spindles' 'Memory'});
  45. % Fit robust linear model
  46. test_rlm = fitlm(test_table, 'Spindles ~ Memory', 'RobustOpts', 'on');
  47. % Extract statistic
  48. term_names = test_rlm.CoefficientNames{end};
  49. stat(chan_i, :) = test_rlm.Coefficients.tStat(end); % t-values
  50. pval(chan_i, :) = test_rlm.Coefficients.pValue(end); % p-values
  51. end
  52. % Find clusters (uncorrected)
  53. fprintf('Finding clusters...\n')
  54. test_results.stat = stat';
  55. test_results.pval = pval';
  56. test_clusters = findclusters(test_results, cfg);
  57. %% Permutation test
  58. n_sub = length(retention); % Number of participants
  59. %%% Permutation test
  60. fprintf('Shuffling data over %d permutations...\n', cfg.nperm)
  61. % Permute perm times
  62. for perm = 1:cfg.nperm
  63. l = fprintf('Permutation %d of %d\n', perm, cfg.nperm);
  64. % shuffle memory retention across participants
  65. retention_perm = retention(randperm(n_sub), :);
  66. for chan_i = 1:length(cfg.labels)
  67. % Make table to feed model
  68. perm_table = array2table([coupling(:, chan_i) retention_perm], 'VariableNames', {'Spindles' 'Memory'});
  69. % Fit the robust linear model
  70. perm_rlm = fitlm(perm_table, 'Spindles ~ Memory', 'RobustOpts', 'on');
  71. % Extract statistic
  72. term_names = perm_rlm.CoefficientNames{end};
  73. stat_perm(chan_i, :) = perm_rlm.Coefficients.tStat(end); % t-values
  74. pval_perm(chan_i, :) = perm_rlm.Coefficients.pValue(end); % p-values
  75. end
  76. % Find clusters
  77. perm_results.stat = stat_perm';
  78. perm_results.pval = pval_perm';
  79. perm_clusters = findclusters(perm_results, cfg);
  80. statmax_pos(perm, :) = [perm_clusters.pos.cond.statmax]';
  81. statmax_neg(perm, :) = [perm_clusters.neg.cond.statmax]';
  82. fprintf(repmat('\b', 1, l));
  83. end
  84. %% Find significant clusters
  85. % Determine significance of test results against permuted null distribution
  86. [cluster_stat, test_stat] = sigclusters(test_clusters, cfg, statmax_pos, statmax_neg, {'Spindles'});
  87. %% Plot the results
  88. if ~isempty(cluster_stat) & any([cluster_stat.pValue] < .05)
  89. % Find the significant electrodes
  90. cluster_idx = find([cluster_stat.pValue] < .05);
  91. sig_chans = ismember(cfg.labels, cluster_stat(cluster_idx).labels);
  92. % Average coupling activity across electrodes in cluster
  93. cp_cluster = mean(coupling(:, sig_chans), 2);
  94. figure;
  95. subplot(1, 2, 1)
  96. royDanScatter(cp_cluster, retention);
  97. % Topography of significant electrodes
  98. subplot(1, 2, 2)
  99. ft_plot_layout(layout, 'chanindx', sig_chans, 'box', 'no', 'label', 'no', ...
  100. 'point', 'yes', ...
  101. 'pointsymbol', '.', ...
  102. 'pointsize', 20);
  103. axis(gca, 'square')
  104. axis(gca, 'off')
  105. else
  106. warning('No significant clusters found!!')
  107. end

figure_2E.m, no license · at the source

Overview

Authors: Dan Denis1, Zhiyi Chen1,2, Manroop Kaur1, Benjamin Clayden1,3, Thomas Schreiner4, Scott A Cairney1
  1. Department of Psychology, University of York, York, United Kingdom
  2. Department of Psychology and Neuroscience, Baylor University, Waco, Texas, United States of America
  3. Research Department of Early Life Imaging, Centre for the Developing Brain, School of Biomedical Engineering & Imaging Sciences, King’s College London, London, United Kingdom
  4. Department of Psychology, Ludwig-Maximilians-Universität München, München, Germany
Institutions: University of York (United Kingdom); Baylor University (United States); King's College London (United Kingdom); Ludwig-Maximilians-Universität München (Germany)
Journal: PLoS biology, volume 24, issue 8, article e3003938
Dates: received 12 December 2025; accepted 24 July 2026; published online 27 August 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pbio.3003938 · PMID 42658809 · PMCID PMC13521381 · OpenAlex W7162550969
Open access: gold, a free copy (OpenAlex)
Preprint: osf.io/tpwvb
Status: code verified
Categories: EEG (modality), human (organism), cognitive (subfield)
Methods: Spectral & time-frequency, Preprocessing, Connectivity, Statistics, Smoothing, state filtering, decompositions, Machine learning, Evoked potentials, fMRI & imaging, Physiology & signal measures
MeSH: Memory Consolidation*, Memory, Episodic*, Sleep*, Theta Rhythm*, Adult, Brain, Electroencephalography, Female, Humans, Learning, Male, Wakefulness, Young Adult (* major topic)
Topic: Sleep and Wakefulness Research (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Research Council (101169737)
Citations: not cited yet (Europe PMC); 76 references in the paper

Abstract

How does the brain select which experiences to consolidate into long-term memory? Numerous neurobiological frameworks suggest that certain memories are “tagged” at learning for consolidation during later sleep. However, experimental evidence of such a tagging mechanism in the human brain is lacking. Employing multivariate classification of human electroencephalography data, we reliably decoded brain states for episodic memories that are tagged at learning for consolidation across sleep or wakefulness. The tagging of memories for consolidation across sleep (but not wakefulness) was linked to 3–8 Hz theta rhythms during learning. The magnitude of this tagging-related theta response predicted the coupling of slow oscillations to sleep spindles during post-learning sleep (an established neural correlate of sleep-dependent memory processing). In turn, slow oscillation-spindle coupling was associated with better memory performance at the post-sleep test. These findings provide new insights into the neural mechanisms through which our brains determine which information is retained for the future.

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 14 matches between paragraphs and lines of code.

OSF tpwvb

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: MATLAB (11)
Size: 20 files, 11 scripts
Software Heritage: not checked
Found in: “Data Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
11 files

dandenis73/danalyzer

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 68f4e575e5565b6329c4cabbc43ba1fe67408a30, 11 January 2026
Languages: MATLAB (93)
Size: 112 files, 93 scripts
Software Heritage: not archived
Found in: the text, “EEG.”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Signal Processing Toolbox (11 files), EEGLAB (9 files), Statistics and Machine Learning Toolbox (6 files), CircStat (2 files), Wavelet Toolbox (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
95 files

The paper's code and data availability statement is in the Data section.

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:

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

All data and analysis code supporting the findings of this study are publicly available at the Open Science Framework (https://doi.org/10.17605/OSF.IO/TPWVB).

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

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 13 MeSH terms, 1 funder, 73 references, 5 RRIDs.

Cite

This paper

Denis, D., Chen, Z., Kaur, M., Clayden, B., Schreiner, T., & Cairney, S. A. (2026). Theta oscillations tag episodic memories for sleep-dependent consolidation. PLoS biology, 24(8), e3003938. https://doi.org/10.1371/journal.pbio.3003938

BibTeX

@article{denis2026theta,
author = {Denis, Dan and Chen, Zhiyi and Kaur, Manroop and Clayden, Benjamin and Schreiner, Thomas and Cairney, Scott A},
title = {{Theta oscillations tag episodic memories for sleep-dependent consolidation}},
journal = {PLoS biology},
year = {2026},
month = aug,
volume = {24},
number = {8},
pages = {e3003938},
publisher = {PLOS},
issn = {1544-9173},
doi = {10.1371/journal.pbio.3003938},
url = {https://doi.org/10.1371/journal.pbio.3003938},
pmid = {42658809},
pmcid = {PMC13521381}
}

RIS

TY - JOUR
AU - Denis, Dan
AU - Chen, Zhiyi
AU - Kaur, Manroop
AU - Clayden, Benjamin
AU - Schreiner, Thomas
AU - Cairney, Scott A
TI - Theta oscillations tag episodic memories for sleep-dependent consolidation
T2 - PLoS biology
J2 - PLoS Biol
PY - 2026
DA - 2026/08/27
VL - 24
IS - 8
SP - e3003938
SN - 1544-9173
PB - PLOS
DO - 10.1371/journal.pbio.3003938
UR - https://doi.org/10.1371/journal.pbio.3003938
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pbio.3003938",
"type": "article-journal",
"title": "Theta oscillations tag episodic memories for sleep-dependent consolidation",
"container-title": "PLoS biology",
"author": [
{
"family": "Denis",
"given": "Dan"
},
{
"family": "Chen",
"given": "Zhiyi"
},
{
"family": "Kaur",
"given": "Manroop"
},
{
"family": "Clayden",
"given": "Benjamin"
},
{
"family": "Schreiner",
"given": "Thomas"
},
{
"family": "Cairney",
"given": "Scott A"
}
],
"container-title-short": "PLoS Biol",
"volume": "24",
"issue": "8",
"page": "e3003938",
"DOI": "10.1371/journal.pbio.3003938",
"PMID": "42658809",
"PMCID": "PMC13521381",
"ISSN": "1544-9173",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pbio.3003938",
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
27
]
]
}
}

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.1038/s41593-026-02357-2 [code]
Experience reorganizes content-specific memory traces in macaques.
Journal: Nature neuroscience
In common: fdr_bh (Benjamini-Hochberg FDR), CircStat, EEGLAB, 4 other tools, 3 references
[2] doi:10.7554/elife.110795 [code]
REM sleep prefrontal high-frequency oscillation chains mediate distinct cortical - hippocampal reactivation patterns compared to NREM sleep.
Journal: eLife
In common: CircStat, shadedErrorBar, EEGLAB, 4 other tools, 3 references
[3] doi:10.1016/j.isci.2026.116601 [code]
Random auditory stimulation during sleep disturbs traveling slow waves and declarative memory.
Journal: iScience
In common: CircStat, FieldTrip, Signal Processing Toolbox, 1 other tool, cognitive, 6 references
[4] doi:10.1162/imag.a.1229 [code]
40 Hz audiovisual stimulation improves sustained attention and related brain oscillations.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Wavelet Toolbox, fdr_bh (Benjamini-Hochberg FDR), CircStat, 5 other tools, EEG
[5] doi:10.7554/elife.108023 [code]
Challenges in replay detection by TDLM in post-encoding resting state.
Journal: eLife
In common: shadedErrorBar, Statistics and Machine Learning Toolbox, 7 references
[6] doi:10.1038/s41467-026-75345-6 [code]
Hippocampal ripples initiate cortical dimensionality expansion for memory retrieval.
Journal: Nature communications
In common: FieldTrip, Image Processing Toolbox, Signal Processing Toolbox, 1 other tool, EEG, cognitive, 5 references
[7] doi:10.1371/journal.pbio.3003740 [code]
Sleep strengthens successor representations of learned sequences in humans.
Journal: PLoS biology
In common: CircStat, FieldTrip, Statistics and Machine Learning Toolbox, EEG, cognitive, 5 references
[8] doi:10.1038/s42003-025-08618-3 [code]
Physical activity simultaneously improves working memory and ripple-spindle coupling
Journal: n/a
In common: CircStat, shadedErrorBar, EEGLAB, 1 other tool, EEG, cognitive, 3 references
[9] doi:10.1038/s41598-026-49900-6 [code]
Global neural oscillations underlie performance variability and attentional state fluctuations in humans.
Journal: Scientific reports
In common: Wavelet Toolbox, CircStat, EEGLAB, 4 other tools, cognitive
[10] doi:10.1162/imag.a.1199 [code]
Sustained alpha oscillations serve attentional prioritization in working memory, not maintenance.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: CircStat, EEGLAB, FieldTrip, 3 other tools, EEG, cognitive, 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.