OSCR

Time course of functional and structural brain network changes after mild traumatic brain injury.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 505 lines · 19 KB · MIT

  1. %% DTI-based structural connectivity: LME + cognition + plots
  2. % This script:
  3. % 1) Loads subject-wise DTI network matrices (14x14) for patients & controls at T0/T1
  4. % 2) Extracts upper-triangle edges (91 edges)
  5. % 3) Runs linear mixed-effects models:
  6. % Var1 ~ Age + Sex + Group*Time + (1|ID)
  7. % 4) Optionally examines correlations with cognitive scores
  8. % 5) Generates boxplots for selected edges
  9. %
  10. % Required inputs (to be prepared by the user):
  11. % - Base directory with group-wise subfolders and subject folders
  12. % - Age / sex text files
  13. % - DTI network matrices named as: <SubID>_<TimePoint>_fdt_network_matrix.txt
  14. % - Cognitive data (cognitive_patients, cognitive_controls) if correlation is needed
  15. %
  16. % -------------------------------------------------------------------------
  17. %% Housekeeping
  18. clearvars; clc;
  19. %% -------------------------------------------------------------------------
  20. % 0) Configuration
  21. cfg = struct();
  22. % Root directory of the repository (assumes this script is in repo_root/matlab/)
  23. cfg.repo_root = fileparts(fileparts(mfilename('fullpath')));
  24. cfg.input_dir = fullfile(cfg.repo_root, 'inputs');
  25. cfg.output_dir = fullfile(cfg.repo_root, 'outputs');
  26. cfg.dti_dir = fullfile(cfg.input_dir, 'dti_network'); % DTI txt 파일들이 있는 곳
  27. % Input files
  28. cfg.age_pat_file = fullfile(cfg.input_dir, 'age_patients.txt');
  29. cfg.age_con_file = fullfile(cfg.input_dir, 'age_controls.txt');
  30. cfg.sex_pat_file = fullfile(cfg.input_dir, 'sex_patients.txt');
  31. cfg.sex_con_file = fullfile(cfg.input_dir, 'sex_controls.txt');
  32. cfg.netinfo_file = fullfile(cfg.input_dir, 'NetInfo.txt'); % must contain network name
  33. cfg.cog_pat_file = fullfile(cfg.input_dir, 'cognitive_patients.mat'); % "cognitive_patients"
  34. cfg.cog_con_file = fullfile(cfg.input_dir, 'cognitive_controls.mat'); % "cognitive_controls"
  35. cfg.cog_missing_code = 999;
  36. cfg.cog_score_idx = [4 6]; % [WCST non-perseverative error, backward digit span]
  37. cfg.cog_score_names = {'WCST_nonpersev', 'DigitSpan_backward'};
  38. % Statistics
  39. cfg.alpha_uncorrected = 0.05;
  40. cfg.alpha_fdr = 0.05;
  41. %% 1) Load Demographics & ID lists
  42. fprintf('>> Loading demographics...\n');
  43. age.con = load(cfg.age_con_file); age.pat = load(cfg.age_pat_file);
  44. sex.con = load(cfg.sex_con_file); sex.pat = load(cfg.sex_pat_file);
  45. netNames = importdata(cfg.netinfo_file);
  46. nCon = numel(age.con); nPat = numel(age.pat);
  47. N = numel(netNames);
  48. mask = triu(true(N), 1);
  49. nEdges = nnz(mask);
  50. % Subject ID lists
  51. % You can either fill these manually or load from a text file.
  52. % Example below uses manual cell arrays (same as original code).
  53. subj_pat = {'Sub01','Sub02','Sub03','Sub04','Sub05','Sub06','Sub07','Sub09','Sub10','Sub11','Sub12','Sub13','Sub14','Sub15','Sub16','Sub18','Sub19','Sub21','Sub22','Sub23', ...
  54. 'Sub24','Sub25','Sub26','Sub27','Sub28','Sub29','Sub30','Sub31','Sub33','Sub34','Sub35','Sub36','Sub37','SubR01','SubR02','SubR03','SubR04','SubR07','SubR10','SubR12','SubR14'}; % nPat
  55. subj_con = {'Con01','Con02','Con03','Con04','Con05','Con06','Con08','Con10','Con11','Con15','Con16','Con17','Con18','Con19','Con20','Con21','Con22','Con23','Con24','Con25', ...
  56. 'Con26','Con27','Con28','Con30','Con31','Con35','Con36','Con37','Con38','Con40', 'Con41','Con42','N001','N002','N005'}; % nCon
  57. groupName = {'Patients', 'Controls'};
  58. timepoint = {'T0', 'T1'};
  59. %% ------------------------------------------------------------------------
  60. % 3. Load DTI network matrices
  61. % For each subject and timepoint:
  62. % <dti_dir>/<groupName>/<SubID>/<TimePoint>/<SubID>_<TimePoint>_fdt_network_matrix.txt
  63. % Each file: [Dim x Dim] adjacency (e.g., streamline count)
  64. % -------------------------------------------------------------------------
  65. fprintf('>> Loading DTI network matrices...\n');
  66. scval.con = nan(nEdges, nCon, 2);
  67. scval.pat = nan(nEdges, nPat, 2);
  68. for t = 1:2
  69. tp = timepoint{t};
  70. % Patients
  71. for s = 1:nPat
  72. sid = subj_pat{s};
  73. fPath = fullfile(cfg.dti_dir, groupName{1}, sid, tp, sprintf('%s_%s_fdt_network_matrix.txt', sid, tp));
  74. mat = load(fPath);
  75. scval.pat(:,s,t) = mat(mask); % 복잡한 reshape 없이 바로 mask 적용
  76. end
  77. % Controls
  78. for s = 1:nCon
  79. sid = subj_con{s};
  80. fPath = fullfile(cfg.dti_dir, groupName{2}, sid, tp, sprintf('%s_%s_fdt_network_matrix.txt', sid, tp));
  81. mat = load(fPath);
  82. scval.con(:,s,t) = mat(mask);
  83. end
  84. end
  85. %% ------------------------------------------------------------------------
  86. [ix_row, ix_col] = find(mask); % IMPORTANT: same order as mat(mask)
  87. EdgeTable = table( (1:nEdges)', ix_row, ix_col, ...
  88. netNames(ix_row), netNames(ix_col), ...
  89. 'VariableNames', {'EdgeID','Node1_idx','Node2_idx','Node1_name','Node2_name'} );
  90. %% ------------------------------------------------------------------------
  91. % 5. Linear Mixed-Effects Model analysis + summary
  92. % Var1 ~ Age + Sex + Group * Time + (1 | Individuals)
  93. % net_pat, net_con: [nEdges × nSub × 2(timepoints)]
  94. % -------------------------------------------------------------------------
  95. G = nan(nEdges,1); % p(Group)
  96. T = nan(nEdges,1); % p(Time)
  97. Int = nan(nEdges,1); % p(Group×Time)
  98. beta_G = nan(nEdges,1);
  99. beta_T = nan(nEdges,1);
  100. beta_Int = nan(nEdges,1);
  101. t_G = nan(nEdges,1);
  102. t_T = nan(nEdges,1);
  103. t_Int = nan(nEdges,1);
  104. Group = categorical([repmat({'Control'}, nCon*2, 1); repmat({'Patient'}, nPat*2, 1)]);
  105. Time = categorical([repmat({'T0'}, nCon, 1); repmat({'T1'}, nCon, 1); ...
  106. repmat({'T0'}, nPat, 1); repmat({'T1'}, nPat, 1)]);
  107. Subject = [repmat((1:nCon)', 2, 1); repmat((nCon+1:nCon+nPat)', 2, 1)];
  108. Age = [age.con(:); age.con(:); age.pat(:); age.pat(:)];
  109. Sex = [sex.con(:); sex.con(:); sex.pat(:); sex.pat(:)];
  110. output = []; % uncorrected p<0.05 (Group or Time) edge index
  111. for e = 1:nEdges
  112. y_con = squeeze(scval.con(e,:,:)); % nCon x 2
  113. y_pat = squeeze(scval.pat(e,:,:)); % nPat x 2
  114. y = [y_con(:); y_pat(:)];
  115. tbl = table(y, Age, Sex, Group, Time, categorical(Subject), ...
  116. 'VariableNames', {'SC','Age','Sex','Group','Time','Subject'});
  117. lme = fitlme(tbl, 'SC ~ Age + Sex + Group*Time + (1|Subject)');
  118. coef = lme.Coefficients;
  119. % Coefficient order: (Intercept) Age Sex Group_Patient Time_Time2 Group_Patient:Time_Time2
  120. G(e) = coef.pValue(4); % Group main effect
  121. T(e) = coef.pValue(5); % Time main effect
  122. Int(e) = coef.pValue(6); % Group×Time interaction
  123. beta_G(e) = coef.Estimate(4);
  124. beta_T(e) = coef.Estimate(5);
  125. beta_Int(e) = coef.Estimate(6);
  126. t_G(e) = coef.tStat(4);
  127. t_T(e) = coef.tStat(5);
  128. t_Int(e) = coef.tStat(6);
  129. if any([G(e), T(e)] < cfg.alpha_uncorrected)
  130. output = [output; e];
  131. end
  132. end
  133. %% ------------------------------------------------------------------------
  134. % 5-1. FDR correction (Benjamini–Hochberg)
  135. % -------------------------------------------------------------------------
  136. [hG, G_fdr] = fdr_bh(G); % Group main effect
  137. [hT, T_fdr] = fdr_bh(T); % Time main effect
  138. [hInt, Int_fdr] = fdr_bh(Int); % Group×Time interaction
  139. %% ------------------------------------------------------------------------
  140. % 5-2. Summary table (원하면 output만 사용하거나, 전체 nEdges 사용 가능)
  141. % -------------------------------------------------------------------------
  142. EdgeID = find( (G < cfg.alpha_uncorrected) | (T < cfg.alpha_uncorrected) | (Int < cfg.alpha_uncorrected) );
  143. Node1 = EdgeTable.Node1_name(EdgeID);
  144. Node2 = EdgeTable.Node2_name(EdgeID);
  145. LME_summary = table(EdgeID, Node1, Node2, beta_G(EdgeID), t_G(EdgeID), G(EdgeID),...
  146. beta_T(EdgeID), t_T(EdgeID), T(EdgeID), beta_Int(EdgeID), t_Int(EdgeID), Int(EdgeID), ...
  147. 'VariableNames', {'EdgeID','Node1','Node2', ...
  148. 'Beta_Group','t_Group','p_Group', ...
  149. 'Beta_Time','t_Time','p_Time', ...
  150. 'Beta_Interaction','t_Interaction','p_Interaction'});
  151. disp(LME_summary)
  152. %% ------------------------------------------------------------------------
  153. % 5-bis. Identify time-only edges and define edgesForCognition
  154. % -------------------------------------------------------------------------
  155. isGroupSig = G < cfg.alpha_uncorrected; % edges with significant Group main effect
  156. isTimeSig = T < cfg.alpha_uncorrected; % edges with significant Time main effect
  157. % Edges where ONLY Time is significant (Group not significant)
  158. edgesTimeOnly = find(~isGroupSig & isTimeSig);
  159. % Edges where either Group or Time was significant (same as "output")
  160. edgesAny = output;
  161. % Final set of edges used for cognition analyses:
  162. % = significant edges minus "time-only" edges
  163. edgesForCognition = setdiff(edgesAny, edgesTimeOnly);
  164. %% ------------------------------------------------------------------------
  165. % 6. Post-hoc analysis for edgesForCognition
  166. % Tests (per edge):
  167. % 1) Patient vs Control @ T0 (ttest2)
  168. % 2) Patient vs Control @ T1 (ttest2)
  169. % 3) Within-patient: T0 vs T1 (paired ttest)
  170. % 4) Within-control: T0 vs T1 (paired ttest)
  171. % -------------------------------------------------------------------------
  172. nSig = numel(edgesAny);
  173. posth = struct();
  174. posth.edgeID = edgesAny;
  175. posth.p = nan(nSig, 4);
  176. posth.t = nan(nSig, 4);
  177. for k = 1:nSig
  178. e = edgesAny(k);
  179. % Structural connectivity for this edge (already [nSub x 1])
  180. conT0 = squeeze(scval.con(e,:,1))'; % [nCon x 1]
  181. conT1 = squeeze(scval.con(e,:,2))'; % [nCon x 1]
  182. patT0 = squeeze(scval.pat(e,:,1))'; % [nPat x 1]
  183. patT1 = squeeze(scval.pat(e,:,2))'; % [nPat x 1]
  184. % 1) Patient vs Control @ T0
  185. [~, p, ~, stats] = ttest2(patT0, conT0);
  186. posth.p(k,1) = p;
  187. posth.t(k,1) = stats.tstat;
  188. % 2) Patient vs Control @ T1
  189. [~, p, ~, stats] = ttest2(patT1, conT1);
  190. posth.p(k,2) = p;
  191. posth.t(k,2) = stats.tstat;
  192. % 3) Within-patient: T0 vs T1 (paired)
  193. [~, p, ~, stats] = ttest(patT0, patT1);
  194. posth.p(k,3) = p;
  195. posth.t(k,3) = stats.tstat;
  196. % 4) Within-control: T0 vs T1 (paired)
  197. [~, p, ~, stats] = ttest(conT0, conT1);
  198. posth.p(k,4) = p;
  199. posth.t(k,4) = stats.tstat;
  200. end
  201. %% ------------------------------------------------------------------------
  202. % 7) Cognition models (patients only) - DTI connectivity
  203. % Cognitive matrices:
  204. % cognitive_patients : [nPat x nScoresTotal x 2] (dim3: 1=T0, 2=T1)
  205. %
  206. % Patients-only LME (edge-wise):
  207. % Y ~ Conn * Time + (1|Subject)
  208. %
  209. % Requires in workspace:
  210. % scval.pat : [nEdges x nPat x 2] (DTI edge values)
  211. % edgesForCognition : vector of edge IDs to test
  212. % EdgeTable : optional (for node labels; must match scval edge ordering)
  213. edgesForCognition = edgesForCognition(:);
  214. nEdgesUse = numel(edgesForCognition);
  215. % ---- Settings (reuse cfg like fMRI) ----
  216. scoreIdx = cfg.cog_score_idx; % [4 6]
  217. scoreNames = cfg.cog_score_names; % {'WCST_nonpersev','DigitSpan_backward'}
  218. missing_code = cfg.cog_missing_code; % 999
  219. alpha_fdr = cfg.alpha_fdr;
  220. Cpat = load(cfg.cog_pat_file);
  221. cognitive_patients = Cpat.cognitive_patients;
  222. Ccon = load(cfg.cog_con_file);
  223. cognitive_controls = Ccon.cognitive_controls;
  224. nScores = numel(scoreIdx);
  225. % ---- Preallocate ----
  226. beta_Conn = nan(nEdgesUse, nScores);
  227. beta_Time = nan(nEdgesUse, nScores);
  228. beta_Int = nan(nEdgesUse, nScores);
  229. p_Conn = nan(nEdgesUse, nScores);
  230. p_Time = nan(nEdgesUse, nScores);
  231. p_Int = nan(nEdgesUse, nScores);
  232. % ---- Edge-wise patients-only LME ----
  233. for s = 1:nScores
  234. cogIdx = scoreIdx(s);
  235. y_T0 = cognitive_patients(:, cogIdx, 1);
  236. y_T1 = cognitive_patients(:, cogIdx, 2);
  237. for i = 1:nEdgesUse
  238. edgeID = edgesForCognition(i);
  239. conn_T0 = squeeze(scval.pat(edgeID, :, 1))'; % [nPat x 1]
  240. conn_T1 = squeeze(scval.pat(edgeID, :, 2))'; % [nPat x 1]
  241. % Long format (stack T0/T1)
  242. Y = [y_T0; y_T1];
  243. Conn = [conn_T0; conn_T1];
  244. Time = [zeros(nPat,1); ones(nPat,1)]; % 0=T0, 1=T1
  245. Subj = [(1:nPat)'; (1:nPat)']; % subject ID repeated
  246. valid = (Y ~= missing_code) & ~isnan(Y) & ~isnan(Conn);
  247. if nnz(valid) < 5
  248. continue;
  249. end
  250. tbl = table(Y(valid), Conn(valid), categorical(Time(valid)), categorical(Subj(valid)), ...
  251. 'VariableNames', {'Y','Conn','Time','Subject'});
  252. lme = fitlme(tbl, 'Y ~ Conn*Time + (1|Subject)');
  253. coef = lme.Coefficients;
  254. k = strcmp(coef.Name,'Conn');
  255. if any(k)
  256. beta_Conn(i,s) = coef.Estimate(k);
  257. p_Conn(i,s) = coef.pValue(k);
  258. end
  259. k = strcmp(coef.Name,'Time_1');
  260. if any(k)
  261. beta_Time(i,s) = coef.Estimate(k);
  262. p_Time(i,s) = coef.pValue(k);
  263. end
  264. k = strcmp(coef.Name,'Conn:Time_1');
  265. if any(k)
  266. beta_Int(i,s) = coef.Estimate(k);
  267. p_Int(i,s) = coef.pValue(k);
  268. end
  269. end
  270. end
  271. % ---- FDR correction (BH): Conn / Time / Interaction, per score ----
  272. q_Conn = nan(size(p_Conn)); sig_Conn = false(size(p_Conn));
  273. q_Time = nan(size(p_Time)); sig_Time = false(size(p_Time));
  274. q_Int = nan(size(p_Int)); sig_Int = false(size(p_Int));
  275. for s = 1:nScores
  276. v = ~isnan(p_Conn(:,s));
  277. if any(v)
  278. [h, ~, adj_p] = fdr_bh(p_Conn(v,s), alpha_fdr, 'pdep', 'no');
  279. q_Conn(v,s) = adj_p; sig_Conn(v,s) = h;
  280. end
  281. v = ~isnan(p_Time(:,s));
  282. if any(v)
  283. [h, ~, adj_p] = fdr_bh(p_Time(v,s), alpha_fdr, 'pdep', 'no');
  284. q_Time(v,s) = adj_p; sig_Time(v,s) = h;
  285. end
  286. v = ~isnan(p_Int(:,s));
  287. if any(v)
  288. [h, ~, adj_p] = fdr_bh(p_Int(v,s), alpha_fdr, 'pdep', 'no');
  289. q_Int(v,s) = adj_p; sig_Int(v,s) = h;
  290. end
  291. end
  292. % ---- Build summary table (same layout as fMRI cog_summary) ----
  293. hasEdgeTable = exist('EdgeTable','var') && istable(EdgeTable) && height(EdgeTable) >= max(edgesForCognition) && ...
  294. all(ismember({'Node1_name','Node2_name'}, EdgeTable.Properties.VariableNames));
  295. nRows = nEdgesUse * nScores;
  296. Score = strings(nRows,1);
  297. EdgeID = nan(nRows,1);
  298. Node1 = strings(nRows,1);
  299. Node2 = strings(nRows,1);
  300. BetaC = nan(nRows,1); PC = nan(nRows,1); QC = nan(nRows,1);
  301. BetaT = nan(nRows,1); PT = nan(nRows,1); QT = nan(nRows,1);
  302. BetaI = nan(nRows,1); PI = nan(nRows,1); QI = nan(nRows,1);
  303. r = 0;
  304. for s = 1:nScores
  305. for i = 1:nEdgesUse
  306. r = r + 1;
  307. edgeID = edgesForCognition(i);
  308. Score(r) = string(scoreNames{s});
  309. EdgeID(r) = edgeID;
  310. if hasEdgeTable
  311. Node1(r) = string(EdgeTable.Node1_name{edgeID});
  312. Node2(r) = string(EdgeTable.Node2_name{edgeID});
  313. end
  314. BetaC(r) = beta_Conn(i,s); PC(r) = p_Conn(i,s); QC(r) = q_Conn(i,s);
  315. BetaT(r) = beta_Time(i,s); PT(r) = p_Time(i,s); QT(r) = q_Time(i,s);
  316. BetaI(r) = beta_Int(i,s); PI(r) = p_Int(i,s); QI(r) = q_Int(i,s);
  317. end
  318. end
  319. cog_summary = table(Score, EdgeID, Node1, Node2, ...
  320. BetaC, PC, QC, BetaT, PT, QT, BetaI, PI, QI, ...
  321. 'VariableNames', {'Score','EdgeID','Node1','Node2', ...
  322. 'Beta_Conn','P_Conn','Q_Conn', ...
  323. 'Beta_Time','P_Time','Q_Time', ...
  324. 'Beta_ConnxTime','P_ConnxTime','Q_ConnxTime'});
  325. % "Joint edges": interaction survives FDR
  326. joint_edges = cog_summary(cog_summary.Q_ConnxTime < alpha_fdr, :);
  327. %% -------------------------------------------------------------------------
  328. % 6b) Correlation between structural connectivity and cognitive measures
  329. %
  330. % Requires in workspace:
  331. % scval.pat : [nEdges x nPat x 2] (DTI connectivity, e.g., streamline count)
  332. % scval.con : [nEdges x nCon x 2]
  333. % cognitive_patients : [nPat x nScoresTotal x 2]
  334. % cognitive_controls : [nCon x nScoresTotal x 2]
  335. % edgesForCognition : [nEdgesCog x 1] edge IDs (subset)
  336. % cfg.cog_score_idx, cfg.cog_score_names, cfg.cog_missing_code
  337. % -------------------------------------------------------------------------
  338. cogIdxCorr = cfg.cog_score_idx(:)'; % e.g., [4 6]
  339. scoreNamesDTI = string(cfg.cog_score_names(:)); % e.g., ["WCST_nonpersev","DigitSpan_backward"]
  340. missCode = cfg.cog_missing_code;
  341. nScoresCorr = numel(cogIdxCorr);
  342. edgesForCognition = edgesForCognition(:);
  343. nEdgesCog = numel(edgesForCognition);
  344. r_cog_DTI = nan(nScoresCorr, nEdgesCog, 2, 2); % score x edge x group x time
  345. p_cog_DTI = nan(nScoresCorr, nEdgesCog, 2, 2);
  346. for j = 1:nEdgesCog
  347. edgeID = edgesForCognition(j);
  348. for g = 1:2 % group: 1=patients, 2=controls
  349. for t = 1:2 % time : 1=T0, 2=T1
  350. if g == 1
  351. conn_all = squeeze(scval.pat(edgeID,:,t))'; % [nPat x 1]
  352. cog_mat = cognitive_patients(:,:,t); % [nPat x nScoresTotal]
  353. else
  354. conn_all = squeeze(scval.con(edgeID,:,t))'; % [nCon x 1]
  355. cog_mat = cognitive_controls(:,:,t); % [nCon x nScoresTotal]
  356. end
  357. for k = 1:nScoresCorr
  358. sOrig = cogIdxCorr(k); % original cognitive index (e.g., 4 or 6)
  359. score = cog_mat(:, sOrig);
  360. valid = (score ~= missCode) & ~isnan(score) & ~isnan(conn_all);
  361. if nnz(valid) >= 3
  362. [r_cog_DTI(k,j,g,t), p_cog_DTI(k,j,g,t)] = corr(conn_all(valid), score(valid));
  363. end
  364. end
  365. end
  366. end
  367. end
  368. %% -------------------------------------------------------------------------
  369. % 6b-bis) Append DTI connectivity–cognition correlations to cog_summary
  370. %
  371. % Requires in workspace:
  372. % cog_summary (table) with variables: Score, EdgeID
  373. % r_cog_DTI, p_cog_DTI, edgesForCognition
  374. % -------------------------------------------------------------------------
  375. outVarsDTI = {'Rpat_T0_DTI','Ppat_T0_DTI','Rpat_T1_DTI','Ppat_T1_DTI', ...
  376. 'Rcon_T0_DTI','Pcon_T0_DTI','Rcon_T1_DTI','Pcon_T1_DTI'};
  377. for v = 1:numel(outVarsDTI)
  378. if ~ismember(outVarsDTI{v}, cog_summary.Properties.VariableNames)
  379. cog_summary.(outVarsDTI{v}) = nan(height(cog_summary), 1);
  380. end
  381. end
  382. ScoreCol = string(cog_summary.Score);
  383. for i = 1:height(cog_summary)
  384. edgeID = cog_summary.EdgeID(i);
  385. % Map Score -> k (must match cfg.cog_score_names ordering)
  386. k = find(scoreNamesDTI == ScoreCol(i), 1);
  387. if isempty(k), continue; end
  388. % Map EdgeID -> j (position in edgesForCognition)
  389. j = find(edgesForCognition == edgeID, 1);
  390. if isempty(j), continue; end
  391. % Patients (group=1)
  392. cog_summary.Rpat_T0_DTI(i) = r_cog_DTI(k, j, 1, 1);
  393. cog_summary.Ppat_T0_DTI(i) = p_cog_DTI(k, j, 1, 1);
  394. cog_summary.Rpat_T1_DTI(i) = r_cog_DTI(k, j, 1, 2);
  395. cog_summary.Ppat_T1_DTI(i) = p_cog_DTI(k, j, 1, 2);
  396. % Controls (group=2)
  397. cog_summary.Rcon_T0_DTI(i) = r_cog_DTI(k, j, 2, 1);
  398. cog_summary.Pcon_T0_DTI(i) = p_cog_DTI(k, j, 2, 1);
  399. cog_summary.Rcon_T1_DTI(i) = r_cog_DTI(k, j, 2, 2);
  400. cog_summary.Pcon_T1_DTI(i) = p_cog_DTI(k, j, 2, 2);
  401. end

