A likelihood-based method for identifying replay from spike sequences.
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] § 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] § 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] § 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
- %% Basic simulation parameters
- n_ne = 100; % Number of neurons
- c_L_path = 1000; % Track length (mm, 1000 mm = 1 m)
- c_dL_dir = 0.1; % Directed motion step size (mm per ms)
- c_fr0 = 1; % Baseline (spontaneous) firing rate (Hz)
- n_step = 2 * c_L_path / c_dL_dir; % Maximum steps
- x_pf0 = ((1:n_ne)' - 0.5) * c_L_path / n_ne; % regular place fields
- n_tr = 20; % Number of trials
- c_dL_rw = 1; % Random walk step size (mm/ms)
- c_fr_max = 9.99; % Peak firing rate (Hz)
- c_std_pf = 100; % Place field width
- c_coeff_pf = (c_fr_max - c_fr0) / normpdf(0,0,c_std_pf); % for normalization (peak-pf=1)
- %% Generate trajectories and Compute firing rates and generate spikes
- % rng(218);
- Simulation_f1;
- %% Ordered probability matrix (Pairwise temporal ordering)
- Make_pMat_f1;
- %% Place field rate map
- Make_PF_f1;
- %% Replay candidate generation
- Find_candidate_f1;
- %% Replay estimatimation using ordered probability matrix
- Estimate_replay_pMat_f1;
- %% Replay estimation using place field (Bayesian decoding)
- Estimate_replay_PF_f1;
- %% Figures
- % Raster plot of example spike trains
- subplot(3,4,1); hold on;
- sp_tr = y2_sp(1,:); % first trial
- trange = [0 length(y_pos{1})];
- no_sp_tr = length(sp_tr);
- for i_sp_tr = 1:no_sp_tr
- no_sp = length(sp_tr{i_sp_tr});
- for i_sp = 1:no_sp
- 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');
- end
- end
- hold off;
- ylim([0 no_sp_tr+1]); xlim(trange);
- xticks([0 8000]); yticks([0 100]); xticklabels({'0','8'});
- xlabel('Time (s)'); ylabel('Neuron #');
- text(-0.45, 1.15, 'A', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out','box','off');
- % example replay candidate
- subplot(3,4,2);
- plot(x2_sync_e(1,:), x2_sync_e(2,:), 'ko','MarkerFaceColor','k','MarkerSize',3);
- axis([0 210 0 100]);
- xlabel('Time (s)'); ylabel('Neuron #');
- xticks([0 100 200]); xticklabels({'0','0.1','0.2'}); yticks([0 40 80]);
- text(-0.45, 1.15, 'B', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out','box','off');
- % rate map
- subplot(3,4,5);
- imagesc(x2_rate_map);
- ax = gca; ax.YDir = 'normal';
- ylabel('Position (m)'); xlabel('Neuron #');
- xticks([50 100]); yticks([1 50 100]);
- yticklabels({'0','0.5','1'});
- text(-0.45, 1.15, 'C', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out');
- % decoded rate map from relay candidate
- subplot(3,4,6);
- imagesc(x2_p_sp_bin0,[0,0.03]);
- ax = gca; ax.YDir = 'normal';
- xlabel('Time (s)'); ylabel('Position (m)');
- xticks([1,5,10]); xticklabels({'0','0.1','0.2'});
- yticks([1 50 100]); yticklabels({'0','0.5','1'});
- text(-0.45, 1.15, 'D', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out');
- % Distribution of weighted corr.
- subplot(3,4,7); hold on;
- h1 = histogram(x_w_corr_sh,100);
- h1.Normalization = 'probability';
- h1.FaceColor = 'w'; h1.EdgeColor = 'k';
- plot([0,0],[0,0.0399],'k:');
- plot(x_w_corr*[1,1],[0,0.0399],'r-'); hold off;
- xlabel('W_{corr}'); ylabel('Fraction');
- xticks(-0.5:0.5:0.5);
- axis([-0.55,0.55,0,0.04]);
- text(-0.45, 1.15, 'E', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out','box','off');
- % ordered probability matrix
- subplot(3,4,9);
- imagesc(x2_pMat_glm);
- ax = gca; ax.YDir = 'normal';
- xlabel('Neuron #'); ylabel('Neuron #');
- xticks([50 100]); yticks([50 100]);
- text(-0.45, 1.15, 'F', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out');
- % order probability matrix of replay candidate
- subplot(3,4,10);
- x2_pMat_replay = zeros(size(x2_sync_e,2));
- for i_ne = 1:size(x2_sync_e,2)
- for j_ne = 1:size(x2_sync_e,2)
- x2_pMat_replay(i_ne,j_ne) = x2_p(x2_sync_e(2,i_ne),x2_sync_e(2,j_ne));
- end
- end
- imagesc(x2_pMat_replay); axis xy;
- xlabel('Neuron #'); ylabel('Neuron #');
- xticks([5,10]); yticks([5,10]);
- text(-0.45, 1.15, 'G', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out');
- % Distribution of sequence likelihood
- subplot(3,4,11); hold on;
- h1 = histogram(x_p_replay_sh,100);
- h1.Normalization = 'probability';
- h1.FaceColor = 'w'; h1.EdgeColor = 'k';
- plot([0,0],[0,0.0399],'k:');
- plot(x_p_replay*[1,1],[0,0.0399],'r-'); hold off;
- xlabel('L_{seq}'); ylabel('Fraction');
- xticks(-50:50:50); axis([-55,55,0,0.04]);
- text(-0.45, 1.15, 'H', 'Units','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out','box','off');
- % relationship between weighted corr. and sequence likelihood
- load('result_w_Lseq.mat'); % contains: result_w_Lseq (100 simulated results)
- subplot(3,4,12); hold on;
- x2_scat = result_w_Lseq;
- plot(x2_scat(:,1), x2_scat(:,2), 'k.'); % Scatter plot
- [b,d,st] = glmfit(x2_scat(:,1), x2_scat(:,2)); % Linear fit (GLM)
- plot([-1,1],[b(1)-b(2), b(1)+b(2)], 'k-'); % Plot regression line
- plot([0 0],[-20 100],'k:'); plot([-0.3 1],[0 0],'k:'); hold off;
- axis([-0.29 0.89 -19 99]);
- xlabel('W_{corr}'); ylabel('L_{seq}');
- xticks(-0.4:0.4:1); yticks(0:60:100);
- text(-0.45, 1.15, 'I', 'Unit','normalized', 'FontWeight','bold','FontSize',12);
- set(gca,'FontName','Helvetica','TickDir','out','box','off');
figure1.m, under CC-BY-4.0 · at the source
Overview
- Center for Synaptic Brain Dysfunctions, Institute for Basic Science,Daejeon, Korea
- Department of Biological Sciences, Korea Advanced Institute of Science and Technology,Daejeon, Korea
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
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
14 files
- 1/
Estimate_replay_PF_f1.m , MATLAB, 106 lines - 1/
Estimate_replay_pMat_f1. , MATLAB, 53 linesm - 1/
Find_candidate_f1.m , MATLAB, 31 lines - 1/
Make_PF_f1.m , MATLAB, 34 lines - 1/
Make_pMat_f1.m , MATLAB, 73 lines - 1/
Simulation_f1.m , MATLAB, 34 lines, 1 match - 1/
figure1.m , MATLAB, 141 lines, 1 match - 2/
figure2.m , MATLAB, 87 lines - 3/
figure3.m , MATLAB, 163 lines, 1 match - 4/
figure4_bcde.m , MATLAB, 91 lines - 4/
figure4_fg.m , MATLAB, 110 lines - 5/
figure5.m , MATLAB, 119 lines - 6/
figure_rearranged.m , MATLAB, 88 lines - 6/
figure_reconfigured.m , MATLAB, 62 lines
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
- allensdk.readthedocs.io, at allensdk.readthedocs.io; found in “Data availability”
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:
- it points to a dataset: allensdk.readthedocs.io
- it says that the data are available on request
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://
BibTeX
@article{huh2026likeliho
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/
url = {https://
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/
VL - 17
IS - 1
SP - 8304
SN - 2041-1723
PB - Nature Portfolio
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"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":
"volume": "17",
"issue": "1",
"page": "8304",
"DOI": "10.1038/
"PMID": "42401577",
"PMCID": "PMC13469133",
"ISSN": "2041-1723",
"publisher": "Nature Portfolio",
"URL": "https://
"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 biologyIn common: 13 references
- [2] doi:10.7554/elife.99931 [code]
- A unifying account of replay as context-driven memory reactivation.Journal: eLifeIn common: 13 references
- [3] doi:10.1093/pnasnexus/pgae078 [code]
- Hippocampal replay sequence governed by spontaneous brain-wide dynamics.Journal: PNAS nexusIn 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 communicationsIn common: 12 references
- [5] doi:10.1038/s41467-024-51582-5 [code]
- Replay-triggered brain-wide activation in humans.Journal: Nature communicationsIn 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 methodsIn common: 11 references
- [7] doi:10.1038/s41467-023-43939-z [code]
- The role of experience in prioritizing hippocampal replay.Journal: Nature communicationsIn 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: eLifeIn 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: NatureIn 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 neuroscienceIn 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 14 scripts, and 3 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:52ba2c5856ebcd99…
Add the badge to the code's README
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 -->
[](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:endHTML
<!-- 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.
