OSCR

A week in the life of the human brain reveals stable states punctuated by chaotic-like transitions.

Code ↔ Paper

8 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 8 matches
  1. [1] § Methods › Seizure network removal ↔ PCA_SeizureNetwork_Removal.m, lines 1–122 · score 0.81 · seizure network, seizure related areas, electrodes part, principal component, PCA, removal
  2. [2] § Methods › Robust principal components analysis ↔ RandomConsensus_PCA.m, lines 1–34 · score 0.59 · consensus PCA, RANSAC PCA, covary, bands, network
  3. [3] § Methods › Robust principal components analysis ↔ PCA_SeizureNetwork_Removal.m, lines 1–122 · score 0.59 · seizure network, RANSAC PCA, components, bands
  4. [4] § Methods › Intracranial EEG data collection ↔ FilterElectrodes.py, lines 18–116 · score 0.58 · bandpass filter, 115 Hz, EEG, 0.2 Hz, Electrodes
  5. [5] § Results › Functional parcels showed consistent fluctuations over days that could be linked to behavior and physiology with consistent anatomic trends governing their dynamics ↔ PCA_SeizureNetwork_Removal.m, lines 145–201 · score 0.52 · seizure onset zones, gamma, theta, beta, alpha, 30 Hz
  6. [6] § Results › Sleep deprivation affects both the stable and chaotic components of neural kinematics ↔ Fig6_Generation.m, lines 436–489 · score 0.51 · outwardly oriented, wakeful rest, Center manifold, baseline, Figure 6, sleep
  7. [7] § Methods › Neurocognitive states form an hourglass-like shape with a center manifold that separates stages of consciousness (Fig. 5) ↔ Fig5_Generation.m, lines 356–386 · score 0.51 · center manifold, N1, N2, N3, REM, sleep
  8. [8] § Results › Brain network transitions were circuitous, unpredictable, and chaotic ↔ Fig3_Generation.m, lines 469–499 · score 0.51 · error bounds, late behavioral, ratio, 0–1, displacement, chaos

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 · 201 lines · 6 KB · no license · 3 matches

  1. % Compare principal components to seizure networks
  2. % Created on 20210811 by Max B Wang
  3. % LIST OF SUBJECT IDs TO PROCESS
  4. subjList={'EP1155','EP1156'};
  5. snetSimilarity=cell(length(subjList),1);
  6. simCutoff=zeros(length(subjList),1);
  7. for sInd=1:length(subjList)
  8. disp(sInd)
  9. subjID=subjList{sInd};
  10. featClass=2;
  11. bandSelector=1;
  12. useFixed=1;
  13. aCorr=3;
  14. if aCorr==1
  15. append='';
  16. elseif aCorr==2
  17. append='_ECorr';
  18. elseif aCorr==3
  19. append='_Fixed_SACorr_Mean';
  20. end
  21. ECOG_Dir='/media/mwang/easystore/Processed_Data/';
  22. bandNames={'Theta','Alpha','Beta_l','Beta_u','Gamma'};
  23. figurePath=[ECOG_Dir subjID '/'];
  24. % Load in a variable universalElectrodes which has a list of all electrodes part of the patient's seizure related areas that you want to remove
  25. electrodeName_Data=load([figurePath 'electrodeIndexing.mat']);
  26. universalElectrodes=cellstr(electrodeName_Data.universalElectrodes);
  27. PCA_Data=load([figurePath 'RANSAC_PCA' append '.mat'],'useScores','useCoefs','feature_coefs','mu');
  28. useCoefs=PCA_Data.useCoefs;
  29. %
  30. % FOR EACH SUBJECT, LABEL ALL ELECTRODES BELONGING TO THE SEIZURE NETWORK
  31. if strcmp(subjID,'EP1155')
  32. snet={'LAMY4','LAMY5','LAMY6','LAMY7','LHH1','LHH2','RHH1','RHH2','RAMY1','RAMY2'};
  33. elseif strcmp(subjID,'EP1156')
  34. snet={'LHH1','LHH2','LHH3','LHT1','LHT2','LBT1'};
  35. end
  36. [~,ia,~] = intersect(universalElectrodes,snet);
  37. snetVec=zeros(length(universalElectrodes),1);
  38. snetVec(ia)=1;
  39. snetVec=snetVec/sqrt(snetVec.'*snetVec);
  40. % Store diagonals of feature coefs
  41. numBands=5;
  42. numElectrodes=size(VAR_Data.feature_coefs,3);
  43. numFeats=size(VAR_Data.feature_coefs,1);
  44. diag_coefs=zeros(numBands,numFeats,numElectrodes);
  45. for bInd=1:5
  46. for fInd=1:numFeats
  47. diag_coefs(bInd,fInd,:)=diag(squeeze(VAR_Data.feature_coefs(fInd,bInd,:,:)));
  48. end
  49. end
  50. numPCs=size(useCoefs,2);
  51. snetSims=zeros(numPCs,1);
  52. for plotInd=1:numPCs
  53. plot_Feat_Coefs=useCoefs(:,plotInd);
  54. if sum(plot_Feat_Coefs)<0
  55. plot_Feat_Coefs=-1*plot_Feat_Coefs;
  56. end
  57. bandMat=zeros(numElectrodes,5);
  58. for bInd=1:5
  59. bandMat(:,bInd)=(plot_Feat_Coefs.'*squeeze(diag_coefs(bInd,:,:))).';
  60. end
  61. pcaVec=mean(abs(bandMat),2);
  62. pcaVec=pcaVec./sqrt(pcaVec.'*pcaVec);
  63. snetSims(plotInd,1)=abs(snetVec.'*pcaVec);
  64. end
  65. % Permutation testing to assess significance
  66. numTrials=1000;
  67. maxSims=zeros(numTrials,1);
  68. for tInd=1:numTrials
  69. randBandSims=zeros(numPCs,1);
  70. for plotInd=1:numPCs
  71. coefsVec=rand(numFeats,1);
  72. randMat=zeros(numElectrodes,5);
  73. for bInd=1:5
  74. randMat(:,bInd)=(coefsVec.'*squeeze(diag_coefs(bInd,:,:))).';
  75. end
  76. randVec=mean(abs(randMat),2);
  77. randVec=randVec./sqrt(randVec.'*randVec);
  78. randBandSims(plotInd)=abs(snetVec.'*randVec);
  79. end
  80. maxSims(tInd)=max(randBandSims);
  81. end
  82. subplot(5,4,sInd)
  83. plot(snetSims,'-o','LineWidth',2); hold on
  84. plot([1 numPCs],[quantile(maxSims,0.95) quantile(maxSims,0.95)],'r','LineWidth',2)
  85. xlabel('Component')
  86. ylabel('Similarity')
  87. set(gca,'FontSize',15)
  88. title(subjID,'FontSize',20)
  89. snetSimilarity{sInd}=snetSims;
  90. simCutoff(sInd)=quantile(maxSims,0.95);
  91. end
  92. set(gcf,'color','w');
  93. % save('Data/20220421_SozSimilarity.mat','subjList','snetSimilarity','simCutoff')
  94. %%
  95. load('Data/20220421_SozSimilarity.mat','subjList','snetSimilarity','simCutoff')
  96. % figure('units','normalized','outerposition',[0 0 1 1])
  97. for sInd=1:length(subjList)
  98. snetSims=snetSimilarity{sInd};
  99. plotCutoff=simCutoff(sInd);
  100. numPCs=length(snetSims);
  101. subplot(5,4,sInd)
  102. plot(snetSims,'-o','LineWidth',2); hold on
  103. plot([1 numPCs],[plotCutoff plotCutoff],'r','LineWidth',2)
  104. xlabel('Subnetwork')
  105. ylabel('Similarity')
  106. set(gca,'FontSize',11)
  107. title(subjList{sInd},'FontSize',13)
  108. end
  109. set(gcf,'color','w');
  110. % orient(gcf,'landscape')
  111. % print('/home/mwang/SevenDayFigures/SOZ_Similarity','-dpdf','-fillpage')
  112. %%
  113. load('Data/20220421_SozSimilarity.mat','subjList','snetSimilarity','simCutoff')
  114. for sInd=1:length(subjList)
  115. disp(sInd)
  116. % subplot(5,4,sInd)
  117. % plot(snetSimilarity{sInd},'-o','LineWidth',2); hold on
  118. % plot([1 length(snetSimilarity{sInd})],[simCutoff(sInd) simCutoff(sInd)],'r','LineWidth',2)
  119. % xlabel('Component')
  120. % ylabel('Similarity')
  121. % set(gca,'FontSize',15)
  122. % % title(['Eigenmode Similarity to Seizure Onset Zone: ' subjID],'FontSize',30)
  123. % title(subjList{sInd},'FontSize',20)
  124. subjID=subjList{sInd};
  125. featClass=2;
  126. bandSelector=1;
  127. useFixed=1;
  128. aCorr=3;
  129. if aCorr==1
  130. append='';
  131. elseif aCorr==2
  132. append='_ECorr';
  133. elseif aCorr==3
  134. append='_Fixed_SACorr_Mean';
  135. end
  136. ECOG_Dir='/media/mwang/easystore/Processed_Data/';
  137. bandNames={'Theta','Alpha','Beta_l','Beta_u','Gamma'};
  138. figurePath=[ECOG_Dir subjID '/'];
  139. PCA_Data=load([figurePath 'RANSAC_PCA' append '_Trimmed.mat'],'trimScores','useCoefs','mu','feature_coefs','allScores','allCoefs','allMu');
  140. OG_PC_Data=load([figurePath 'RANSAC_PCA' append '.mat'],'feature_coefs');
  141. % allScores=PCA_Data.trimScores;
  142. % allCoefs=PCA_Data.useCoefs;
  143. % allMu=PCA_Data.mu;
  144. allScores=PCA_Data.allScores;
  145. allCoefs=PCA_Data.allCoefs;
  146. allMu=PCA_Data.allMu;
  147. if ~isnan(simCutoff(sInd))
  148. passCoefs=snetSimilarity{sInd}<simCutoff(sInd);
  149. else
  150. passCoefs=true(size(allScores,2),1);
  151. end
  152. trimScores=allScores(:,passCoefs);
  153. useCoefs=allCoefs(:,passCoefs);
  154. mu=allMu(passCoefs);
  155. feature_coefs=OG_PC_Data.feature_coefs;
  156. save([figurePath 'RANSAC_PCA' append '_Trimmed.mat'],'trimScores',...
  157. 'useCoefs','feature_coefs','mu','allScores','allCoefs','allMu');
  158. end
  159. % set(gcf,'color','w');

PCA_SeizureNetwork_Removal.m at commit 8e95b3c, no license · at the source

Overview

Authors: Maxwell B. Wang1,2,3,4,5, Max G’Sell2,6, James F. Castellano7, R. Mark Richardson3,8,9, Avniel Singh Ghuman1,3,5
  1. Neuroscience Institute, Carnegie Mellon University,Pittsburgh, PA USA
  2. Machine Learning Department, Carnegie Mellon University,Pittsburgh, PA USA
  3. Department of Neurological Surgery, University of Pittsburgh,Pittsburgh, PA USA
  4. Department of Neurological Surgery, University of California San Francisco,San Francisco, CA USA
  5. Center for the Neural Basis of Cognition, University of Pittsburgh and Carnegie Mellon University,Pittsburgh, PA USA
  6. Department of Statistics and Data Science, Carnegie Mellon University,Pittsburgh, PA USA
  7. Department of Neurology, University of Pittsburgh,Pittsburgh, PA USA
  8. Department of Neurosurgery, Massachusetts General Hospital,Boston, MA USA
  9. Harvard Medical School,Boston, MA USA
Institutions: Carnegie Mellon University (United States); University of Pittsburgh (United States); University of California, San Francisco (United States); Massachusetts General Hospital (United States); Harvard University (United States)
Journal: Nature communications, volume 17, issue 1, article 7215
Dates: received 1 May 2025; accepted 29 April 2026; published online 5 June 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41467-026-73347-y · PMID 42248858 · PMCID PMC13396633 · OpenAlex W7163674960
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: computational modeling (no new data) (modality), human (organism), computational (subfield)
Methods: Spectral & time-frequency, Preprocessing, Statistics, Smoothing, state filtering, decompositions, Machine learning, Connectivity, Graphs, Physiology & signal measures
Keywords: Cognitive neuroscience, Dynamical systems
MeSH: Brain*, Adult, Algorithms, Circadian Rhythm, Female, Heart Rate, Humans, Male, Nonlinear Dynamics, Sleep, Sleep Deprivation, Young Adult (* major topic)
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 80 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.

Repositories

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

MNobodyWang/WeekLongBrain

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 8e95b3c9d8628e036a150169d00b931aafcc8646, 3 March 2026
Languages: Python (18), MATLAB (11), Shell (4), Jupyter (1)
Size: 38 files, 34 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, environment (environment.yml), 1 notebook
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: NumPy (19 files), SciPy (17 files), Matplotlib (14 files), scikit-learn (10 files), Statistics and Machine Learning Toolbox (6 files), MNE-Python (6 files), h5py (5 files), Keras (5 files), TensorFlow (5 files), fdr_bh (Benjamini-Hochberg FDR) (2 files), statsmodels (2 files), igraph (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
35 files

Zenodo 18718538

License: CC-BY-4.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (19 files), SciPy (17 files), Matplotlib (14 files), scikit-learn (10 files), Statistics and Machine Learning Toolbox (6 files), MNE-Python (6 files), h5py (5 files), Keras (5 files), TensorFlow (5 files), fdr_bh (Benjamini-Hochberg FDR) (2 files), statsmodels (2 files), igraph (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
35 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:

Read it in the paper: doi.org/10.1038/s41467-026-73347-y.

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

Code and data availability statement

The paper has a code and 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-73347-y.

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, 5 authors, 2 keywords, 12 MeSH terms, 2 funders, 69 references.

Cite

This paper

Wang, M. B., G’Sell, M., Castellano, J. F., Richardson, R. M., & Ghuman, A. S. (2026). A week in the life of the human brain reveals stable states punctuated by chaotic-like transitions. Nature communications, 17(1), 7215. https://doi.org/10.1038/s41467-026-73347-y

BibTeX

@article{wang2026week,
author = {Wang, Maxwell B. and G’Sell, Max and Castellano, James F. and Richardson, R. Mark and Ghuman, Avniel Singh},
title = {{A week in the life of the human brain reveals stable states punctuated by chaotic-like transitions}},
journal = {Nature communications},
year = {2026},
month = jun,
volume = {17},
number = {1},
pages = {7215},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/s41467-026-73347-y},
url = {https://doi.org/10.1038/s41467-026-73347-y},
pmid = {42248858},
pmcid = {PMC13396633}
}

RIS

TY - JOUR
AU - Wang, Maxwell B.
AU - G’Sell, Max
AU - Castellano, James F.
AU - Richardson, R. Mark
AU - Ghuman, Avniel Singh
TI - A week in the life of the human brain reveals stable states punctuated by chaotic-like transitions
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/06/05
VL - 17
IS - 1
SP - 7215
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/s41467-026-73347-y
UR - https://doi.org/10.1038/s41467-026-73347-y
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41467-026-73347-y",
"type": "article-journal",
"title": "A week in the life of the human brain reveals stable states punctuated by chaotic-like transitions",
"container-title": "Nature communications",
"author": [
{
"family": "Wang",
"given": "Maxwell B."
},
{
"family": "G’Sell",
"given": "Max"
},
{
"family": "Castellano",
"given": "James F."
},
{
"family": "Richardson",
"given": "R. Mark"
},
{
"family": "Ghuman",
"given": "Avniel Singh"
}
],
"container-title-short": "Nat Commun",
"volume": "17",
"issue": "1",
"page": "7215",
"DOI": "10.1038/s41467-026-73347-y",
"PMID": "42248858",
"PMCID": "PMC13396633",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41467-026-73347-y",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
5
]
]
}
}

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/s41467-026-74466-2 [code]
Neuromorphic hierarchical modular reservoirs.
Journal: Nature communications
In common: statsmodels, scikit-learn, SciPy, 2 other tools, computational, 6 references
[2] doi:10.1038/s41467-026-75959-w [code]
Charting higher-order models of brain function beyond pairwise interactions.
Journal: Nature communications
In common: fdr_bh (Benjamini-Hochberg FDR), h5py, statsmodels, 5 other tools, 2 references
[3] doi:10.1038/s41467-026-75455-1 [code]
Shared latent representations of speech production for cross-patient speech decoding.
Journal: Nature communications
In common: Keras, TensorFlow, h5py, 6 other tools, 1 reference
[4] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: Keras, igraph, TensorFlow, 6 other tools
[5] doi:10.1002/advs.202523009 [code]
Personalized Network-Guided Neuromodulation Enhances Human Working Memory.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: TensorFlow, statsmodels, Statistics and Machine Learning Toolbox, 4 other tools, 3 references
[6] doi:10.1038/s41467-026-71151-2 [code]
Common and distinct neural correlates of social interaction processing and theory of mind in narratives.
Journal: Nature communications
In common: fdr_bh (Benjamini-Hochberg FDR), statsmodels, Statistics and Machine Learning Toolbox, 4 other tools, 2 references
[7] doi:10.1093/cercor/bhag077 [code]
The longitudinal development of intrinsic timescales in infancy and their relation to alpha brain rhythm.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: MNE-Python, statsmodels, scikit-learn, 3 other tools, 3 references
[8] doi:10.7554/elife.106081 [code]
Heritability of movie-evoked brain activity and connectivity.
Journal: eLife
In common: fdr_bh (Benjamini-Hochberg FDR), h5py, statsmodels, 3 other tools, 2 references
[9] doi:10.1038/s41593-026-02376-z [code]
A framework for comparative analysis of human and mouse cortical neuron dendrites in corresponding brain regions.
Journal: Nature neuroscience
In common: Keras, h5py, statsmodels, 5 other tools, 1 reference
[10] doi:10.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: Keras, igraph, TensorFlow, 5 other tools

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.