brain_comm_DTI_connectivity_clean.m at commit ad29387, under MIT · at the source

Overview

Authors: Eunkyung Kim1,2, Han Gil Seo1,3, Roh-Eul Yoo4, Byung-Mo Oh1,3,5
ORCID iDs: Byung-Mo Oh
  1. Department of Rehabilitation Medicine, Seoul National University Hospital, Seoul 03080, Republic of Korea
  2. Biomedical Research Institute, Seoul National University Hospital, Seoul 03080, Republic of Korea
  3. Department of Rehabilitation Medicine, Seoul National University College of Medicine, Seoul 03080, Republic of Korea
  4. Department of Radiology, Seoul National University College of Medicine and Seoul National University Hospital, Seoul 03080, Republic of Korea
  5. Institute on Aging, Seoul National University, Seoul 08826, Republic of Korea
Journal: Brain communications, volume 8, issue 2, article fcag072
Dates: received 12 August 2025; accepted 13 March 2026; published online 16 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/braincomms/fcag072 · PMID 41884600 · PMCID PMC13009404 · OpenAlex W7138053278
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), traumatic brain injury (population), cognitive (subfield)
Methods: Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Connectivity, fMRI & imaging
Keywords: mild traumatic brain injury, attention networks, functional network connectivity, diffusion tensor imaging, longitudinal study
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: National Research Foundation of Korea (2018R1C1B6002554, 2021R1A2B5B02087294, 2022R1C1C2006405, RS-2024-00346342, RS-2024-00343000); Ministry of Land, Infrastructure and Transport (RF-2022006)
Citations: not cited yet (Europe PMC); 65 references in the paper

