OSCR

Young and old adult brains experience opposite effects of acute sleep restriction on the functional connectivity network.

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 · 3 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Methods › Modularity ↔ community_louvain.m, lines 1–71 · score 0.90 · asymmetric treatment, COMMUNITY_LOUVAIN, resolution parameter, und sign, negative weights, modules
  2. [2] § Methods › Modularity ↔ null_model_und_sign.m, lines 1–73 · score 0.82 · NULL_MODEL_UND_SIGN, strength distributions, preserves weight, negative weights, network, matrices
  3. [3] § Methods › Dynamic functional connectivity ↔ leida-matlab-1.0/utilities/analyses_scripts/cluster_performance.m, the whole file · a weak match · score 0.78 · Calinski Harabasz, Silhouette coefficient, Leading Eigenvector, Dunn, clustering, score
  4. [4] § Methods › Dynamic functional connectivity ↔ leida-matlab-1.0/LEiDA_TransitionsK.m, the whole file · a weak match · score 0.72 · Leading Eigenvector Dynamics, transition probability matrices, LEiDA, chosen, clustering, FC
  5. [5] § Methods › Preprocessing ↔ python_packages/brainvistools/src/brainvistools/visualization.py, lines 73–138 · score 0.61 · Tian atlas, subcortical regions, Library, Schaefer
  6. [6] § Results › Network modularity ↔ community_louvain.m, lines 1–71 · score 0.60 · resolution parameter, modularity increased, Louvain, algorithm, modules, model
  7. [7] § Methods › Partial least squares (PLS) ↔ leida-matlab-1.0/utilities/analyses_scripts/LEiDA_stats_TransitionMatrix.m, lines 1–65 · score 0.53 · transition probability, fractional occupancy, LEiDA, scans, bootstrap, permutation
  8. [8] § Methods › Partial least squares (PLS) ↔ leida-matlab-1.0/LEiDA_TransitionsK.m, the whole file · a weak match · score 0.53 · transition probability, LEiDA, reliable, bootstrap, variables, permutation

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 · 198 lines · 7.6 KB · no license · 2 matches

  1. function [M,Q]=community_louvain(W,gamma,M0,B)
  2. %COMMUNITY_LOUVAIN Optimal community structure
  3. %
  4. % M = community_louvain(W);
  5. % [M,Q] = community_louvain(W,gamma);
  6. % [M,Q] = community_louvain(W,gamma,M0);
  7. % [M,Q] = community_louvain(W,gamma,M0,'potts');
  8. % [M,Q] = community_louvain(W,gamma,M0,'negative_asym');
  9. % [M,Q] = community_louvain(W,[],[],B);
  10. %
  11. % The optimal community structure is a subdivision of the network into
  12. % nonoverlapping groups of nodes which maximizes the number of within-
  13. % group edges, and minimizes the number of between-group edges.
  14. %
  15. % This function is a fast and accurate multi-iterative generalization of
  16. % the Louvain community detection algorithm. This function subsumes and
  17. % improves upon,
  18. % modularity_louvain_und.m, modularity_finetune_und.m,
  19. % modularity_louvain_dir.m, modularity_finetune_dir.m,
  20. % modularity_louvain_und_sign.m
  21. % and additionally allows to optimize other objective functions (includes
  22. % built-in Potts-model Hamiltonian, allows for custom objective-function
  23. % matrices).
  24. %
  25. % Inputs:
  26. % W,
  27. % directed/undirected weighted/binary connection matrix with
  28. % positive and possibly negative weights.
  29. % gamma,
  30. % resolution parameter (optional)
  31. % gamma>1, detects smaller modules
  32. % 0<=gamma<1, detects larger modules
  33. % gamma=1, classic modularity (default)
  34. % M0,
  35. % initial community affiliation vector (optional)
  36. % B,
  37. % objective-function type or custom objective matrix (optional)
  38. % 'modularity', modularity (default)
  39. % 'potts', Potts-model Hamiltonian (for binary networks)
  40. % 'negative_sym', symmetric treatment of negative weights
  41. % 'negative_asym', asymmetric treatment of negative weights
  42. % B, custom objective-function matrix
  43. %
  44. % Note: see Rubinov and Sporns (2011) for a discussion of
  45. % symmetric vs. asymmetric treatment of negative weights.
  46. %
  47. % Outputs:
  48. % M,
  49. % community affiliation vector
  50. % Q,
  51. % optimized community-structure statistic (modularity by default)
  52. %
  53. % Example:
  54. % % Iterative community finetuning.
  55. % % W is the input connection matrix.
  56. % n = size(W,1); % number of nodes
  57. % M = 1:n; % initial community affiliations
  58. % Q0 = -1; Q1 = 0; % initialize modularity values
  59. % while Q1-Q0>1e-5; % while modularity increases
  60. % Q0 = Q1; % perform community detection
  61. % [M, Q1] = community_louvain(W, [], M);
  62. % end
  63. %
  64. % References:
  65. % Blondel et al. (2008) J. Stat. Mech. P10008.
  66. % Reichardt and Bornholdt (2006) Phys. Rev. E 74, 016110.
  67. % Ronhovde and Nussinov (2008) Phys. Rev. E 80, 016109
  68. % Sun et al. (2008) Europhysics Lett 86, 28004.
  69. % Rubinov and Sporns (2011) Neuroimage 56:2068-79.
  70. %
  71. % Mika Rubinov, U Cambridge 2015-2016
  72. % Modification history
  73. % 2015: Original
  74. % 2016: Included generalization for negative weights.
  75. % Enforced binary network input for Potts-model Hamiltonian.
  76. % Streamlined code and expanded documentation.
  77. W=double(W); % convert to double format
  78. n=length(W); % get number of nodes
  79. s=sum(sum(W)); % get sum of edges
  80. if ~exist('B','var') || isempty(B)
  81. type_B = 'modularity';
  82. elseif ischar(B)
  83. type_B = B;
  84. else
  85. type_B = 0;
  86. if exist('gamma','var') && ~isempty(gamma)
  87. warning('Value of gamma is ignored in generalized mode.')
  88. end
  89. end
  90. if ~exist('gamma','var') || isempty(gamma)
  91. gamma = 1;
  92. end
  93. if strcmp(type_B,'negative_sym') || strcmp(type_B,'negative_asym')
  94. W0 = W.*(W>0); %positive weights matrix
  95. s0 = sum(sum(W0)); %weight of positive links
  96. B0 = W0-gamma*(sum(W0,2)*sum(W0,1))/s0; %positive modularity
  97. W1 =-W.*(W<0); %negative weights matrix
  98. s1 = sum(sum(W1)); %weight of negative links
  99. if s1 %negative modularity
  100. B1 = W1-gamma*(sum(W1,2)*sum(W1,1))/s1;
  101. else
  102. B1 = 0;
  103. end
  104. elseif min(min(W))<-1e-10
  105. err_string = [
  106. 'The input connection matrix contains negative weights.\nSpecify ' ...
  107. '''negative_sym'' or ''negative_asym'' objective-function types.'];
  108. error(sprintf(err_string)) %#ok<SPERR>
  109. end
  110. if strcmp(type_B,'potts') && any(any(W ~= logical(W)))
  111. error('Potts-model Hamiltonian requires a binary W.')
  112. end
  113. if type_B
  114. switch type_B
  115. case 'modularity'; B = (W-gamma*(sum(W,2)*sum(W,1))/s)/s;
  116. case 'potts'; B = W-gamma*(~W);
  117. case 'negative_sym'; B = B0/(s0+s1) - B1/(s0+s1);
  118. case 'negative_asym'; B = B0/s0 - B1/(s0+s1);
  119. otherwise; error('Unknown objective function.');
  120. end
  121. else % custom objective function matrix as input
  122. B = double(B);
  123. if ~isequal(size(W),size(B))
  124. error('W and B must have the same size.')
  125. end
  126. end
  127. if ~exist('M0','var') || isempty(M0)
  128. M0=1:n;
  129. elseif numel(M0)~=n
  130. error('M0 must contain n elements.')
  131. end
  132. [~,~,Mb] = unique(M0);
  133. M = Mb;
  134. B = (B+B.')/2; % symmetrize modularity matrix
  135. Hnm=zeros(n,n); % node-to-module degree
  136. for m=1:max(Mb) % loop over modules
  137. Hnm(:,m)=sum(B(:,Mb==m),2);
  138. end
  139. Q0 = -inf;
  140. Q = sum(B(bsxfun(@eq,M0,M0.'))); % compute modularity
  141. first_iteration = true;
  142. while Q-Q0>1e-10
  143. flag = true; % flag for within-hierarchy search
  144. while flag
  145. flag = false;
  146. for u=randperm(n) % loop over all nodes in random order
  147. ma = Mb(u); % current module of u
  148. dQ = Hnm(u,:) - Hnm(u,ma) + B(u,u);
  149. dQ(ma) = 0; % (line above) algorithm condition
  150. [max_dQ,mb] = max(dQ); % maximal increase in modularity and corresponding module
  151. if max_dQ>1e-10 % if maximal increase is positive
  152. flag = true;
  153. Mb(u) = mb; % reassign module
  154. Hnm(:,mb) = Hnm(:,mb)+B(:,u); % change node-to-module strengths
  155. Hnm(:,ma) = Hnm(:,ma)-B(:,u);
  156. end
  157. end
  158. end
  159. [~,~,Mb] = unique(Mb); % new module assignments
  160. M0 = M;
  161. if first_iteration
  162. M=Mb;
  163. first_iteration=false;
  164. else
  165. for u=1:n % loop through initial module assignments
  166. M(M0==u)=Mb(u); % assign new modules
  167. end
  168. end
  169. n=max(Mb); % new number of modules
  170. B1=zeros(n); % new weighted matrix
  171. for u=1:n
  172. for v=u:n
  173. bm=sum(sum(B(Mb==u,Mb==v))); % pool weights of nodes in same module
  174. B1(u,v)=bm;
  175. B1(v,u)=bm;
  176. end
  177. end
  178. B=B1;
  179. Mb=1:n; % initial module assignments
  180. Hnm=B; % node-to-module strength
  181. Q0=Q;
  182. Q=trace(B); % compute modularity
  183. end

community_louvain.m at commit 9ac5ad3, no license · at the source

Overview

  1. Institute for Neuroscience and Neurotechnology, Simon Fraser University, Burnaby, Canada
  2. Centre for Social Sciences, Athabasca University, Athabasca, Canada
  3. Department of Biomedical Physiology and Kinesiology, Simon Fraser University, Burnaby, Canada
  4. Rotman Research Institute, Baycrest Health Sciences, Toronto, Canada
  5. Department of Psychology, Simon Fraser University, Burnaby, Canada
Journal: Imaging neuroscience (Cambridge, Mass.), volume 4, article IMAG.a.1278
Dates: received 25 July 2025; accepted 20 May 2026; published online 18 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/imag.a.1278 · PMID 42326561 · PMCID PMC13281775 · OpenAlex W4412792471
Open access: diamond, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism), healthy (population)
Methods: Spectral & time-frequency, Connectivity, Statistics, Preprocessing, Graphs, Smoothing, state filtering, decompositions
Keywords: resting-state functional magnetic resonance imaging, dynamic functional connectivity, graph theory, healthy ageing, acute sleep restriction
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 87 references in the paper

Abstract

Chronic, long-term sleep loss is detrimental to brain health and cognitive ability. However, older adults are affected differently by acute, short-term loss of sleep than young and middle-aged adults. Older adults are more resilient to the effects of acute sleep loss and, depending on the cognitive domain, may be completely unaffected while younger adults suffer. To elucidate the brain network responses to sleep loss underlying these cognitive differences between age groups, we investigated the static and dynamic functional connectivity effects of acute sleep restriction (sleep limited to 3 hours) and how these effects differ between younger adults (20–30 years) and older adults (65–75 years). We found a functional connectivity subnetwork that was primarily strengthened in younger adults after acute sleep restriction but weakened in older adults after acute sleep restriction. Similar crossover interactions were consistently observed in further analyses of functional connectivity degree, modularity, and dynamic functional connectivity state fractional occupancy. Our findings demonstrate that the effect of acute sleep restriction on older adults is fundamentally different from that on younger adults. These results most strongly support the compensation theory of ageing, which predicts a fundamental shift in the effects of acute sleep loss, rather than a mere dampening of the sleep benefits experienced by younger adults.

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

McIntosh-Lab/SleepyBrain_analyses

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 9ac5ad3bbe28feaa8cc7925ccf9adee716ae3877, 31 July 2025
Languages: MATLAB (56), Shell (8), Python (8), R (6)
Size: 134 files, 78 scripts
Software Heritage: not archived
Found in: “Data and Code Availability”
Holds: README, environment (requirements_hpc.txt, python_packages/brainvistools/pyproject.toml, python_packages/PyNeudorf/pyproject.toml)
Not found: license file, CITATION.cff, tests, continuous integration, documentation
Tools: Statistics and Machine Learning Toolbox (13 files), Image Processing Toolbox (11 files), ggplot2 (6 files), tidyverse (5 files), FSL (4 files), NumPy (4 files), SciPy (4 files), ggseg (3 files), lme4 (3 files), Signal Processing Toolbox (3 files), Matplotlib (3 files), NiBabel (3 files), Brain Connectivity Toolbox (2 files), NetworkX (2 files), Nilearn (2 files), pandas (2 files), Parallel Computing Toolbox (1 file), neuromaps (1 file), Pillow (1 file), seaborn (1 file), statsmodels (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
79 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:

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

Data and Code Availability

Data were downloaded from OpenfMRI (https://openfmri.org/dataset/ds000201/). Code used to produce analyses are available via github repository (https://github.com/McIntosh-Lab/SleepyBrain_analyses).

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 2, 28 September 2026

  • Authors: added Kelly Shen (0000-0001-8780-9299); Brianne Kent (0000-0003-0074-028X); removed Kelly Shen; Brianne Kent

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 5 authors, 5 keywords, 2 funders, 85 references.

Cite

This paper

Neudorf, J., Rokos, L., Shen, K., Kent, B., & McIntosh, A. R. (2026). Young and old adult brains experience opposite effects of acute sleep restriction on the functional connectivity network. Imaging neuroscience (Cambridge, Mass.), 4, IMAG.a.1278. https://doi.org/10.1162/imag.a.1278

BibTeX

@article{neudorf2026young,
author = {Neudorf, Josh and Rokos, Leanne and Shen, Kelly and Kent, Brianne and McIntosh, Anthony R.},
title = {{Young and old adult brains experience opposite effects of acute sleep restriction on the functional connectivity network}},
journal = {Imaging neuroscience (Cambridge, Mass.)},
year = {2026},
month = jun,
volume = {4},
pages = {IMAG.a.1278},
publisher = {MIT Press},
issn = {2837-6056},
doi = {10.1162/imag.a.1278},
url = {https://doi.org/10.1162/imag.a.1278},
pmid = {42326561},
pmcid = {PMC13281775}
}

RIS

TY - JOUR
AU - Neudorf, Josh
AU - Rokos, Leanne
AU - Shen, Kelly
AU - Kent, Brianne
AU - McIntosh, Anthony R.
TI - Young and old adult brains experience opposite effects of acute sleep restriction on the functional connectivity network
T2 - Imaging neuroscience (Cambridge, Mass.)
J2 - Imaging Neurosci (Camb)
PY - 2026
DA - 2026/06/18
VL - 4
SP - IMAG.a.1278
SN - 2837-6056
PB - MIT Press
DO - 10.1162/imag.a.1278
UR - https://doi.org/10.1162/imag.a.1278
LA - en
ER -

CSL-JSON

{
"id": "10.1162/imag.a.1278",
"type": "article-journal",
"title": "Young and old adult brains experience opposite effects of acute sleep restriction on the functional connectivity network",
"container-title": "Imaging neuroscience (Cambridge, Mass.)",
"author": [
{
"family": "Neudorf",
"given": "Josh"
},
{
"family": "Rokos",
"given": "Leanne"
},
{
"family": "Shen",
"given": "Kelly"
},
{
"family": "Kent",
"given": "Brianne"
},
{
"family": "McIntosh",
"given": "Anthony R."
}
],
"container-title-short": "Imaging Neurosci (Camb)",
"volume": "4",
"page": "IMAG.a.1278",
"DOI": "10.1162/imag.a.1278",
"PMID": "42326561",
"PMCID": "PMC13281775",
"ISSN": "2837-6056",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/imag.a.1278",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
18
]
]
}
}

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-76011-7 [code]
Human cortex organizes dynamic co-fluctuations along the sensorimotor-association axis.
Journal: Nature communications
In common: ggseg, Brain Connectivity Toolbox, FSL, 10 other tools, 4 references
[2] 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: Brain Connectivity Toolbox, Parallel Computing Toolbox, FSL, 12 other tools, 2 references
[3] doi:10.1016/j.nicl.2026.104012 [code]
Structural-functional multilayer brain network properties and outcome of combined repetitive transcranial magnetic stimulation and psychotherapy for obsessive-compulsive disorder.
Journal: NeuroImage. Clinical
In common: Brain Connectivity Toolbox, NetworkX, lme4, 12 other tools, fMRI, 3 references
[4] doi:10.1038/s41467-026-75959-w [code]
Charting higher-order models of brain function beyond pairwise interactions.
Journal: Nature communications
In common: neuromaps, Nilearn, NetworkX, 8 other tools, 6 references
[5] doi:10.1038/s41531-026-01354-3 [code]
Neuromodulation-induced normalization of cortical metastable dynamics signatures in Parkinson's disease.
Journal: NPJ Parkinson's disease
In common: neuromaps, Nilearn, Signal Processing Toolbox, 8 other tools, 6 references
[6] doi:10.1038/s41467-026-73668-y [code]
Convergent and divergent brain-cognition development in early adolescence.
Journal: Nature communications
In common: FSL, Nilearn, lme4, 11 other tools, fMRI, 3 references
[7] doi:10.1038/s41398-026-04025-2 [code]
Brain energetic landscapes shape state dysregulation in major depressive disorder: a morphological network controllability perspective.
Journal: Translational psychiatry
In common: neuromaps, Brain Connectivity Toolbox, FSL, 10 other tools, 3 references
[8] doi:10.1038/s41467-026-71270-w [code]
Spatiotemporal dynamics of the human cortical functional hierarchy across the lifespan.
Journal: Nature communications
In common: Parallel Computing Toolbox, FSL, Nilearn, 10 other tools, fMRI, 3 references
[9] doi:10.1038/s41586-026-10631-3 [code]
A prognostic human brain network for diffuse midline glioma.
Journal: Nature
In common: neuromaps, Parallel Computing Toolbox, FSL, 10 other tools, 3 references
[10] doi:10.7554/elife.103097 [code]
Canonical neurodevelopmental trajectories of structural and functional manifolds.
Journal: eLife
In common: ggseg, neuromaps, Brain Connectivity Toolbox, 9 other tools, 3 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.