OSCR

Cellular signatures underlying functional resilience in presymptomatic frontotemporal dementia.

Code ↔ Paper

6 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 6 matches
  1. [1] § Materials and methods › Neuroimaging assessment › Functional MRI image acquisition and processing › Post-processing and connectome estimation ↔ MEEG/detect_ICA_artefacts.m, lines 1–82 · score 0.69 · band pass filter, ICA, Pearson, transform, signal, space
  2. [2] § Materials and methods › Neuroimaging assessment › Functional MRI image acquisition and processing › Post-processing and connectome estimation ↔ Conn/rsfMRI_GLM.m, lines 2–108 · score 0.69 · fMRI, realignment, GLM, CSF, expansions, confounds
  3. [3] § Results › Brain-behaviour relationships › Cortical thickness-cognition relationships driven by age, not FTD gene status ↔ code/dataProcessing/S3_samples2parcellation.m, lines 1–60 · score 0.56 · paracentral lobule, occipital, gyrus, frontal, temporal, Selective
  4. [4] § Materials and methods › Statistical analysis › Group and progression effects in brain structure and function ↔ Conn/rsfMRI_GLM.m, lines 2–108 · score 0.55 · linear regression, modelled, confound, scanning, pre, covariates
  5. [5] § Materials and methods › Neuroimaging assessment › Functional MRI image acquisition and processing › Preprocessing ↔ code/peripheralFunctions/freesurfer/load_dicom_fl.m, lines 118–184 · score 0.51 · flip angle, echo, repetition, slice
  6. [6] § Results › Group differences › Functional integration declines with age in non-carriers, but is abnormally maintained in carriers of pathogenic variants ↔ code/dataProcessing/S3_samples2parcellation.m, lines 1–60 · score 0.50 · temporal pole, sulcus, gyrus, frontal, cortex, thresholding

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 · 685 lines · 25 KB · GPL-3.0 · 2 matches

  1. function [Zmat, Bmat, pZmat, pBmat, aY, X0r] = rsfMRI_GLM(S);
  2. % [Zmat, Bmat, pZmat, pBmat, aY, X0r] = rsfMRI_GLM(S);
  3. %
  4. % Function (using SPM8 functions) for estimating linear regressions
  5. % between fMRI timeseries in each pair of Nr ROIs, adjusting for bandpass
  6. % filter, confounding timeseries (eg CSF) and (SVD of) various expansions of
  7. % movement parameters, and properly modelling dfs based on comprehensive
  8. % model of error autocorrelation.
  9. %
  10. % [email hidden], Jan 2013
  11. %
  12. % Many thanks to Linda Geerligs for pointing out improvements!
  13. %
  14. % S.Y = [Ns x Nr] data matrix, where Ns = number of scans (ie resting-state fMRI timeseries) and Nr = number of ROIs
  15. % S.M = [Ns x 6] matrix of 6 movement parameters from realignment (x,y,z,pitch,roll,yaw)
  16. % S.C = [Ns x Nc] matrix of confounding timeseries, Nc = number of confounds (eg extracted from WM, CSF or Global masks)
  17. % S.G = [0/1] - whether to include global over ROIs (ie given current data) (default = 0)
  18. % S.TR = time between volumes (TR), in seconds
  19. %
  20. % (S.HPC (default = 100) = highpass cut-off (in seconds)
  21. % (S.LPC (default = 10) = lowpass cut-off (in seconds)
  22. % (S.CY (default = {}) = precomputed covariance over pooled voxels (optional)
  23. % (S.pflag (default=0) is whether to calculate partial regressions too (takes longer))
  24. % (S.svd_thr (default=.99) is threshold for SVD of confounds)
  25. % (S.SpikeMovAbsThr (default='', ie none) = absolute threshold for outliers based on RMS of Difference of Translations
  26. % (S.SpikeMovRelThr (default='', ie none) = relative threshold (in SDs) for outliers based on RMS of Difference of Translations or Rotations
  27. % (S.SpikeDatRelThr (default='', ie none) = relative threshold (in SDs) for mean of Y over voxels (outliers, though arbitrary?)
  28. % (S.SpikeLag (default=1) = how many TRs after a spike are modelled out as separate regressors
  29. % (S.StandardiseY (default = 0) = whether to Z-score each ROI's timeseries to get standardised Betas)
  30. % (S.PreWhiten (default = 1) = whether to estimate autocorrelation of error and prewhiten (slower, but better Z-values (less important for Betas?))
  31. % (S.GlobMove = user-specified calculation of global movement)
  32. %
  33. % Zmat = [Nr x Nr] matrix of Z-statistics for linear regression from seed (row) to target (column) ROI
  34. % Bmat = [Nr x Nr] matrix of betas for linear regression from seed (row) to target (column) ROI
  35. % pZmat = [Nr x Nr] matrix of Z-statistics for partial linear regression from seed (row) to target (column) ROI
  36. % pZmat = [Nr x Nr] matrix of betas for partial linear regression from seed (row) to target (column) ROI
  37. % aY = data adjusted for confounds
  38. % X0r = confounds (filter, confound ROIs, movement expansion)
  39. %
  40. % Note:
  41. % some Inf Z-values can be returned in Zmat (when p-value so low than inv_Ncdf is infinite)
  42. % (these could be replaced by the maximum Z-value in matrix?)
  43. %
  44. % Potential improvements:
  45. % regularised regression (particularly for pZmat), eg L1 with LASSO - or L2 implementable with spm_reml_sc?
  46. try Y = S.Y; catch error('Need Nscans x Nrois data matrix'); end
  47. try C = S.C; catch error('Need Nscans x Nc matrix of Nc confound timeseries (Nc can be zero)'); end
  48. try TR = S.TR; catch error('Need TR (in secondss)'); end
  49. try HPC = S.HPC; catch
  50. HPC = 1/0.01;
  51. warning('Assuming highpass cut-off of %d',HPC);
  52. end
  53. try LPC = S.LPC; catch
  54. LPC = 1/0.2;
  55. warning('Assuming lowpass cut-off of %d',LPC);
  56. end
  57. try CY = S.CY; catch
  58. CY = [];
  59. end
  60. try GlobalFlag = S.G; catch
  61. GlobalFlag = 0;
  62. end
  63. try SpikeMovAbsThr = S.SpikeMovAbsThr; catch
  64. SpikeMovAbsThr = '';
  65. % SpikeMovAbsThr = 0.5; % mm from Power et al
  66. % SpikeMovAbsThr = 0.25; % mm from Satterthwaite et al 2013
  67. end
  68. try SpikeMovRelThr = S.SpikeMovRelThr; catch
  69. % SpikeMovRelThr = '';
  70. SpikeMovRelThr = 5; % 5 SDs of mean?
  71. end
  72. try SpikeDatRelThr = S.SpikeDatRelThr; catch
  73. SpikeDatRelThr = '';
  74. % SpikeDatRelThr = 5; % 5 SDs of mean?
  75. end
  76. try SpikeLag = S.SpikeLag; catch
  77. SpikeLag = 1;
  78. % SpikeLag = 5; % 5 TRs after spike?
  79. end
  80. try StandardiseY = S.StandardiseY; catch
  81. StandardiseY = 0;
  82. end
  83. try PreWhiten = S.PreWhiten; catch
  84. PreWhiten = 1;
  85. end
  86. try VolterraLag = S.VolterraLag; catch
  87. VolterraLag = 5; % artifacts can last up to 5 TRs = 10s, according to Power et al (2013)
  88. end
  89. try pflag = S.pflag; catch pflag = 0; end
  90. try svd_thr = S.svd_thr; catch svd_thr = .99; end
  91. Ns = size(Y,1);
  92. Nr = size(Y,2);
  93. %% If want to try Matlab's LASSO (takes ages though)
  94. % lassoflag = 0;
  95. % if lassoflag
  96. % matlabpool open
  97. % opts = statset('UseParallel','always');
  98. % end
  99. %% Create a DCT bandpass filter (so filtering part of model, countering Hallquist et al 2013 Neuroimage)
  100. K = spm_dctmtx(Ns,Ns);
  101. nHP = fix(2*(Ns*TR)/HPC + 1);
  102. nLP = fix(2*(Ns*TR)/LPC + 1);
  103. K = K(:,[2:nHP nLP:Ns]); % Remove initial constant
  104. Nk = size(K,2);
  105. fprintf('Bandpass filter using %d dfs (%d left)\n',Nk,Ns-Nk)
  106. %% Create comprehensive model of residual autocorrelation (to counter Eklund et al, 2012, Neuroimage)
  107. if PreWhiten
  108. T = (0:(Ns - 1))*TR; % time
  109. d = 2.^(floor(log2(TR/4)):log2(64)); % time constants (seconds)
  110. Q = {}; % dictionary of components
  111. for i = 1:length(d)
  112. for j = 0:1
  113. Q{end + 1} = toeplitz((T.^j).*exp(-T/d(i)));
  114. end
  115. end
  116. end
  117. %% Detect outliers in movement and/or data
  118. %M = detrend(M,0);
  119. %M(:,4:6)= M(:,4:6)*180/pi;
  120. if ~isfield(S,'GlobMove')
  121. try M = S.M; catch error('Need Nscans x 6 movement parameter matrix'); end
  122. if size(M,2) == 6
  123. dM = [zeros(1,6); diff(M,1,1)]; % First-order derivatives
  124. % Combine translations and rotations based on ArtRepair approximation for voxels 65mm from origin?
  125. %cdM = sqrt(sum(dM(:,1:3).^2,2) + 1.28*sum(dM(:,4:6).^2,2));
  126. dM(:,4:6) = dM(:,4:6)*50; % Approximate way of converting rotations to translations, assuming sphere radius 50mm (and rotations in radians) from Linda Geerligs
  127. cdM = sum(abs(dM),2);
  128. else
  129. error('If not user-specified global movement passed, then must pass 3 translations and 3 rotations')
  130. end
  131. else
  132. cdM = S.GlobMove;
  133. try M = S.M; catch M=[]; end
  134. end
  135. if ~isempty(SpikeMovAbsThr) % Absolute movement threshold
  136. % rms = sqrt(mean(dM(:,1:3).^2,2)); % if want translations only
  137. % aspk = find(rms > SpikeMovAbsThr);
  138. aspk = find(cdM > SpikeMovAbsThr);
  139. fprintf('%d spikes in absolute movement differences (based on threshold of %4.2f)\n',length(aspk),SpikeMovAbsThr)
  140. else
  141. aspk = [];
  142. end
  143. if ~isempty(SpikeMovRelThr) % Relative (SD) threshold for translation and rotation
  144. % rms = sqrt(mean(dM(:,1:3).^2,2));
  145. % rspk = find(rms > (mean(rms) + SpikeMovRelThr*std(rms)));
  146. % rms = sqrt(mean(dM(:,4:6).^2,2));
  147. % rspk = [rspk; find(rms > (mean(rms) + SpikeMovRelThr*std(rms)))];
  148. rspk = find(cdM > (mean(cdM) + SpikeMovRelThr*std(cdM)));
  149. fprintf('%d spikes in relative movement differences (based on threshold of %4.2f SDs)\n',length(rspk),SpikeMovRelThr)
  150. else
  151. rspk = [];
  152. end
  153. if ~isempty(SpikeDatRelThr) % Relative (SD) threshold across all ROIs (dangerous? Arbitrary?)
  154. dY = [zeros(1,Nr); diff(Y,1,1)];
  155. rms = sqrt(mean(dY.^2,2));
  156. dspk = find(rms > (mean(rms) + SpikeDatRelThr*std(rms)));
  157. fprintf('%d spikes in mean data across ROIs (based on threshold of %4.2f SDs)\n',length(dspk),SpikeDatRelThr)
  158. else
  159. dspk = [];
  160. end
  161. %% Create delta-function regressors for each spike
  162. spk = unique([aspk; rspk; dspk]); lspk = spk;
  163. for q = 2:SpikeLag
  164. lspk = [lspk; spk + (q-1)];
  165. end
  166. spk = unique(lspk);
  167. if ~isempty(spk)
  168. RSP = zeros(Ns,length(spk));
  169. n = 0;
  170. for p = 1:length(spk)
  171. if spk(p) <= Ns
  172. n=n+1;
  173. RSP(spk(p),n) = 1;
  174. end
  175. end
  176. fprintf('%d unique spikes in total\n',length(spk))
  177. RSP = spm_en(RSP,0);
  178. else
  179. RSP = [];
  180. end
  181. %% Create expansions of movement parameters
  182. % Standard differential + second-order expansion (a la Satterthwaite et al, 2012)
  183. % sM = []; for m=1:6; for n=m:6; sM = [sM M(:,m).*M(:,n)]; end; end % Second-order expansion
  184. % sdM = []; for m=1:6; for n=m:6; sdM = [sdM dM(:,m).*dM(:,n)]; end; end % Second-order expansion of derivatives
  185. % aM = [M dM sM sdM];
  186. % Above commented bits are subspace of more general Volterra expansion
  187. %U=[]; for c=1:6; U(c).u = M(:,c); U(c).name{1}=sprintf('m%d',c); end; [aM,aMname] = spm_Volterra(U,[1 0 0; 1 -1 0; 0 1 -1]',2);
  188. %U=[]; for c=1:6; U(c).u = M(:,c); U(c).name{1}=sprintf('m%d',c); end; [aM,aMname] = spm_Volterra(U,[1 0; 1 -1; 0 1]',2); %Only N and N+1 needed according to Satterthwaite et al 2013
  189. bf = eye(VolterraLag); % artifacts can last up to 5 TRs = 10s, according to Power et al (2013)
  190. % bf = [1 0 0 0 0; 1 1 0 0 0; 1 1 1 0 0; 1 1 1 1 0; 1 1 1 1 1]; % only leads to a few less modes below, and small compared to filter anyway!
  191. bf = [bf; diff(bf)];
  192. U=[]; for c=1:size(M,2); U(c).u = M(:,c); U(c).name{1}='c'; end; aM = spm_Volterra(U,bf',2);
  193. aM = spm_en(aM,0);
  194. %% Add Global? (Note: may be passed by User in S.C anyway)
  195. % (recommended by Rik and Power et al, 2013, though will entail negative
  196. % correlations, which can be problem for some graph-theoretic measures)
  197. if GlobalFlag
  198. C = [C mean(Y,2)];
  199. end
  200. C = spm_en(C,0);
  201. %% Combine all confounds (assumes more data than confounds, ie Ns > Nc) and perform dimension reduction (cf PCA of correlation matrix)
  202. %X0 = [C RSP K(:,2:end) aM]; % exclude constant term from K
  203. XM = spm_en(ones(Ns,1)); % constant term
  204. X1 = [XM K RSP]; % Regressors that don't want to SVD
  205. X0 = [aM C]; % Regressors that will SVD below
  206. %X1 = [XM K C RSP]; % Regressors that don't want to SVD
  207. %X0 = [aM]; % Regressors that will SVD below
  208. X0r = X0;
  209. if ~isempty(X0)
  210. R1 = eye(Ns) - X1*pinv(X1);
  211. X0 = R1*X0; % Project out of SVD-regressors what explained by non-SVD regressors!
  212. X0 = spm_en(X0,0);
  213. % Possible of course that some dimensions tiny part of SVD of X (so excluded) by happen to correlate highly with y...
  214. % ...could explore some L1 (eg LASSO) or L2 regularisation of over-parameterised model instead,
  215. % but LASSO takes ages (still working on possible L2 approach with spm_reml)
  216. if svd_thr < 1
  217. [U,S] = spm_svd(X0,0);
  218. S = diag(S).^2; S = full(cumsum(S)/sum(S));
  219. Np = find(S > svd_thr); Np = Np(1);
  220. X0r = full(U(:,1:Np));
  221. fprintf('%d SVD modes left (from %d original terms) - %4.2f%% variance of correlation explained\n',Np,size(X0,2),100*S(Np))
  222. end
  223. end
  224. X0r = [K RSP X0r XM]; % Reinsert mean
  225. Nc = size(X0r,2);
  226. if Nc >= Ns; error('Not enough dfs (scans) to estimate');
  227. else fprintf('%d confounds for %d scans (%d left)\n',Nc,Ns,Ns-Nc); end
  228. %% Create adjusted data, in case user wants for other metrics, eg, MI, and standardised data, if requested
  229. R = eye(Ns) - X0r*pinv(X0r);
  230. aY = R*Y;
  231. if StandardiseY
  232. Y = zscore(Y);
  233. else
  234. Y = Y/std(Y(:)); % Some normalisation necessary to avoid numerical underflow, eg in cov(Y') below
  235. end
  236. %% Pool data covariance over ROIs (assuming enough of them!), unless specified
  237. if isempty(CY) & PreWhiten
  238. CY = cov(Y'); % Correct to only do this after any standardisation?
  239. end
  240. %%%%%%%%%%%%%%%%%%%%%%%%%% Main Loop
  241. %% Do GLMs for all target ROIs for a given source ROI
  242. Ar = [1:Nr];
  243. Zmat = zeros(Nr); % Matrix of Z statistics for each pairwise regression
  244. Bmat = zeros(Nr);
  245. if pflag
  246. pZmat = zeros(Nr); % Matrix of Z statistics for each pairwise partial regression
  247. pBmat = zeros(Nr); % Matrix of Z statistics for each pairwise partial regression
  248. else
  249. pZmat = [];
  250. pBmat = [];
  251. end
  252. %[V h] = rik_reml(CY,X0r,Q,1,0,4); % if could assume that error did not depend on seed timeseries
  253. %W = spm_inv(spm_sqrtm(V));
  254. lNpc = 0; % Just for printing pflag output below
  255. for n = 1:Nr
  256. Ir = setdiff(Ar,n);
  257. Yr = Y(:,Ir); % Yr contains all other timeseries, so ANCOVA below run on Nr-2 timeseries in one go
  258. Xr = Y(:,n);
  259. % Xr = spm_en(Xr); % Normalise regressors so Betas can be compared directly across (seed) ROIs (not necessary if Standardised Y already)?
  260. X = [Xr X0r];
  261. % if lassoflag == 1 % takes too long (particularly for cross-validation to determine lambda)
  262. % for pn = 1:length(Ir)
  263. % Ir = setdiff(Ar,pn);
  264. %
  265. % Yr = Y(:,Ir); % Yr contains all other timeseries, so ANCOVA below run on Nr-2 timeseries in one go
  266. % Xr = Y(:,pn);
  267. % Xr = spm_en(Xr,0); % Normalise regressors so Betas can be compared directly across (seed) ROIs (not necessary is Standardised Y already)?
  268. %
  269. % fprintf('l');
  270. % [lB,lfit] = lasso(X0r,Yr(:,pn),'CV',10,'Options',opts);
  271. % keepX = find(lB(:,lfit.Index1SE));
  272. % X = [Xr X0r(:,keepX)];
  273. % Nc = length(keepX);
  274. %
  275. % [V h] = rik_reml(CY,X,Q,1,0,4); % rik_reml is just version of spm_reml with fprintf commented out to speed up
  276. % W = spm_inv(spm_sqrtm(V));
  277. %
  278. % %% Estimate T-value for regression of first column (seed timeseries)
  279. % [T(pn),dfall,Ball] = spm_ancova(W*X,speye(Ns,Ns),W*Yr(:,pn),[1 zeros(1,Nc)]');
  280. % df(pn) = dfall(2);
  281. % B(pn) = Ball(1);
  282. % end
  283. % fprintf('\n');
  284. % else
  285. %% Estimate autocorrelation of error (pooling across ROIs) and prewhitening matrix
  286. if PreWhiten
  287. [V h] = rik_reml(CY,X,Q,1,0,4); % rik_reml is just version of spm_reml with fprintf commented out to speed up
  288. W = spm_inv(spm_sqrtm(V));
  289. else
  290. W = speye(Ns);
  291. end
  292. %% Estimate T-value for regression of first column (seed timeseries)
  293. [T,df,B] = spm_ancova(W*X,speye(Ns,Ns),W*Yr,[1 zeros(1,Nc)]');
  294. try
  295. Zmat(n,Ir) = norminv(spm_Tcdf(T,df(2))); % Needs Matlab Stats toolbox, but has larger range of Z (so not so many "Inf"s)
  296. catch
  297. Zmat(n,Ir) = spm_invNcdf(spm_Tcdf(T,df(2)));
  298. end
  299. Bmat(n,Ir) = B(1,:);
  300. %% Estimate T-value for PARTIAL regression of first column (seed timeseries) - takes ages!
  301. if pflag
  302. for pn = 1:length(Ir)
  303. pIr = setdiff(Ar,[n Ir(pn)]);
  304. pY = spm_en(Y(:,pIr),0); % Is necessary for SVD below
  305. % SVD
  306. if svd_thr < 1
  307. [U,S] = spm_svd([pY X0],0);
  308. S = diag(S).^2; S = full(cumsum(S)/sum(S));
  309. Np = find(S > svd_thr); Np = Np(1);
  310. XY0 = full(U(:,1:Np));
  311. Npc = Np;
  312. else
  313. XY0 = [pY X0];
  314. end
  315. XY0 = [XY0 ones(Ns,1)]; % Reinsert mean
  316. Npc = size(XY0,2);
  317. % if lassoflag == 1
  318. % fprintf('l')
  319. % [lB,lfit] = lasso(XY0,Yr(:,pn),'CV',10,'Options',opts);
  320. % keepX = find(lB(:,lfit.Index1SE));
  321. % X = [Xr XY0(:,keepX)];
  322. % Nc = length(keepX);
  323. %
  324. % [V h] = rik_reml(CY,X,Q,1,0,4); % rik_reml is just version of spm_reml with fprintf commented out to speed up
  325. % W = spm_inv(spm_sqrtm(V));
  326. %
  327. % %% Estimate T-value for regression of first column (seed timeseries)
  328. % [T,df,B] = spm_ancova(W*X,speye(Ns,Ns),W*Yr(:,pn),[1 zeros(1,Nc)]');
  329. % else
  330. if Npc >= (Ns-1) % -1 because going to add Xr below
  331. warning('Not enough dfs (scans) to estimate - just adjusting data and ignoring loss of dfs');
  332. R = eye(Ns) - pY*pinv(pY); % Residual-forming matrix
  333. [T,df,B] = spm_ancova(W*X,speye(Ns,Ns),R*W*Yr(:,pn),[1 zeros(1,Npc)]'); % Ok to assume error and hence W unaffected by addition of pY in X?
  334. else
  335. if lNpc ~= Npc % Just to reduce time taken to print to screen
  336. fprintf(' partial for seed region %d and target region %d: %d confounds for %d scans (%d left)\n',n,pn,Npc,Ns,Ns-Npc);
  337. end
  338. lNpc = Npc;
  339. X = [Xr XY0];
  340. %% Commented out below because ok to assume error and hence W unaffected by addition of pY in X?
  341. % [V h] = rik_reml(CY,X,Q,1,0,4); % rik_reml is just version of spm_reml with fprintf commented out to speed up
  342. % W = spm_inv(spm_sqrtm(V));
  343. %% Estimate T-value for regression of first column (seed timeseries)
  344. [T,df,B] = spm_ancova(W*X,speye(Ns,Ns),W*Yr(:,pn),[1 zeros(1,Npc)]');
  345. end
  346. try
  347. pZmat(n,Ir(pn)) = norminv(spm_Tcdf(T,df(2)));
  348. catch
  349. pZmat(n,Ir(pn)) = spm_invNcdf(spm_Tcdf(T,df(2)));
  350. end
  351. pBmat(n,Ir(pn)) = B(1);
  352. end
  353. end
  354. fprintf('.')
  355. end
  356. fprintf('\n')
  357. return
  358. %figure,imagesc(Zmat); colorbar
  359. %figure,imagesc(pZmat); colorbar
  360. function [V,h,Ph,F,Fa,Fc] = rik_reml(YY,X,Q,N,D,t,hE,hP)
  361. % ReML estimation of [improper] covariance components from y*y'
  362. % FORMAT [C,h,Ph,F,Fa,Fc] = rik_reml(YY,X,Q,N,D,t,hE,hP);
  363. %
  364. % YY - (m x m) sample covariance matrix Y*Y' {Y = (m x N) data matrix}
  365. % X - (m x p) design matrix
  366. % Q - {1 x q} covariance components
  367. %
  368. % N - number of samples (default 1)
  369. % D - Flag for positive-definite scheme (default 0)
  370. % t - regularisation (default 4)
  371. % hE - hyperprior (default 0)
  372. % hP - hyperprecision (default 1e-16)
  373. %
  374. % C - (m x m) estimated errors = h(1)*Q{1} + h(2)*Q{2} + ...
  375. % h - (q x 1) ReML hyperparameters h
  376. % Ph - (q x q) conditional precision of h
  377. %
  378. % F - [-ve] free energy F = log evidence = p(Y|X,Q) = ReML objective
  379. %
  380. % Fa - accuracy
  381. % Fc - complexity (F = Fa - Fc)
  382. %
  383. % Performs a Fisher-Scoring ascent on F to find ReML variance parameter
  384. % estimates.
  385. %
  386. % see also: spm_reml_sc for the equivalent scheme using log-normal
  387. % hyperpriors
  388. %__________________________________________________________________________
  389. %
  390. % SPM ReML routines:
  391. %
  392. % spm_reml: no positivity constraints on covariance parameters
  393. % spm_reml_sc: positivity constraints on covariance parameters
  394. % spm_sp_reml: for sparse patterns (c.f., ARD)
  395. %
  396. %__________________________________________________________________________
  397. % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
  398. % John Ashburner & Karl Friston
  399. % $Id: spm_reml.m 5223 2013-02-01 11:56:05Z ged $
  400. % Modified by Rik to remove screen output and turn off warnings
  401. % check defaults
  402. %--------------------------------------------------------------------------
  403. try, N; catch, N = 1; end % assume a single sample if not specified
  404. try, K; catch, K = 32; end % default number of iterations
  405. try, D; catch, D = 0; end % default checking
  406. try, t; catch, t = 4; end % default regularisation
  407. try, hE; catch, hE = 0; end % default hyperprior
  408. try, hP; catch, hP = 1e-16; end % default hyperprecision
  409. % catch NaNs
  410. %--------------------------------------------------------------------------
  411. W = Q;
  412. q = find(all(isfinite(YY)));
  413. YY = YY(q,q);
  414. for i = 1:length(Q)
  415. Q{i} = Q{i}(q,q);
  416. end
  417. % dimensions
  418. %--------------------------------------------------------------------------
  419. n = length(Q{1});
  420. m = length(Q);
  421. % ortho-normalise X
  422. %--------------------------------------------------------------------------
  423. if isempty(X)
  424. X = sparse(n,0);
  425. else
  426. X = spm_svd(X(q,:),0);
  427. end
  428. % initialise h and specify hyperpriors
  429. %==========================================================================
  430. h = zeros(m,1);
  431. for i = 1:m
  432. h(i,1) = any(diag(Q{i}));
  433. end
  434. hE = sparse(m,1) + hE;
  435. hP = speye(m,m)*hP;
  436. dF = Inf;
  437. D = 8*(D > 0);
  438. warning off
  439. % ReML (EM/VB)
  440. %--------------------------------------------------------------------------
  441. for k = 1:K
  442. % compute current estimate of covariance
  443. %----------------------------------------------------------------------
  444. C = sparse(n,n);
  445. for i = 1:m
  446. C = C + Q{i}*h(i);
  447. end
  448. % positive [semi]-definite check
  449. %----------------------------------------------------------------------
  450. for i = 1:D
  451. if min(real(eig(full(C)))) < 0
  452. % increase regularisation and re-evaluate C
  453. %--------------------------------------------------------------
  454. t = t - 1;
  455. h = h - dh;
  456. dh = spm_dx(dFdhh,dFdh,{t});
  457. h = h + dh;
  458. C = sparse(n,n);
  459. for i = 1:m
  460. C = C + Q{i}*h(i);
  461. end
  462. else
  463. break
  464. end
  465. end
  466. % E-step: conditional covariance cov(B|y) {Cq}
  467. %======================================================================
  468. iC = spm_inv(C);
  469. iCX = iC*X;
  470. if ~isempty(X)
  471. Cq = spm_inv(X'*iCX);
  472. else
  473. Cq = sparse(0);
  474. end
  475. % M-step: ReML estimate of hyperparameters
  476. %======================================================================
  477. % Gradient dF/dh (first derivatives)
  478. %----------------------------------------------------------------------
  479. P = iC - iCX*Cq*iCX';
  480. U = speye(n) - P*YY/N;
  481. for i = 1:m
  482. % dF/dh = -trace(dF/diC*iC*Q{i}*iC)
  483. %------------------------------------------------------------------
  484. PQ{i} = P*Q{i};
  485. dFdh(i,1) = -spm_trace(PQ{i},U)*N/2;
  486. end
  487. % Expected curvature E{dF/dhh} (second derivatives)
  488. %----------------------------------------------------------------------
  489. for i = 1:m
  490. for j = i:m
  491. % dF/dhh = -trace{P*Q{i}*P*Q{j}}
  492. %--------------------------------------------------------------
  493. dFdhh(i,j) = -spm_trace(PQ{i},PQ{j})*N/2;
  494. dFdhh(j,i) = dFdhh(i,j);
  495. end
  496. end
  497. % add hyperpriors
  498. %----------------------------------------------------------------------
  499. e = h - hE;
  500. dFdh = dFdh - hP*e;
  501. dFdhh = dFdhh - hP;
  502. % Fisher scoring: update dh = -inv(ddF/dhh)*dF/dh
  503. %----------------------------------------------------------------------
  504. dh = spm_dx(dFdhh,dFdh,{t});
  505. h = h + dh;
  506. % predicted change in F - increase regularisation if increasing
  507. %----------------------------------------------------------------------
  508. pF = dFdh'*dh;
  509. if pF > dF
  510. t = t - 1;
  511. else
  512. t = t + 1/4;
  513. end
  514. % revert to SPD checking, if near phase-transition
  515. %----------------------------------------------------------------------
  516. if ~isfinite(pF) || abs(pF) > 1e6
  517. [V,h,Ph,F,Fa,Fc] = rik_reml(YY,X,Q,N,1,t - 2);
  518. return
  519. else
  520. dF = pF;
  521. end
  522. % Convergence (1% change in log-evidence)
  523. %======================================================================
  524. % fprintf('%s %-23d: %10s%e [%+3.2f]\n',' ReML Iteration',k,'...',full(pF),t);
  525. % final estimate of covariance (with missing data points)
  526. %----------------------------------------------------------------------
  527. if dF < 1e-1, break, end
  528. end
  529. % re-build predicted covariance
  530. %==========================================================================
  531. V = 0;
  532. for i = 1:m
  533. V = V + W{i}*h(i);
  534. end
  535. % check V is positive semi-definite (if not already checked)
  536. %==========================================================================
  537. if ~D
  538. if min(eig(V)) < 0
  539. [V,h,Ph,F,Fa,Fc] = rik_reml(YY,X,Q,N,1,2,hE(1),hP(1));
  540. return
  541. end
  542. end
  543. % log evidence = ln p(y|X,Q) = ReML objective = F = trace(R'*iC*R*YY)/2 ...
  544. %--------------------------------------------------------------------------
  545. Ph = -dFdhh;
  546. if nargout > 3
  547. % tr(hP*inv(Ph)) - nh + tr(pP*inv(Pp)) - np (pP = 0)
  548. %----------------------------------------------------------------------
  549. Ft = trace(hP*inv(Ph)) - length(Ph) - length(Cq);
  550. % complexity - KL(Ph,hP)
  551. %----------------------------------------------------------------------
  552. Fc = Ft/2 + e'*hP*e/2 + spm_logdet(Ph*inv(hP))/2 - N*spm_logdet(Cq)/2;
  553. % Accuracy - ln p(Y|h)
  554. %----------------------------------------------------------------------
  555. Fa = Ft/2 - trace(C*P*YY*P)/2 - N*n*log(2*pi)/2 - N*spm_logdet(C)/2;
  556. % Free-energy
  557. %----------------------------------------------------------------------
  558. F = Fa - Fc;
  559. end
  560. warning on
  561. function [C] = spm_trace(A,B)
  562. % fast trace for large matrices: C = spm_trace(A,B) = trace(A*B)
  563. % FORMAT [C] = spm_trace(A,B)
  564. %
  565. % C = spm_trace(A,B) = trace(A*B) = sum(sum(A'.*B));
  566. %__________________________________________________________________________
  567. % Copyright (C) 2008 Wellcome Trust Centre for Neuroimaging
  568. % Karl Friston
  569. % $Id: spm_trace.m 4805 2012-07-26 13:16:18Z karl $
  570. % fast trace for large matrices: C = spm_trace(A,B) = trace(A*B)
  571. %--------------------------------------------------------------------------
  572. C = sum(sum(A'.*B));

rsfMRI_GLM.m at commit f8b948f, under GPL-3.0 · at the source

Overview

Authors: Kamen A Tsvetanov1,2, Maura Malpetti1,3, P Simon Jones1, Timothy Rittman1, David J Whiteside1, Alexander G Murley1, Richard Bethlehem4, Casey Paquola5, Enrico Premi6, Arabella Bouzigues7, Lucy L Russell7, Phoebe H Foster7, Eve Ferry-Bolder7, John C van Swieten8, Lize C Jiskoot8, Harro Seelaar8, Raquel Sanchez-Valle9, Robert Laforce10, Caroline Graff11,12, Daniela Galimberti13,14
and 22 other authorsRik Vandenberghe15,16,17, Alexandre de Mendonça18, Pietro Tiraboschi19, Isabel Santana20,21, Alexander Gerhard22,23,24, Johannes Levin25,26,27, Sandro Sorbi28,29, Markus Otto30, Maxime Bertoux31, Thibaud Lebouvier31, Simon Ducharme32,33, Chris R Butler34,35, Isabelle Le Ber36,37,38, Elizabeth Finger39, Maria Carmela Tartaglia40, Mario Masellis41, Matthis Synofzik42,43, Fermin Moreno44,45,46, Barbara Borroni47,48, Jonathan D Rohrer7, James B Rowe1,49, the Genetic FTD Initiative, GENFI
49 affiliations
  1. Department of Clinical Neurosciences and Cambridge University Hospitals NHS Trust, University of Cambridge, Cambridge CB23 3EB, UK
  2. Department of Psychology, University of Cambridge, Cambridge CB2 1NF, UK
  3. UK Dementia Research Institute, University of Cambridge, Cambridge CB2 0AH, UK
  4. Department of Psychiatry, University of Cambridge, Cambridge CB2 8AH, UK
  5. Institute for Neuroscience and Medicine, INM-7, Forschungszentrum Jülich, Jülich 52428, Germany
  6. Neurology, Department of Neurological and Vision Sciences, ASST Spedali Civili, Brescia 25123, Italy
  7. Dementia Research Centre, Department of Neurodegenerative Disease, UCL Queen Square Institute of Neurology, London WC1E 6BT, UK
  8. Department of Neurology, Erasmus Medical Centre, Rotterdam 3015 GD, Netherlands
  9. Alzheimer’s Disease and Other Cognitive Disorders Unit, Neurology Service, Hospital Clínic, Institut d’Investigacións Biomèdiques August Pi I Sunyer, University of Barcelona, Barcelona 08036, Spain
  10. Clinique Interdisciplinaire de Mémoire, Département des Sciences Neurologiques, CHU de Québec, and Faculté de Médecine, Université Laval, Québec, QC G1V 4G2, Canada
  11. Department of Neurobiology, Care Sciences and Society; Center for Alzheimer Research, Division of Neurogeriatrics, Bioclinicum, Karolinska Institutet, Solna 171 65, Sweden
  12. Unit for Hereditary Dementias, Theme Inflammation and Aging, Karolinska University Hospital, Solna SE-17176, Sweden
  13. Fondazione Ca’ Granda, IRCCS Ospedale Policlinico, Milan 20122, Italy
  14. University of Milan, Centro Dino Ferrari, Milan 20122, Italy
  15. Laboratory for Cognitive Neurology, Department of Neurosciences, KU Leuven, Leuven 3001, Belgium
  16. Neurology Service, University Hospitals Leuven, Leuven 3000, Belgium
  17. Leuven Brain Institute, KU Leuven, Leuven 3000, Belgium
  18. Faculty of Medicine, University of Lisbon, Lisbon 1649-028, Portugal
  19. Fondazione IRCCS Istituto Neurologico Carlo Besta, Milano 20133, Italy
  20. University Hospital of Coimbra (HUC), Neurology Service, Faculty of Medicine, University of Coimbra, Coimbra 3004-531, Portugal
  21. Center for Neuroscience and Cell Biology, Faculty of Medicine, University of Coimbra, Coimbra 3004-531, Portugal
  22. Division of Psychology Communication and Human Neuroscience, Wolfson Molecular Imaging Centre, University of Manchester, Manchester M20 3LJ, UK
  23. Department of Nuclear Medicine, Center for Translational Neuro- and Behavioral Sciences, University Medicine Essen, Essen 45147, Germany
  24. Department of Geriatric Medicine, Klinikum Hochsauerland, Arnsberg 59755, Germany
  25. Department of Neurology, Ludwig-Maximilians Universität München, Munich 80802, Germany
  26. German Center for Neurodegenerative Diseases (DZNE), Munich 81377, Germany
  27. Munich Cluster of Systems Neurology (SyNergy), Munich 81377, Germany
  28. Department of Neurofarba, University of Florence, Florence 50139, Italy
  29. IRCCS Fondazione Don Carlo Gnocchi, Florence 50139, Italy
  30. Department of Neurology, University of Ulm, Ulm 89081, Germany
  31. Lille Neuroscience & Cognition U1172, University of Lille, Inserm, CHU Lille, Lille 59000, France
  32. Douglas Mental Health University Institute, Department of Psychiatry, McGill University, Montreal, QC H4H 1R3, Canada
  33. McConnell Brain Imaging Centre, Montreal Neurological Institute, McGill University, Montreal, QC H4H 1R3, Canada
  34. Nuffield Department of Clinical Neurosciences, Medical Sciences Division, University of Oxford, Oxford OX3 7JX, UK
  35. Department of Brain Sciences, Imperial College London, London SW7 2AZ, UK
  36. Sorbonne Université, Paris Brain Institute – Institut du Cerveau – ICM, Inserm U1127, CNRS UMR 7225, AP-HP - Hôpital Pitié-Salpêtrière, Paris 75013, France
  37. Centre de référence des démences rares ou précoces, IM2A, Département de Neurologie, AP-HP - Hôpital Pitié-Salpêtrière, Paris 75013, France
  38. Département de Neurologie, AP-HP - Hôpital Pitié-Salpêtrière, Paris 75013, France
  39. Department of Clinical Neurological Sciences, University of Western Ontario, London, ON, Canada N6A 3K7
  40. Tanz Centre for Research in Neurodegenerative Diseases, University of Toronto, Toronto, ON, Canada M5T 0S8
  41. Sunnybrook Health Sciences Centre, Sunnybrook Research Institute, University of Toronto, Toronto, ON, Canada M5T 2S8
  42. Department of Neurodegenerative Diseases, Hertie-Institute for Clinical Brain Research and Center of Neurology, University of Tübingen, Tübingen 72076, Germany
  43. Center for Neurodegenerative Diseases (DZNE), Tübingen 72076, Germany
  44. Cognitive Disorders Unit, Department of Neurology, Hospital Universitario Donostia, San Sebastian 20014, Spain
  45. Neurosciences Area, Group of Neurodegenerative Diseases, Biogipuzkoa Health Research Institute, San Sebastian 20014, Spain
  46. Center for Biomedical Research in Neurodegenerative Disease (CIBERNED), Carlos III Health Institute, Madrid 28029, Spain
  47. Department of Clinical and Experimental Sciences, University of Brescia, Brescia 15-25121, Italy
  48. Molecular Markers Laboratory, IRCCS Istituto Centro San Giovanni di Dio Fatebenefratelli, Brescia 15-25121, Italy
  49. MRC Cognition and Brain Science Unit, Department of Psychiatry, University of Cambridge, Cambridge CB2 7EF, UK
Institutions: University of Cambridge (United Kingdom); UK Dementia Research Institute (United Kingdom); Forschungszentrum Jülich (Germany); Azienda Socio Sanitaria Territoriale degli Spedali Civili di Brescia (Italy); UCL Queen Square Institute of Neurology (United Kingdom); University College London (United Kingdom); Erasmus MC (Netherlands); Hospital Clínic de Barcelona (Spain); Universitat de Barcelona (Spain); Centre hospitalier universitaire de Québec (Canada); Université Laval (Canada); Karolinska University Hospital (Sweden); Karolinska Institutet (Sweden); University of Milan (Italy); Fondazione IRCCS Ca' Granda Ospedale Maggiore Policlinico (Italy); Universitair Ziekenhuis Leuven (Belgium); KU Leuven (Belgium); University of Lisbon (Portugal); Fondazione IRCCS Istituto Neurologico Carlo Besta (Italy); Hospitais da Universidade de Coimbra (Portugal); University of Coimbra (Portugal); University of Manchester (United Kingdom); Klinikum Arnsberg (Germany); Stiftung Universitätsmedizin Essen (Germany); University of Duisburg-Essen (Germany); German Center for Neurodegenerative Diseases (Germany); Munich Cluster for Systems Neurology (Germany); Ludwig-Maximilians-Universität München (Germany); University of Florence (Italy); Universität Ulm (Germany); Inserm (France); Université de Lille (France); Centre Hospitalier Universitaire de Lille (France); Lille Neurosciences & Cognition (France); Montreal Neurological Institute and Hospital (Canada); Douglas Mental Health University Institute (Canada); McGill University (Canada); University of Oxford (United Kingdom); Imperial College London (United Kingdom); Centre National de la Recherche Scientifique (France); Sorbonne Université (France); Assistance Publique – Hôpitaux de Paris (France); Pitié-Salpêtrière Hospital (France); Institut du Cerveau (France); Western University (Canada); University of Toronto (Canada); Sunnybrook Health Science Centre (Canada); Sunnybrook Research Institute; Hertie Institute for Clinical Brain Research (Germany); University of Tübingen (Germany); Instituto de Salud Carlos III (Spain); Biomedical Research Networking Center on Neurodegenerative Diseases (Spain); Biogipuzkoa Health Research Institute (Spain); Donostiako Unibertsitate Ospitalea (Spain); Centro San Giovanni di Dio Fatebenefratelli (Italy); University of Brescia (Italy); MRC Cognition and Brain Sciences Unit (United Kingdom)
Journal: Brain : a journal of neurology, volume 149, issue 8, pages 2831-2849
Dates: received 26 February 2025; accepted 17 October 2025; published online 24 November 2025; in print August 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1093/brain/awaf443 · PMID 41277710 · PMCID PMC13431775 · OpenAlex W4416624843
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), fMRI (modality), human (organism), Alzheimer's / dementia (population)
Methods: Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Machine learning, Connectivity, fMRI & imaging, Preprocessing
Keywords: resilience, frontotemporal dementia (FTD), familial, presymptomatic, functional magnetic resonance imaging (fMRI), network connectivity
MeSH: Brain*, Frontotemporal Dementia*, Adult, Aged, Atrophy, Cognition, Connectome, Female, Humans, Magnetic Resonance Imaging, Male, Middle Aged, Prodromal Symptoms (* major topic)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Alzheimer's Society (602); Medical Research Council (SUAG/051G101400, SUAG/010 RG91365); Addenbrookes Charitable Trust, Cambridge University Hospitals; Guarantors of Brain (G101149); National Institute for Health Research (NIHR) (NIHR203312); NIHR BioResource (RG94028, RG85445); Wellcome Trust (220258); Dutch Research Council (NWO) (056-13-018); Alzheimer’s Research UK (ARUK-RADF2021A-010); Holt Fellowship; NIHR Cambridge Biomedical Research Centre (NIHR203312, BRC-1215-20014)
Citations: not cited yet (Europe PMC); 159 references in the paper

Abstract

Frontotemporal dementia (FTD) shows autosomal dominant transmission in up to a third of families, enabling the study of presymptomatic and prodromal phases. Despite self-reported well-being and normal daily cognitive functioning, brain structural changes are evident a decade or more before the expected onset of disease. This divergence between cognitive function and brain structure contrasts with the coupling of structural and functional decline after symptom onset. In healthy ageing, it has been shown that functional connectivity is a better predictor of cognitive function than volumetric structural imaging. We previously proposed that in the presymptomatic phase of genetic FTD, the maintenance of brain functional network integrity enables carriers of pathogenic variants to sustain cognitive performance. However, prior work has focused on a small number of, often predefined, networks. This provides a limited and potentially biased characterization of the substrates and moderators of brain network integration.

Here, we test the hypothesis that brain-wide functional integration in FTD determines resilience to progressive pathology before symptom onset. We assess functional connectome integration in 289 presymptomatic carriers of pathogenic variants associated with FTD using functional MRI in relation to cognition and contrast with 271 family members without pathogenic variants. Because structural atrophy, functional integration and cognitive profiles are multivariate, we used canonical correlation models, supplemented by multiple linear regression models for each imaging modality.

We confirmed progressive atrophy and normal cognitive function in presymptomatic carriers compared to non-carriers. Notably, functional integration was preserved in presymptomatic carriers across age, while it declined in familial non-carriers. The strongest effects were observed in cognitive control networks. The changes in functional integration in presymptomatic carriers were behaviourally relevant and independent of the severity of atrophy, suggesting a resilience mechanism in those at risk of dementia. To generate hypotheses about the genetic and neurometabolic basis of resilience, we assessed the spatial overlap between behaviourally-relevant functional integration maps and gene transcription profiles. These spatial correlations suggested resilience signatures to glial cell composition (astrocytes, microglia, oligodendrocytes), revealing cellular mechanisms inaccessible to standard neuroimaging.

Our findings suggest that resilience to atrophy is associated with enhanced functional integration, protecting against clinical conversion for many years in individuals at risk of dementia. This result has implications for the design of presymptomatic disease-modifying therapy trials and gives hope for therapeutic strategies aimed at enhancing resilience and ability to maintain function despite the presence of genetically determined neuropathology.

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

Repositories

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

kamentsvetanov/functional_resilience_ftd

License: GPL-3.0
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 801b08a0fd3c96bb0b4d9516a46f01106af522ea, 26 September 2025
Size: 2 files, 0 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 26 September 2026: the link answers
  • 26 September 2026: the link answers
2 files

mrc-cbu/riksneurotools

License: GPL-3.0
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: f8b948f0dd465a1af2deedebd050b195ec077a83, 26 January 2026
Languages: MATLAB (17)
Size: 19 files, 17 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (13 files), Statistics and Machine Learning Toolbox (9 files), EEGLAB (1 file), fdr_bh (Benjamini-Hochberg FDR) (1 file), FieldTrip (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
19 files

frantisekvasa/rotate_parcellation

License: MIT
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 65673ea7f47fca36b2982df669fc649b9a4bc5da, 29 June 2023
Languages: MATLAB (3), R (2)
Size: 9 files, 5 scripts
Software Heritage: archived
Found in: “Data availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: FreeSurfer (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
7 files

BMHLab/AHBAprocessing

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 464553aa7882a260547f14d26e869ff314c7dfa5, 23 November 2021
Languages: MATLAB (238), C/C++ (89), C++ (50), C (7), Shell (1)
Size: 450 files, 385 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, tests
Not found: license file, CITATION.cff, environment file, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
386 files

netneurolab/hansen_genescognition

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: bdffc4b22c08bc69530b6b67baa7875ab1b82f77, 22 September 2022
Languages: MATLAB (8)
Size: 34 files, 8 scripts
Software Heritage: archived
Found in: “Data availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
9 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:

  • 5 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 415 scripts, each with its path and the digest of its content;
  • 6 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data availability

Data were acquired from GENFI data freeze 5. Anonymized data not published within this article will be made available by request from any qualified investigator and can be requested via the GENFI website (https://www.genfi.org/contact-us-2) or via Dementias Platform UK (https://portal.dementiasplatform.uk/Apply). Code and composite data to reproduce manuscript figures and statistical analyses were made available at https://github.com/kamentsvetanov/functional_resilience_ftd. Surface-based analysis of anatomical images were performed in FreeSurfer.61 Resting-state fMRI data were pre-processed using FSL pipelines58,59 and modules which called relevant functions from SPM12.60 Post-processing was based on a GLM-like approach34 available at https://github.com/MRC-CBU/riksneurotools/blob/master/GLM/. Visualization of neuro-imaging results was in MRIcroGL and BrainSpace, while ridgeline plots generated using R-based ggridges and ggplot2 (10.32614/CRAN.package.ggridges).158,159 Spin permutations used code available at https://github.com/frantisekvasa/rotate_parcellation. Fully-pre-processed transcriptomic data were available at https://figshare.com/articles/dataset/AHBAdata/6852911 and https://github.com/BMHLab/AHBAprocessing. The molecular atlas of the human brain vasculature was made available previously.107 Code for cell-type decomposition analysis was available at https://github.com/netneurolab/hansen_genescognition.

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

Recorded: type, language, journal, volume, issue, pages, dates, 42 authors, 6 keywords, 13 MeSH terms, 11 funders, 143 references.

Cite

This paper

Tsvetanov, K. A., Malpetti, M., Jones, P. S., Rittman, T., Whiteside, D. J., Murley, A. G., Bethlehem, R., Paquola, C., Premi, E., Bouzigues, A., Russell, L. L., Foster, P. H., Ferry-Bolder, E., van Swieten, J. C., Jiskoot, L. C., Seelaar, H., Sanchez-Valle, R., Laforce, R., Graff, C., . . . the Genetic FTD Initiative, GENFI. (2026). Cellular signatures underlying functional resilience in presymptomatic frontotemporal dementia. Brain : a journal of neurology, 149(8), 2831-2849. https://doi.org/10.1093/brain/awaf443

BibTeX

@article{tsvetanov2026cellular,
author = {Tsvetanov, Kamen A and Malpetti, Maura and Jones, P Simon and Rittman, Timothy and Whiteside, David J and Murley, Alexander G and Bethlehem, Richard and Paquola, Casey and Premi, Enrico and Bouzigues, Arabella and Russell, Lucy L and Foster, Phoebe H and Ferry-Bolder, Eve and van Swieten, John C and Jiskoot, Lize C and Seelaar, Harro and Sanchez-Valle, Raquel and Laforce, Robert and Graff, Caroline and Galimberti, Daniela and Vandenberghe, Rik and de Mendonça, Alexandre and Tiraboschi, Pietro and Santana, Isabel and Gerhard, Alexander and Levin, Johannes and Sorbi, Sandro and Otto, Markus and Bertoux, Maxime and Lebouvier, Thibaud and Ducharme, Simon and Butler, Chris R and Le Ber, Isabelle and Finger, Elizabeth and Tartaglia, Maria Carmela and Masellis, Mario and Synofzik, Matthis and Moreno, Fermin and Borroni, Barbara and Rohrer, Jonathan D and Rowe, James B and {the Genetic FTD Initiative, GENFI}},
title = {{Cellular signatures underlying functional resilience in presymptomatic frontotemporal dementia}},
journal = {Brain : a journal of neurology},
year = {2026},
month = aug,
volume = {149},
number = {8},
pages = {2831--2849},
publisher = {Oxford University Press},
issn = {0006-8950},
doi = {10.1093/brain/awaf443},
url = {https://doi.org/10.1093/brain/awaf443},
pmid = {41277710},
pmcid = {PMC13431775}
}

RIS

TY - JOUR
AU - Tsvetanov, Kamen A
AU - Malpetti, Maura
AU - Jones, P Simon
AU - Rittman, Timothy
AU - Whiteside, David J
AU - Murley, Alexander G
AU - Bethlehem, Richard
AU - Paquola, Casey
AU - Premi, Enrico
AU - Bouzigues, Arabella
AU - Russell, Lucy L
AU - Foster, Phoebe H
AU - Ferry-Bolder, Eve
AU - van Swieten, John C
AU - Jiskoot, Lize C
AU - Seelaar, Harro
AU - Sanchez-Valle, Raquel
AU - Laforce, Robert
AU - Graff, Caroline
AU - Galimberti, Daniela
AU - Vandenberghe, Rik
AU - de Mendonça, Alexandre
AU - Tiraboschi, Pietro
AU - Santana, Isabel
AU - Gerhard, Alexander
AU - Levin, Johannes
AU - Sorbi, Sandro
AU - Otto, Markus
AU - Bertoux, Maxime
AU - Lebouvier, Thibaud
AU - Ducharme, Simon
AU - Butler, Chris R
AU - Le Ber, Isabelle
AU - Finger, Elizabeth
AU - Tartaglia, Maria Carmela
AU - Masellis, Mario
AU - Synofzik, Matthis
AU - Moreno, Fermin
AU - Borroni, Barbara
AU - Rohrer, Jonathan D
AU - Rowe, James B
AU - the Genetic FTD Initiative, GENFI
TI - Cellular signatures underlying functional resilience in presymptomatic frontotemporal dementia
T2 - Brain : a journal of neurology
J2 - Brain
PY - 2026
DA - 2026/08/01
VL - 149
IS - 8
SP - 2831
EP - 2849
SN - 0006-8950
PB - Oxford University Press
DO - 10.1093/brain/awaf443
UR - https://doi.org/10.1093/brain/awaf443
LA - en
ER -

CSL-JSON

{
"id": "10.1093/brain/awaf443",
"type": "article-journal",
"title": "Cellular signatures underlying functional resilience in presymptomatic frontotemporal dementia",
"container-title": "Brain : a journal of neurology",
"author": [
{
"family": "Tsvetanov",
"given": "Kamen A"
},
{
"family": "Malpetti",
"given": "Maura"
},
{
"family": "Jones",
"given": "P Simon"
},
{
"family": "Rittman",
"given": "Timothy"
},
{
"family": "Whiteside",
"given": "David J"
},
{
"family": "Murley",
"given": "Alexander G"
},
{
"family": "Bethlehem",
"given": "Richard"
},
{
"family": "Paquola",
"given": "Casey"
},
{
"family": "Premi",
"given": "Enrico"
},
{
"family": "Bouzigues",
"given": "Arabella"
},
{
"family": "Russell",
"given": "Lucy L"
},
{
"family": "Foster",
"given": "Phoebe H"
},
{
"family": "Ferry-Bolder",
"given": "Eve"
},
{
"family": "van Swieten",
"given": "John C"
},
{
"family": "Jiskoot",
"given": "Lize C"
},
{
"family": "Seelaar",
"given": "Harro"
},
{
"family": "Sanchez-Valle",
"given": "Raquel"
},
{
"family": "Laforce",
"given": "Robert"
},
{
"family": "Graff",
"given": "Caroline"
},
{
"family": "Galimberti",
"given": "Daniela"
},
{
"family": "Vandenberghe",
"given": "Rik"
},
{
"family": "de Mendonça",
"given": "Alexandre"
},
{
"family": "Tiraboschi",
"given": "Pietro"
},
{
"family": "Santana",
"given": "Isabel"
},
{
"family": "Gerhard",
"given": "Alexander"
},
{
"family": "Levin",
"given": "Johannes"
},
{
"family": "Sorbi",
"given": "Sandro"
},
{
"family": "Otto",
"given": "Markus"
},
{
"family": "Bertoux",
"given": "Maxime"
},
{
"family": "Lebouvier",
"given": "Thibaud"
},
{
"family": "Ducharme",
"given": "Simon"
},
{
"family": "Butler",
"given": "Chris R"
},
{
"family": "Le Ber",
"given": "Isabelle"
},
{
"family": "Finger",
"given": "Elizabeth"
},
{
"family": "Tartaglia",
"given": "Maria Carmela"
},
{
"family": "Masellis",
"given": "Mario"
},
{
"family": "Synofzik",
"given": "Matthis"
},
{
"family": "Moreno",
"given": "Fermin"
},
{
"family": "Borroni",
"given": "Barbara"
},
{
"family": "Rohrer",
"given": "Jonathan D"
},
{
"family": "Rowe",
"given": "James B"
},
{
"literal": "the Genetic FTD Initiative, GENFI"
}
],
"container-title-short": "Brain",
"volume": "149",
"issue": "8",
"page": "2831-2849",
"DOI": "10.1093/brain/awaf443",
"PMID": "41277710",
"PMCID": "PMC13431775",
"ISSN": "0006-8950",
"publisher": "Oxford University Press",
"URL": "https://doi.org/10.1093/brain/awaf443",
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
1
]
]
}
}

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: EEGLAB, FieldTrip, FreeSurfer, 3 other tools, 8 references
[2] doi:10.7554/elife.103097 [code]
Canonical neurodevelopmental trajectories of structural and functional manifolds.
Journal: eLife
In common: Statistics and Machine Learning Toolbox, 10 references, author Richard Bethlehem
[3] doi:10.1038/s41467-026-71270-w [code]
Spatiotemporal dynamics of the human cortical functional hierarchy across the lifespan.
Journal: Nature communications
In common: FreeSurfer, Statistics and Machine Learning Toolbox, fMRI, 11 references
[4] doi:10.1038/s41467-026-71682-8 [code]
GWAS meta-analysis of cerebrospinal fluid Alzheimer's biomarkers reveals loci regulating lipids, brain volume and autophagy.
Journal: Nature communications
In common: Alzheimer's / dementia, genetics / omics, 3 authors
[5] doi:10.1016/j.nicl.2026.103994 [code]
Mapping the multiscale neuroanatomy of GRN-related frontotemporal dementia using mode-based morphometry.
Journal: NeuroImage. Clinical
In common: fdr_bh (Benjamini-Hochberg FDR), FreeSurfer, SPM, 2 other tools, Alzheimer's / dementia, 5 references
[6] doi:10.1038/s42003-026-10282-0 [code]
Genetic risk of Alzheimer's disease is associated with loss of brain network segregation in midlife.
Journal: Communications biology
In common: Alzheimer's / dementia, genetics / omics, 11 references
[7] doi:10.1371/journal.pbio.3003684 [code]
The retrieval of previously learned motor memories is facilitated by the reinstatement of default mode network manifold structures.
Journal: PLoS biology
In common: fMRI, 13 references
[8] doi:10.1002/hbm.70605 [code]
BrainEnrich: Revealing Biological Insights for Imaging-Derived Phenotypes Through Transcriptomic Enrichment.
Journal: Human brain mapping
In common: fdr_bh (Benjamini-Hochberg FDR), EEGLAB, FreeSurfer, 2 other tools, genetics / omics, 6 references
[9] doi:10.1126/sciadv.adu9309 [code]
Variations of global brain asymmetry are associated with aging and related diseases.
Journal: Science advances
In common: FieldTrip, FreeSurfer, SPM, 2 other tools, Alzheimer's / dementia, 6 references
[10] doi:10.1111/ene.70678 [code]
Who Falls After a Stroke? Evidence From a Prospective Stroke Cohort.
Journal: European journal of neurology
In common: Curve Fitting Toolbox, FieldTrip, FreeSurfer, 3 other tools, 5 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.