Abstract

Traumatic brain injury is a progressive and potentially persistent pathophysiological condition affecting multiple cognitive domains. Large-scale brain networks, particularly those supporting attention, are closely linked to these cognitive impairments. Additionally, functional network connectivity, which captures statistical dependencies among network time courses, has revealed disrupted coupling between attentional networks. However, longitudinal evidence on how functional network connectivity changes over time and whether such changes are related to structural connectivity or cognitive outcomes remains limited. To address these gaps, this study investigated functional and structural connectivity among the default mode network, dorsal attention network, and ventral attention network in 41 patients with mild traumatic brain injury (mean age: 48.7 ± 15.8 years) and 35 matched controls (mean age: 44.6 ± 12.8 years). Both groups underwent brain imaging, clinical and neuropsychological assessments, and two cognitive tasks, including the Wisconsin Card Sorting Test and Digit Span Test, during the baseline (<1 month) and follow-up (>3 months) phases. Functional networks were defined using the Schaefer atlas and structural connectivity was constructed using these networks as nodes. Diffusion metrics, including fractional anisotropy, axial diffusivity, radial diffusivity, and mean diffusivity, were assessed. Clinically, symptom scores of depression, symptom severity, and quality of life improved over the three-month period (P < 0.001), whereas outcomes assessed by the Korean version of the Montreal Cognitive Assessment and the Frontal Assessment Battery showed limited change (P > 0.05). Cognitive performance was generally comparable between groups, except for a significant main effect of group in the backward Digit Span Test, with the mild traumatic brain injury group showing poorer performance than controls. In the baseline phase, functional network connectivity between the default mode network and dorsal and ventral attention network was significantly reduced in the mild traumatic brain injury group, correlating with impaired attentional control but not with working memory capacity. These disruptions were no longer observed at the follow-up assessment. Structural connectivity remained largely stable throughout the period. Diffusion metrics in controls were associated with attentional performance but not with working memory performance. Positive associations were observed between attentional performance and fractional anisotropy only during the follow-up phase in the mild traumatic brain injury group, possibly reflecting shifts in the association over time. In contrast, working memory performance was consistently linked to diffusion metrics in the mild traumatic brain injury group. Taken together, these findings highlight a temporal dissociation between early functional disconnection and later structure-cognitive coupling following mild traumatic brain injury and highlight the value of multimodal longitudinal imaging in understanding post-injury recovery.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above.

