OSCR

A likelihood-based method for identifying replay from spike sequences.

Code ↔ Paper

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

3 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 3 matches
  1. [1] § Methods › Neuronal simulation ↔ 1/figure1.m, lines 1 to 12 · score 0.70 · random walk, peak firing, place field, track, firing rate, simulated · block oscr:b:7EA2KEYWA4P5R-N · Report a mismatch
  2. [2] § Results › Validation with mouse calcium imaging ↔ 3/figure3.m, lines 91 to 163 · score 0.57 · filled bar, replay active, place cells, CCW, Scatter, Lseq · block oscr:b:04DJ5DRCZEW03-U · Report a mismatch
  3. [3] § Methods › Neuronal simulation ↔ 1/Simulation_f1.m, lines 14 to 34 · score 0.52 · generated spike, place field, Poisson, firing rate, simulated, position · block oscr:b:MDE0XYB48PQFS-0 · 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 · 141 lines · 5.4 KB · CC-BY-4.0 · 1 match

  1. %% Basic simulation parameters
  2. n_ne = 100; % Number of neurons
  3. c_L_path = 1000; % Track length (mm, 1000 mm = 1 m)
  4. c_dL_dir = 0.1; % Directed motion step size (mm per ms)
  5. c_fr0 = 1; % Baseline (spontaneous) firing rate (Hz)
  6. n_step = 2 * c_L_path / c_dL_dir; % Maximum steps
  7. x_pf0 = ((1:n_ne)' - 0.5) * c_L_path / n_ne; % regular place fields
  8. n_tr = 20; % Number of trials
  9. c_dL_rw = 1; % Random walk step size (mm/ms)
  10. c_fr_max = 9.99; % Peak firing rate (Hz)
  11. c_std_pf = 100; % Place field width
  12. c_coeff_pf = (c_fr_max - c_fr0) / normpdf(0,0,c_std_pf); % for normalization (peak-pf=1)
  13. %% Generate trajectories and Compute firing rates and generate spikes
  14. % rng(218);
  15. Simulation_f1;
  16. %% Ordered probability matrix (Pairwise temporal ordering)
  17. Make_pMat_f1;
  18. %% Place field rate map
  19. Make_PF_f1;
  20. %% Replay candidate generation
  21. Find_candidate_f1;
  22. %% Replay estimatimation using ordered probability matrix
  23. Estimate_replay_pMat_f1;
  24. %% Replay estimation using place field (Bayesian decoding)
  25. Estimate_replay_PF_f1;
  26. %% Figures
  27. % Raster plot of example spike trains
  28. subplot(3,4,1); hold on;
  29. sp_tr = y2_sp(1,:); % first trial
  30. trange = [0 length(y_pos{1})];
  31. no_sp_tr = length(sp_tr);
  32. for i_sp_tr = 1:no_sp_tr
  33. no_sp = length(sp_tr{i_sp_tr});
  34. for i_sp = 1:no_sp
  35. plot([sp_tr{i_sp_tr}(i_sp), sp_tr{i_sp_tr}(i_sp)], [i_sp_tr-0.4, i_sp_tr+0.4], 'k');
  36. end
  37. end
  38. hold off;
  39. ylim([0 no_sp_tr+1]); xlim(trange);
  40. xticks([0 8000]); yticks([0 100]); xticklabels({'0','8'});
  41. xlabel('Time (s)'); ylabel('Neuron #');
  42. text(-0.45, 1.15, 'A', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  43. set(gca,'FontName','Helvetica','TickDir','out','box','off');
  44. % example replay candidate
  45. subplot(3,4,2);
  46. plot(x2_sync_e(1,:), x2_sync_e(2,:), 'ko','MarkerFaceColor','k','MarkerSize',3);
  47. axis([0 210 0 100]);
  48. xlabel('Time (s)'); ylabel('Neuron #');
  49. xticks([0 100 200]); xticklabels({'0','0.1','0.2'}); yticks([0 40 80]);
  50. text(-0.45, 1.15, 'B', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  51. set(gca,'FontName','Helvetica','TickDir','out','box','off');
  52. % rate map
  53. subplot(3,4,5);
  54. imagesc(x2_rate_map);
  55. ax = gca; ax.YDir = 'normal';
  56. ylabel('Position (m)'); xlabel('Neuron #');
  57. xticks([50 100]); yticks([1 50 100]);
  58. yticklabels({'0','0.5','1'});
  59. text(-0.45, 1.15, 'C', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  60. set(gca,'FontName','Helvetica','TickDir','out');
  61. % decoded rate map from relay candidate
  62. subplot(3,4,6);
  63. imagesc(x2_p_sp_bin0,[0,0.03]);
  64. ax = gca; ax.YDir = 'normal';
  65. xlabel('Time (s)'); ylabel('Position (m)');
  66. xticks([1,5,10]); xticklabels({'0','0.1','0.2'});
  67. yticks([1 50 100]); yticklabels({'0','0.5','1'});
  68. text(-0.45, 1.15, 'D', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  69. set(gca,'FontName','Helvetica','TickDir','out');
  70. % Distribution of weighted corr.
  71. subplot(3,4,7); hold on;
  72. h1 = histogram(x_w_corr_sh,100);
  73. h1.Normalization = 'probability';
  74. h1.FaceColor = 'w'; h1.EdgeColor = 'k';
  75. plot([0,0],[0,0.0399],'k:');
  76. plot(x_w_corr*[1,1],[0,0.0399],'r-'); hold off;
  77. xlabel('W_{corr}'); ylabel('Fraction');
  78. xticks(-0.5:0.5:0.5);
  79. axis([-0.55,0.55,0,0.04]);
  80. text(-0.45, 1.15, 'E', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  81. set(gca,'FontName','Helvetica','TickDir','out','box','off');
  82. % ordered probability matrix
  83. subplot(3,4,9);
  84. imagesc(x2_pMat_glm);
  85. ax = gca; ax.YDir = 'normal';
  86. xlabel('Neuron #'); ylabel('Neuron #');
  87. xticks([50 100]); yticks([50 100]);
  88. text(-0.45, 1.15, 'F', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  89. set(gca,'FontName','Helvetica','TickDir','out');
  90. % order probability matrix of replay candidate
  91. subplot(3,4,10);
  92. x2_pMat_replay = zeros(size(x2_sync_e,2));
  93. for i_ne = 1:size(x2_sync_e,2)
  94. for j_ne = 1:size(x2_sync_e,2)
  95. x2_pMat_replay(i_ne,j_ne) = x2_p(x2_sync_e(2,i_ne),x2_sync_e(2,j_ne));
  96. end
  97. end
  98. imagesc(x2_pMat_replay); axis xy;
  99. xlabel('Neuron #'); ylabel('Neuron #');
  100. xticks([5,10]); yticks([5,10]);
  101. text(-0.45, 1.15, 'G', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  102. set(gca,'FontName','Helvetica','TickDir','out');
  103. % Distribution of sequence likelihood
  104. subplot(3,4,11); hold on;
  105. h1 = histogram(x_p_replay_sh,100);
  106. h1.Normalization = 'probability';
  107. h1.FaceColor = 'w'; h1.EdgeColor = 'k';
  108. plot([0,0],[0,0.0399],'k:');
  109. plot(x_p_replay*[1,1],[0,0.0399],'r-'); hold off;
  110. xlabel('L_{seq}'); ylabel('Fraction');
  111. xticks(-50:50:50); axis([-55,55,0,0.04]);
  112. text(-0.45, 1.15, 'H', 'Units','normalized', 'FontWeight','bold','FontSize',12);
  113. set(gca,'FontName','Helvetica','TickDir','out','box','off');
  114. % relationship between weighted corr. and sequence likelihood
  115. load('result_w_Lseq.mat'); % contains: result_w_Lseq (100 simulated results)
  116. subplot(3,4,12); hold on;
  117. x2_scat = result_w_Lseq;
  118. plot(x2_scat(:,1), x2_scat(:,2), 'k.'); % Scatter plot
  119. [b,d,st] = glmfit(x2_scat(:,1), x2_scat(:,2)); % Linear fit (GLM)
  120. plot([-1,1],[b(1)-b(2), b(1)+b(2)], 'k-'); % Plot regression line
  121. plot([0 0],[-20 100],'k:'); plot([-0.3 1],[0 0],'k:'); hold off;
  122. axis([-0.29 0.89 -19 99]);
  123. xlabel('W_{corr}'); ylabel('L_{seq}');
  124. xticks(-0.4:0.4:1); yticks(0:60:100);
  125. text(-0.45, 1.15, 'I', 'Unit','normalized', 'FontWeight','bold','FontSize',12);
  126. set(gca,'FontName','Helvetica','TickDir','out','box','off');

figure1.m, under CC-BY-4.0 · at the source

Overview

Authors: Namjung Huh1, Injae Yun1,2, Jong Won Lee1, Min Whan Jung1,2
  1. Center for Synaptic Brain Dysfunctions, Institute for Basic Science,Daejeon, Korea
  2. Department of Biological Sciences, Korea Advanced Institute of Science and Technology,Daejeon, Korea
Journal: Nature communications, volume 17, issue 1, article 8304
Dates: received 17 September 2025; accepted 12 June 2026; published online 4 July 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-74822-2 · PMID 42401577 · PMCID PMC13469133 · OpenAlex W7167366658
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: mouse (organism), rat (organism), systems (subfield)
Methods: Connectivity, Statistics, Preprocessing, Machine learning, fMRI & imaging, Single-unit activity, calcium imaging, Spectral & time-frequency, Physiology & signal measures, Smoothing, state filtering, decompositions
Keywords: Hippocampus, Cortex
MeSH: Action Potentials*, Hippocampus*, Animals, Likelihood Functions, Male, Mice, Models, Neurological, Neurons, Rats, Visual Cortex (* major topic)
Topic: Memory and Neural Mechanisms (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: This work was supported by the Research Center Program of the Institute for Basic Science (IBSR002-A1; M.W.J.)
Citations: not cited yet (Europe PMC); 46 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

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

figshare 31942599

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 2 files
Software Heritage: not checked
Found in: “Code availability”
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 (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
14 files
At the source:

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • it points to the authors' code: figshare 31942599

Read it in the paper: doi.org/10.1038/s41467-026-74822-2.

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;
  • 14 scripts, each with its path and the digest of its content;
  • 3 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 statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41467-026-74822-2.

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, 4 authors, 2 keywords, 10 MeSH terms, 1 funder, 44 references.

Cite

This paper

Huh, N., Yun, I., Lee, J. W., & Jung, M. W. (2026). A likelihood-based method for identifying replay from spike sequences. Nature communications, 17(1), 8304. https://doi.org/10.1038/s41467-026-74822-2

BibTeX

@article{huh2026likelihood,
author = {Huh, Namjung and Yun, Injae and Lee, Jong Won and Jung, Min Whan},
title = {{A likelihood-based method for identifying replay from spike sequences}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {8304},
publisher = {Nature Portfolio},
issn = {2041-1723},
doi = {10.1038/s41467-026-74822-2},
url = {https://doi.org/10.1038/s41467-026-74822-2},
pmid = {42401577},
pmcid = {PMC13469133}
}

RIS

TY - JOUR
AU - Huh, Namjung
AU - Yun, Injae
AU - Lee, Jong Won
AU - Jung, Min Whan
TI - A likelihood-based method for identifying replay from spike sequences
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/07/04
VL - 17
IS - 1
SP - 8304
SN - 2041-1723
PB - Nature Portfolio
DO - 10.1038/s41467-026-74822-2
UR - https://doi.org/10.1038/s41467-026-74822-2
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-74822-2",
"type": "article-journal",
"title": "A likelihood-based method for identifying replay from spike sequences",
"container-title": "Nature communications",
"author": [
{
"family": "Huh",
"given": "Namjung"
},
{
"family": "Yun",
"given": "Injae"
},
{
"family": "Lee",
"given": "Jong Won"
},
{
"family": "Jung",
"given": "Min Whan"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "8304",
"DOI": "10.1038/s41467-026-74822-2",
"PMID": "42401577",
"PMCID": "PMC13469133",
"ISSN": "2041-1723",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41467-026-74822-2",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
4
]
]
}
}

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.1371/journal.pcbi.1010809 [code]
Mesoscopic description of hippocampal replay and metastability in spiking neural networks with short-term plasticity.
Journal: PLoS computational biology
In common: 13 references
[2] doi:10.7554/elife.99931 [code]
A unifying account of replay as context-driven memory reactivation.
Journal: eLife
In common: 13 references
[3] doi:10.1093/pnasnexus/pgae078 [code]
Hippocampal replay sequence governed by spontaneous brain-wide dynamics.
Journal: PNAS nexus
In common: systems, 12 references
[4] doi:10.1038/s41467-023-40440-5
Backbone spiking sequence as a basis for preplay, replay, and default states in human cortex.
Journal: Nature communications
In common: 12 references
[5] doi:10.1038/s41467-024-51582-5 [code]
Replay-triggered brain-wide activation in humans.
Journal: Nature communications
In common: 12 references
[6] doi:10.1016/j.crmeth.2021.100101 [code]
Uncovering spatial representations from spatiotemporal patterns of rodent hippocampal field potentials.
Journal: Cell reports methods
In common: 11 references
[7] doi:10.1038/s41467-023-43939-z [code]
The role of experience in prioritizing hippocampal replay.
Journal: Nature communications
In common: Statistics and Machine Learning Toolbox, rat, systems, 9 references
[8] doi:10.7554/elife.85635 [code]
Evaluating hippocampal replay without a ground truth.
Journal: eLife
In common: Statistics and Machine Learning Toolbox, rat, 10 references
[9] doi:10.1038/s41586-025-09341-z [code]
Replay and representation dynamics in the hippocampus of freely flying bats.
Journal: Nature
In common: Statistics and Machine Learning Toolbox, systems, 9 references
[10] doi:10.1038/s41593-022-01201-7 [code]
Hippocampal representations of foraging trajectories depend upon spatial context.
Journal: Nature neuroscience
In common: Statistics and Machine Learning Toolbox, 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-74822-2.svg)](https://openscicode.org/badge/doi/10.1038/s41467-026-74822-2)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

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

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-74822-2"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-74822-2.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.