Eun517/mtbi-structure-function-longitudinal

License: MIT
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: ad293877784a464bd88e7dd79250a49e35edc2ab, 1 January 2026
Languages: MATLAB (3)
Size: 5 files, 3 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
5 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;
  • 3 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • 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

The data that support the findings of this study are available from the corresponding author upon reasonable request. Code for statistical analyses can be found at https://github.com/Eun517/mtbi-structure-function-longitudinal.

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

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

Cite

This paper

Kim, E., Seo, H. G., Yoo, R.-E., & Oh, B.-M. (2026). Time course of functional and structural brain network changes after mild traumatic brain injury. Brain communications, 8(2), fcag072. https://doi.org/10.1093/braincomms/fcag072

BibTeX

@article{kim2026time,
author = {Kim, Eunkyung and Seo, Han Gil and Yoo, Roh-Eul and Oh, Byung-Mo},
title = {{Time course of functional and structural brain network changes after mild traumatic brain injury}},
journal = {Brain communications},
year = {2026},
month = mar,
volume = {8},
number = {2},
pages = {fcag072},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/braincomms/fcag072},
url = {https://doi.org/10.1093/braincomms/fcag072},
pmid = {41884600},
pmcid = {PMC13009404}
}

RIS

TY - JOUR
AU - Kim, Eunkyung
AU - Seo, Han Gil
AU - Yoo, Roh-Eul
AU - Oh, Byung-Mo
TI - Time course of functional and structural brain network changes after mild traumatic brain injury
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/03/16
VL - 8
IS - 2
SP - fcag072
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/braincomms/fcag072
UR - https://doi.org/10.1093/braincomms/fcag072
LA - en
ER -

CSL-JSON

{
"id": "10.1093/braincomms/fcag072",
"type": "article-journal",
"title": "Time course of functional and structural brain network changes after mild traumatic brain injury",
"container-title": "Brain communications",
"author": [
{
"family": "Kim",
"given": "Eunkyung"
},
{
"family": "Seo",
"given": "Han Gil"
},
{
"family": "Yoo",
"given": "Roh-Eul"
},
{
"family": "Oh",
"given": "Byung-Mo"
}
],
"container-title-short": "Brain Commun",
"volume": "8",
"issue": "2",
"page": "fcag072",
"DOI": "10.1093/braincomms/fcag072",
"PMID": "41884600",
"PMCID": "PMC13009404",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/braincomms/fcag072",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
16
]
]
}
}

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.7554/elife.108109 [code]
Multimodal MRI marker of cognition explains the association between cognition and mental health in the UK Biobank.
Journal: eLife
In common: cognitive, structural MRI / diffusion, 6 references
[2] doi:10.1371/journal.pbio.3003738 [code]
Altered salience network structure-function integration underlies the decline in cognitive flexibility during aging.
Journal: PLoS biology
In common: Statistics and Machine Learning Toolbox, cognitive, structural MRI / diffusion, 4 references
[3] doi:10.1093/brain/awaf443 [code]
Cellular signatures underlying functional resilience in presymptomatic frontotemporal dementia.
Journal: Brain : a journal of neurology
In common: fdr_bh (Benjamini-Hochberg FDR), Statistics and Machine Learning Toolbox, 3 references
[4] doi:10.1002/hbm.70534 [code]
Longitudinal Multimodal Neuroimaging After Traumatic Brain Injury.
Journal: Human brain mapping
In common: traumatic brain injury, structural MRI / diffusion, 3 references
[5] doi:10.1038/s41467-026-73668-y [code]
Convergent and divergent brain-cognition development in early adolescence.
Journal: Nature communications
In common: fdr_bh (Benjamini-Hochberg FDR), Statistics and Machine Learning Toolbox, 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), Statistics and Machine Learning Toolbox, cognitive, 2 references
[7] doi:10.1093/braincomms/fcag134 [code]
Neurophysiological, imaging and neurobiological markers of central fatigue in multiple sclerosis.
Journal: Brain communications
In common: Statistics and Machine Learning Toolbox, structural MRI / diffusion, 3 references
[8] doi:10.1038/s41398-026-03965-z [code]
Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation.
Journal: Translational psychiatry
In common: fdr_bh (Benjamini-Hochberg FDR), Statistics and Machine Learning Toolbox, 2 references
[9] doi:10.7554/elife.103097 [code]
Canonical neurodevelopmental trajectories of structural and functional manifolds.
Journal: eLife
In common: Statistics and Machine Learning Toolbox, structural MRI / diffusion, 4 references
[10] doi:10.1038/s41593-026-02359-0 [code]
The cross-site reproducibility of MRI morphometric phenotypes in psychiatric disorders.
Journal: Nature neuroscience
In common: fdr_bh (Benjamini-Hochberg FDR), Statistics and Machine Learning Toolbox, structural MRI / diffusion, 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.