OSCR

Resting-state brain age is associated with cognitive and sensorimotor abnormalities in schizophrenia spectrum disorders: a validation & longitudinal study.

Code ↔ Paper

1 match 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 1 match
  1. [1] § Methods › Site harmonization & confounding ↔ neuroHarmonize/harmonizationLearn.py, lines 10–78 · score 0.61 · linear model, ComBat, harmonization model, residuals, covariates

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

Python · 401 lines · 18 KB · MIT · 1 match

  1. import os
  2. import pickle
  3. import numpy as np
  4. import pandas as pd
  5. from statsmodels.gam.api import GLMGam, BSplines
  6. from .harmonizationApply import applyStandardizationAcrossFeatures
  7. from neuroCombat.neuroCombat import make_design_matrix, find_parametric_adjustments, adjust_data_final, aprior, bprior
  8. import copy
  9. def harmonizationLearn(data, covars, eb=True, smooth_terms=[], smooth_term_bounds=(None, None),
  10. ref_batch=None, return_s_data=False,
  11. orig_model=None, seed=None):
  12. """
  13. Wrapper for neuroCombat function that returns the harmonization model.
  14. Arguments
  15. ---------
  16. data : a numpy array
  17. data to harmonize with ComBat, dimensions are N_samples x N_features
  18. covars : a pandas DataFrame
  19. contains covariates to control for during harmonization
  20. all covariates must be encoded numerically (no categorical variables)
  21. must contain a single column "SITE" with site labels for ComBat
  22. dimensions are N_samples x (N_covariates + 1)
  23. eb : bool, default True
  24. whether to use empirical Bayes estimates of site effects
  25. smooth_terms (Optional) : a list, default []
  26. names of columns in covars to include as smooth, nonlinear terms
  27. can be any or all columns in covars, except "SITE"
  28. if empty, ComBat is applied with a linear model of covariates
  29. if not empty, Generalized Additive Models (GAMs) are used
  30. will increase computation time due to search for optimal smoothing
  31. smooth_term_bounds (Optional) : tuple of float, default (None, None)
  32. feature to support custom boundaries of the smoothing terms
  33. useful when holdout data covers different range than
  34. specify the bounds as (minimum, maximum)
  35. currently not supported for models with mutliple smooth terms
  36. ref_batch (Optional) : str or int, default None
  37. batch (site or scanner) to be used as reference for batch adjustment
  38. return_s_data (Optional) : bool, default False
  39. whether to return s_data, the standardized data array
  40. can be useful for diagnostics but will be costly to save/load if large
  41. seed (Optional) : int, default None
  42. By default, this function is non-deterministic. Setting the optional
  43. argument `seed` will make the function deterministic.
  44. Returns
  45. -------
  46. model : a dictionary of estimated model parameters
  47. design, var_pooled, B_hat, stand_mean, mod_mean,
  48. gamma_star, delta_star, info_dict (a neuroCombat invention),
  49. gamma_hat, delta_hat, gamma_bar, t2, a_prior, b_prior, smooth_model
  50. bayes_data : a numpy array
  51. harmonized data, corrected for effects of SITE
  52. dimensions are N_samples x N_features
  53. s_data (Optional) : a numpy array
  54. standardized residuals after accounting for `covars` other than `SITE`
  55. set return_s_data=True to output the variable
  56. """
  57. # set optional random seed
  58. if seed is not None:
  59. np.random.seed(seed)
  60. if orig_model is None:
  61. pass
  62. else:
  63. model = copy.deepcopy(orig_model)
  64. # bypass EB step if only one variable provided in dataset
  65. if data.shape[1]==1:
  66. if eb:
  67. print('\n[neuroHarmonize]: Bypassing empirical Bayes step because only one variable to harmonize.')
  68. eb = False
  69. # transpose data as per ComBat convention
  70. data = data.T
  71. # prep covariate data
  72. covar_levels = list(covars.columns)
  73. batch_labels = np.unique(covars.SITE)
  74. batch_col = covars.columns.get_loc('SITE')
  75. if orig_model is None:
  76. pass
  77. else:
  78. isTrainSite = covars['SITE'].isin(model['SITE_labels'])
  79. isTrainSiteLabel = set(model['SITE_labels'])
  80. isTrainSiteColumns = np.where((pd.DataFrame(np.unique(covars['SITE'])).isin(model['SITE_labels']).values).flat)
  81. isTrainSiteColumnsOrig = np.where((pd.DataFrame(model['SITE_labels']).isin(np.unique(covars['SITE'])).values).flat)
  82. isTestSiteColumns = np.where((~pd.DataFrame(np.unique(covars['SITE'])).isin(model['SITE_labels']).values).flat)
  83. cat_cols = []
  84. num_cols = [covars.columns.get_loc(c) for c in covars.columns if c!='SITE']
  85. smooth_cols = [covars.columns.get_loc(c) for c in covars.columns if c in smooth_terms]
  86. # maintain a dictionary of smoothing information
  87. smooth_model = {
  88. 'perform_smoothing': len(smooth_terms)>0,
  89. 'smooth_terms': smooth_terms,
  90. 'smooth_cols': smooth_cols,
  91. 'bsplines_constructor': None,
  92. 'formula': None,
  93. 'df_gam': None
  94. }
  95. covars = np.array(covars, dtype='object')
  96. if ref_batch is None:
  97. covars[:,batch_col] = np.unique(covars[:,batch_col],return_inverse=True)[-1]
  98. ref_level=None
  99. else:
  100. ref_indices = np.argwhere((covars[:,batch_col]==ref_batch).squeeze())
  101. covars[:,batch_col] = np.unique(covars[:,batch_col],return_inverse=True)[-1]
  102. if ref_indices.shape[0]==0:
  103. ref_level=None
  104. ref_batch=None
  105. print('[neuroHarmonize] batch.ref not found. Setting to None.')
  106. else:
  107. ref_level = int(covars[ref_indices[0],batch_col])
  108. # create dictionary that stores batch info
  109. (batch_levels, sample_per_batch) = np.unique(covars[:,batch_col],return_counts=True)
  110. info_dict = {
  111. 'batch_levels': batch_levels.astype('int'),
  112. 'n_batch': len(batch_levels),
  113. 'n_sample': int(covars.shape[0]),
  114. 'sample_per_batch': sample_per_batch.astype('int'),
  115. 'batch_info': [list(np.where(covars[:,batch_col]==idx)[0]) for idx in batch_levels],
  116. 'ref_level': ref_level
  117. }
  118. ###
  119. design = make_design_matrix(covars, batch_col, cat_cols, num_cols, ref_level)
  120. ### additional setup if smoothing is performed
  121. if smooth_model['perform_smoothing']:
  122. # create cubic spline basis for smooth terms
  123. X_spline = covars[:, smooth_cols].astype(float)
  124. if orig_model is None:
  125. if len(smooth_cols)==1:
  126. bs = BSplines(X_spline, df=10, degree=3,
  127. knot_kwds=[{'lower_bound':smooth_term_bounds[0], 'upper_bound':smooth_term_bounds[1]}])
  128. else:
  129. bs = BSplines(X_spline, df=[10] * len(smooth_cols), degree=[3] * len(smooth_cols))
  130. # construct formula and dataframe required for gam
  131. formula = 'y ~ '
  132. df_gam = {}
  133. for b in batch_levels:
  134. formula = formula + 'x' + str(b) + ' + '
  135. df_gam['x' + str(b)] = design[:, b]
  136. for c in num_cols:
  137. if c not in smooth_cols:
  138. formula = formula + 'c' + str(c) + ' + '
  139. df_gam['c' + str(c)] = covars[:, c].astype(float)
  140. formula = formula[:-2] + '- 1'
  141. df_gam = pd.DataFrame(df_gam)
  142. # for matrix operations, a modified design matrix is required
  143. design = np.concatenate((df_gam, bs.basis), axis=1)
  144. # store objects in dictionary
  145. smooth_model['bsplines_constructor'] = bs
  146. smooth_model['formula'] = formula
  147. smooth_model['df_gam'] = df_gam
  148. else:
  149. bs_basis = model['smooth_model']['bsplines_constructor'].transform(X_spline)
  150. # construct formula and dataframe required for gam
  151. formula = 'y ~ '
  152. df_gam = {}
  153. for b in batch_levels:
  154. formula = formula + 'x' + str(b) + ' + '
  155. df_gam['x' + str(b)] = design[:, b]
  156. for c in num_cols:
  157. if c not in smooth_cols:
  158. formula = formula + 'c' + str(c) + ' + '
  159. df_gam['c' + str(c)] = covars[:, c].astype(float)
  160. formula = formula[:-2] + '- 1'
  161. df_gam = pd.DataFrame(df_gam)
  162. # for matrix operations, a modified design matrix is required
  163. design = np.concatenate((df_gam, bs_basis), axis=1)
  164. ###
  165. # run steps to perform ComBat
  166. if orig_model is None:
  167. s_data, stand_mean, var_pooled, mod_mean, B_hat = standardizeAcrossFeatures(
  168. data, design, info_dict, smooth_model)
  169. LS_dict = fitLSModelAndFindPriors(s_data, design, info_dict, eb=eb)
  170. # optional: avoid EB estimates
  171. if eb:
  172. gamma_star, delta_star = find_parametric_adjustments(s_data, LS_dict, info_dict, mean_only=False)
  173. else:
  174. gamma_star = LS_dict['gamma_hat']
  175. delta_star = np.array(LS_dict['delta_hat'])
  176. bayes_data = adjust_data_final(s_data, design, gamma_star, delta_star, stand_mean, mod_mean, var_pooled, info_dict, data)
  177. # save model parameters in single object
  178. model = {'design': design, 'SITE_labels': batch_labels,
  179. 'var_pooled':var_pooled, 'B_hat':B_hat, 'stand_mean': stand_mean, 'mod_mean': mod_mean,
  180. 'gamma_star': gamma_star, 'delta_star': delta_star, 'info_dict': info_dict,
  181. 'gamma_hat': LS_dict['gamma_hat'], 'delta_hat': np.array(LS_dict['delta_hat']),
  182. 'gamma_bar': LS_dict['gamma_bar'], 't2': LS_dict['t2'],
  183. 'a_prior': LS_dict['a_prior'], 'b_prior': LS_dict['b_prior'],
  184. 'smooth_model': smooth_model, 'eb': eb,'SITE_labels_train':batch_labels,'Covariates':covar_levels,
  185. 'ref_batch': ref_batch}
  186. # transpose data to return to original shape
  187. bayes_data = bayes_data.T
  188. else:
  189. # Create train data
  190. (batch_levels, sample_per_batch) = np.unique(covars[isTrainSite,batch_col],return_counts=True)
  191. if batch_levels.size == 0:
  192. bayes_data_train = np.zeros(shape=(0,data.shape[0]))
  193. s_data_train = np.zeros(shape=(0,data.shape[0])).T
  194. else:
  195. info_dict_train = model['info_dict'].copy()
  196. info_dict_train['sample_per_batch'] = sample_per_batch.astype('int')
  197. info_dict_train['batch_info'] = [list(np.where(covars[isTrainSite,batch_col]==idx)[0]) for idx in batch_levels]
  198. tmp = np.concatenate((np.zeros(shape=(info_dict['n_sample'],len(model['SITE_labels']))), design[:,len(batch_labels):]),axis=1)
  199. s_data_train, stand_mean_train, var_pooled_train, mod_mean_train = applyStandardizationAcrossFeatures(data[:,isTrainSite], tmp[isTrainSite,:], info_dict_train, model)
  200. design2=tmp.copy()
  201. design2[:,isTrainSiteColumnsOrig[0]] = design[:,isTrainSiteColumns[0]]
  202. bayes_data_train = adjust_data_final(s_data_train, design2[isTrainSite,:], model['gamma_star'], model['delta_star'], stand_mean_train, mod_mean_train, model['var_pooled'], info_dict_train, data)
  203. # transpose data to return to original shape
  204. bayes_data_train = bayes_data_train.T
  205. # Create test data (new SITE)
  206. (batch_levels, sample_per_batch) = np.unique(covars[~isTrainSite,batch_col],return_counts=True)
  207. if batch_levels.size == 0:
  208. bayes_data_test = np.zeros(shape=(0,data.shape[0]))
  209. s_data_test = np.zeros(shape=(0,data.shape[0])).T
  210. else:
  211. info_dict_test = {
  212. 'batch_levels': batch_levels.astype('int'),
  213. 'n_batch': len(batch_levels),
  214. 'n_sample': int(covars[~isTrainSite,:].shape[0]),
  215. 'sample_per_batch': sample_per_batch.astype('int'),
  216. 'batch_info': [list(np.where(covars[~isTrainSite,batch_col]==idx)[0]) for idx in batch_levels]
  217. }
  218. design_tmp = np.concatenate((design[:,isTestSiteColumns[0]], design[:,len(batch_labels):]),axis=1)
  219. s_data_test, stand_mean_test, var_pooled_test, mod_mean_test = applyStandardizationAcrossFeatures(data[:,~isTrainSite], design_tmp[~isTrainSite,:], info_dict_test, model)
  220. LS_dict = fitLSModelAndFindPriors(s_data_test, design_tmp[~isTrainSite,:], info_dict_test, eb=eb)
  221. if eb:
  222. gamma_star, delta_star = find_parametric_adjustments(s_data_test, LS_dict, info_dict_test, mean_only=False)
  223. else:
  224. gamma_star = LS_dict['gamma_hat']
  225. delta_star = np.array(LS_dict['delta_hat'])
  226. betas = []
  227. for i in range(info_dict_test['n_batch']):
  228. diff_mean = np.mean(data[:,info_dict_test['batch_info'][i]]-np.dot(design[info_dict_test['batch_info'][i],info_dict['n_batch']:],model['B_hat'][len(model['SITE_labels']):,:]).T,axis=1)
  229. betas.append(diff_mean)
  230. new_betas = np.array(betas)
  231. model['B_hat'] = np.concatenate((model['B_hat'][:len(model['SITE_labels']),:],new_betas,model['B_hat'][len(model['SITE_labels']):,:]))
  232. model['SITE_labels'] = np.append(model['SITE_labels'],list(set(batch_labels)-isTrainSiteLabel))
  233. model['gamma_star'] = np.append(model['gamma_star'],gamma_star,axis=0)
  234. model['delta_star'] = np.append(model['delta_star'],delta_star,axis=0)
  235. model['info_dict']['n_batch'] = len(model['SITE_labels'])
  236. bayes_data_test = adjust_data_final(s_data_test, design_tmp[~isTrainSite,:], gamma_star, delta_star, stand_mean_test, mod_mean_test, model['var_pooled'], info_dict_test, data)
  237. # transpose data to return to original shape
  238. bayes_data_test = bayes_data_test.T
  239. bayes_data = np.zeros(shape=data.T.shape)
  240. bayes_data[isTrainSite,:] = bayes_data_train
  241. bayes_data[~isTrainSite,:] = bayes_data_test
  242. s_data = np.zeros(shape=data.T.shape)
  243. s_data[isTrainSite,:] = s_data_train.T
  244. s_data[~isTrainSite,:] = s_data_test.T
  245. if return_s_data:
  246. return model, bayes_data, s_data.T
  247. else:
  248. return model, bayes_data
  249. def standardizeAcrossFeatures(X, design, info_dict, smooth_model):
  250. """
  251. The original neuroCombat function standardize_across_features plus
  252. necessary modifications.
  253. This function will return all estimated parameters in addition to the
  254. standardized data.
  255. """
  256. n_batch = info_dict['n_batch']
  257. n_sample = info_dict['n_sample']
  258. sample_per_batch = info_dict['sample_per_batch']
  259. ### perform smoothing with GAMs if specified
  260. if smooth_model['perform_smoothing']:
  261. smooth_cols = smooth_model['smooth_cols']
  262. bs = smooth_model['bsplines_constructor']
  263. formula = smooth_model['formula']
  264. df_gam = smooth_model['df_gam']
  265. if X.shape[0] > 10:
  266. print('\n[neuroHarmonize]: smoothing more than 10 variables may take several minutes of computation.')
  267. # initialize penalization weight (not the final weight)
  268. alpha = np.array([1.0] * len(smooth_cols))
  269. # initialize an empty matrix for beta
  270. B_hat = np.zeros((design.shape[1], X.shape[0]))
  271. # estimate beta for each variable to be harmonized
  272. for i in range(0, X.shape[0]):
  273. df_gam.loc[:, 'y'] = X[i, :]
  274. gam_bs = GLMGam.from_formula(formula, data=df_gam, smoother=bs, alpha=alpha)
  275. res_bs = gam_bs.fit()
  276. # Optimal penalization weights alpha can be obtained through gcv/kfold
  277. # Note: kfold is faster, gcv is more robust
  278. gam_bs.alpha = gam_bs.select_penweight_kfold()[0]
  279. res_bs_optim = gam_bs.fit()
  280. B_hat[:, i] = res_bs_optim.params
  281. ###
  282. else:
  283. B_hat = np.dot(np.dot(np.linalg.inv(np.dot(design.T, design)), design.T), X.T)
  284. batch_info = info_dict['batch_info']
  285. ref_level = info_dict['ref_level']
  286. if ref_level is not None:
  287. grand_mean = np.transpose(B_hat[ref_level,:])
  288. X_ref = X[:,batch_info[ref_level]]
  289. design_ref = design[batch_info[ref_level],:]
  290. n_sample_ref = sample_per_batch[ref_level]
  291. var_pooled = np.dot(((X_ref - np.dot(design_ref, B_hat).T)**2), np.ones((n_sample_ref, 1)) / float(n_sample_ref))
  292. else:
  293. grand_mean = np.dot((sample_per_batch/ float(n_sample)).T, B_hat[:n_batch,:])
  294. var_pooled = np.dot(((X - np.dot(design, B_hat).T)**2), np.ones((n_sample, 1)) / float(n_sample))
  295. stand_mean = np.dot(grand_mean.T.reshape((len(grand_mean), 1)), np.ones((1, n_sample))) # nothing but grand mean
  296. # new code in neuroCombat to compute model mean
  297. if design is not None:
  298. tmp = copy.deepcopy(design)
  299. tmp[:,range(0,n_batch)] = 0
  300. mod_mean = np.transpose(np.dot(tmp, B_hat))
  301. s_data = ((X- stand_mean - mod_mean) / np.dot(np.sqrt(var_pooled), np.ones((1, n_sample))))
  302. return s_data, stand_mean, var_pooled, mod_mean, B_hat
  303. def fitLSModelAndFindPriors(s_data, design, info_dict, eb=True):
  304. """
  305. The original neuroCombat function fit_LS_model_and_find_priors plus
  306. necessary modifications.
  307. This function will return no EB information if eb=False
  308. """
  309. n_batch = info_dict['n_batch']
  310. batch_info = info_dict['batch_info']
  311. batch_design = design[:,:n_batch]
  312. gamma_hat = np.array(np.dot(np.dot(np.linalg.inv(np.matrix(np.dot(batch_design.T, batch_design))), batch_design.T), s_data.T))
  313. delta_hat = []
  314. for i, batch_idxs in enumerate(batch_info):
  315. delta_hat.append(np.var(s_data[:,batch_idxs],axis=1,ddof=1))
  316. if eb:
  317. gamma_bar = np.mean(gamma_hat, axis=1)
  318. t2 = np.var(gamma_hat,axis=1, ddof=1)
  319. a_prior = list(map(aprior, delta_hat))
  320. b_prior = list(map(bprior, delta_hat))
  321. LS_dict = {}
  322. LS_dict['gamma_hat'] = gamma_hat
  323. LS_dict['delta_hat'] = delta_hat
  324. LS_dict['gamma_bar'] = gamma_bar
  325. LS_dict['t2'] = t2
  326. LS_dict['a_prior'] = a_prior
  327. LS_dict['b_prior'] = b_prior
  328. return LS_dict
  329. else:
  330. LS_dict = {}
  331. LS_dict['gamma_hat'] = gamma_hat
  332. LS_dict['delta_hat'] = delta_hat
  333. LS_dict['gamma_bar'] = None
  334. LS_dict['t2'] = None
  335. LS_dict['a_prior'] = None
  336. LS_dict['b_prior'] = None
  337. return LS_dict
  338. def saveHarmonizationModel(model, file_name):
  339. """
  340. Save a harmonization model from harmonizationLearn().
  341. For saving model contents, this function will create a new file specified
  342. by file_name, and store the model using the pickle package.
  343. """
  344. if os.path.exists(file_name):
  345. raise ValueError('Model file already exists: %s. Change name or delete to save.' % file_name)
  346. # estimate size of out_file
  347. est_size = 0
  348. for key in ['design', 'B_hat', 'stand_mean', 'mod_mean', 'var_pooled',
  349. 'gamma_star', 'delta_star', 'gamma_hat', 'delta_hat']:
  350. est_size += model[key].nbytes / 1e6
  351. print('\n[neuroHarmonize]: Saving model object, estimated size in MB: %4.2f' % est_size)
  352. out_file = open(file_name, 'wb')
  353. pickle.dump(model, out_file)
  354. out_file.close()
  355. return None

harmonizationLearn.py at commit 89ef77f, under MIT · at the source

Overview

Authors: Sebastian Volkmer1,2,3, Stefan Fritze1,3, Dilsa Cemre Akkoc Altinok1,3, Geva Brandt1, Ersoy Kocak1,2, Julius Wiegert1,2, Oksana Berhe1,3, Yuchen Lin1,3, Heike Tost1,3, Andreas Meyer-Lindenberg1,3, Dusan Hirjak1,3, Emanuel Schwarz1,2,3
  1. Department of Psychiatry and Psychotherapy, Central Institute of Mental Health, Medical Faculty Mannheim, University of Heidelberg,Mannheim, Germany
  2. Hector Institute for Artificial Intelligence in Psychiatry, Central Institute of Mental Health, Medical Faculty Mannheim, Heidelberg University,Mannheim, Germany
  3. German Centre for Mental Health (DZPG), Partner site Mannheim-Heidelberg-Ulm, Mannheim, Germany
Journal: Translational psychiatry, volume 16, issue 1, article 451
Dates: received 11 March 2026; accepted 25 August 2026; published online 4 September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41398-026-04426-3 · PMID 42697895 · PMCID PMC13545253 · OpenAlex W7208788794
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), schizophrenia / psychosis (population)
Methods: Spectral & time-frequency, Statistics, Machine learning, Preprocessing, Connectivity, fMRI & imaging
Keywords: Diagnostic markers, Schizophrenia
MeSH: Aging*, Brain*, Schizophrenia*, Adolescent, Adult, Case-Control Studies, Cognition, Female, Humans, Longitudinal Studies, Magnetic Resonance Imaging, Male, Middle Aged, Young Adult (* major topic)
Topic: Functional Brain Connectivity Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Deutsche Forschungsgemeinschaft (DFG HI 1928/2-1, HI 1928/6-1, 1928/5-1, HI 1928/2-1, SCHW 1768/8-1, HI 1928/14-1, /14-1, HI 1928/5‐1); Hector Stiftung; Hector Stiftung II
Citations: not cited yet (Europe PMC); 80 references in the paper

Abstract

Brain-age models use neuroimaging features to predict chronological age. The resulting brain-age gap (BAG), defined as predicted brain age minus chronological age, quantifies deviations from age-expected brain characteristics. Structural brain-age acceleration is well established in schizophrenia spectrum disorders (SSD), but the utility of resting-state functional connectivity (rs-FC)–based brain age remains unclear. Here, we trained rs-FC brain-age models on aggregated lifespan data from healthy controls (n ≈ 2200) and evaluated them in four independent SSD case–control cohorts. Across independent cohorts and two brain atlases, SSD showed higher FC-based BAG than healthy controls (β ≈ 0.4–0.6), indicating modest functional brain-age elevation at the group level. However, within SSD, more negative (younger appearing) BAG was associated with poorer cognitive performance, longer duration of illness, and higher neurological soft signs (NSS). Over 12–24 weeks, increases in BAG were associated with reductions in NSS motor coordination and hard signs. Together, these findings suggest that rs-FC brain age captures both a small case–control shift and a clinically relevant dimension within SSD that is not well described by uniform “acceleration”. FC-based BAG may therefore reflect heterogeneity in network-level development and reorganization, with younger-appearing functional profiles potentially indexing greater neurodevelopmental burden.

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 1 match between paragraphs and lines of code.

rpomponio/neuroHarmonize

License: MIT
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 89ef77fa44c7c5f11113e22f766cc66a9776af71, 13 September 2026
Languages: Python (10)
Size: 24 files, 10 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, environment (pyproject.toml, setup.py), tests, continuous integration
Not found: CITATION.cff, documentation
Tools: NumPy (8 files), pandas (7 files), neuroHarmonize (4 files), NiBabel (4 files), neuroCombat (3 files), statsmodels (3 files)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
12 files

Code availability

Only publicly available software was used for the preprocessing and analysis of this analysis. Fmriprep was used for preprocessing of the MRI data and is available here https://fmriprep.org/en/23.0.1/, connectivity matrices were calculated with nilearn https://nilearn.github.io/stable/index.html. Data was harmonized with https://github.com/rpomponio/neuroHarmonize. Machine learning age regression was calculated with scikit learn https://scikit-learn.org/stable/index.html. Optuna was used for gridsearch https://hub.optuna.org/samplers/grid_search/ statsmodels were used for statistical testing https://www.statsmodels.org/stable/index.html.

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

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

The inhouse data is not publicly available but can be shared upon reasonable request. The public available datasets can be accessed as follows: CamCAN dataset is available here https://opendata.mrc-cbu.cam.ac.uk/projects/camcan/, AOMIC PIOP1: https://openneuro.org/datasets/ds002785/versions/2.0.0, AOMIC PIOP2: https://openneuro.org/datasets/ds002790/versions/2.0.0, Dallas Lifespan: https://openneuro.org/datasets/ds004856/versions/1.3.0, OASIS-3: https://www.nitrc.org/projects/oasis/, SALD: https://fcon_1000.projects.nitrc.org/indi/retro/sald.html.

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

  • Funding: added Deutsche Forschungsgemeinschaft: DFG HI 1928/2-1, HI 1928/6-1, 1928/5-1, HI 1928/2-1, SCHW 1768/8-1, HI 1928/14-1, /14-1, HI 1928/5‐1; Hector Stiftung; Hector Stiftung II

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 2 keywords, 14 MeSH terms, 72 references.

Cite

This paper

Volkmer, S., Fritze, S., Altinok, D. C. A., Brandt, G., Kocak, E., Wiegert, J., Berhe, O., Lin, Y., Tost, H., Meyer-Lindenberg, A., Hirjak, D., & Schwarz, E. (2026). Resting-state brain age is associated with cognitive and sensorimotor abnormalities in schizophrenia spectrum disorders: a validation & longitudinal study. Translational psychiatry, 16(1), 451. https://doi.org/10.1038/s41398-026-04426-3

BibTeX

@article{volkmer2026resting,
author = {Volkmer, Sebastian and Fritze, Stefan and Altinok, Dilsa Cemre Akkoc and Brandt, Geva and Kocak, Ersoy and Wiegert, Julius and Berhe, Oksana and Lin, Yuchen and Tost, Heike and Meyer-Lindenberg, Andreas and Hirjak, Dusan and Schwarz, Emanuel},
title = {{Resting-state brain age is associated with cognitive and sensorimotor abnormalities in schizophrenia spectrum disorders: a validation \& longitudinal study}},
journal = {Translational psychiatry},
year = {2026},
month = sep,
volume = {16},
number = {1},
pages = {451},
publisher = {Nature Publishing Group},
issn = {2158-3188},
doi = {10.1038/s41398-026-04426-3},
url = {https://doi.org/10.1038/s41398-026-04426-3},
pmid = {42697895},
pmcid = {PMC13545253}
}

RIS

TY - JOUR
AU - Volkmer, Sebastian
AU - Fritze, Stefan
AU - Altinok, Dilsa Cemre Akkoc
AU - Brandt, Geva
AU - Kocak, Ersoy
AU - Wiegert, Julius
AU - Berhe, Oksana
AU - Lin, Yuchen
AU - Tost, Heike
AU - Meyer-Lindenberg, Andreas
AU - Hirjak, Dusan
AU - Schwarz, Emanuel
TI - Resting-state brain age is associated with cognitive and sensorimotor abnormalities in schizophrenia spectrum disorders: a validation & longitudinal study
T2 - Translational psychiatry
J2 - Transl Psychiatry
PY - 2026
DA - 2026/09/04
VL - 16
IS - 1
SP - 451
SN - 2158-3188
PB - Nature Publishing Group
DO - 10.1038/s41398-026-04426-3
UR - https://doi.org/10.1038/s41398-026-04426-3
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41398-026-04426-3",
"type": "article-journal",
"title": "Resting-state brain age is associated with cognitive and sensorimotor abnormalities in schizophrenia spectrum disorders: a validation & longitudinal study",
"container-title": "Translational psychiatry",
"author": [
{
"family": "Volkmer",
"given": "Sebastian"
},
{
"family": "Fritze",
"given": "Stefan"
},
{
"family": "Altinok",
"given": "Dilsa Cemre Akkoc"
},
{
"family": "Brandt",
"given": "Geva"
},
{
"family": "Kocak",
"given": "Ersoy"
},
{
"family": "Wiegert",
"given": "Julius"
},
{
"family": "Berhe",
"given": "Oksana"
},
{
"family": "Lin",
"given": "Yuchen"
},
{
"family": "Tost",
"given": "Heike"
},
{
"family": "Meyer-Lindenberg",
"given": "Andreas"
},
{
"family": "Hirjak",
"given": "Dusan"
},
{
"family": "Schwarz",
"given": "Emanuel"
}
],
"container-title-short": "Transl Psychiatry",
"volume": "16",
"issue": "1",
"page": "451",
"DOI": "10.1038/s41398-026-04426-3",
"PMID": "42697895",
"PMCID": "PMC13545253",
"ISSN": "2158-3188",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41398-026-04426-3",
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
4
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41380-026-03691-4 [code]
Breaking the norm: population-scale deviations of brain structure in depression and anxiety.
Journal: Molecular psychiatry
In common: NiBabel, statsmodels, pandas, 1 other tool, structural MRI / diffusion, 1 reference, 3 authors
[2] doi:10.1038/s41467-026-72875-x [code]
Lifespan normative modeling of brain microstructure.
Journal: Nature communications
In common: pandas, NumPy, OpenNeuro ds002785, OpenNeuro ds002790, schizophrenia / psychosis, structural MRI / diffusion, 3 references
[3] doi:10.1038/s41586-026-10454-2 [code]
White matter micro- and macrostructure brain charts for the human lifespan.
Journal: Nature
In common: pandas, NumPy, OpenNeuro ds002785, OpenNeuro ds002790, 1 other dataset
[4] doi:10.1002/hbm.70519 [code]
Lifespan Trajectories of Asymmetry in White Matter Tracts.
Journal: Human brain mapping
In common: OpenNeuro ds002785, OpenNeuro ds002790, 1 other dataset, structural MRI / diffusion
[5] doi:10.1038/s41467-026-73072-6 [code]
Mapping the spatiotemporal continuum of structural connectivity development across the human connectome in youth.
Journal: Nature communications
In common: neuroHarmonize, neuroCombat, NiBabel, 3 other tools, structural MRI / diffusion, 2 references
[6] doi:10.1371/journal.pmed.1004809 [code]
Brain morphology in Anorexia Nervosa and its subtypes: A multi-cohort study of individual participant data.
Journal: PLoS medicine
In common: neuroHarmonize, NiBabel, statsmodels, 2 other tools, structural MRI / diffusion, 4 references
[7] doi:10.1371/journal.pbio.3003856 [code]
Aging and metabolism contribute separately to brain-body health.
Journal: PLoS biology
In common: NiBabel, statsmodels, pandas, 1 other tool, structural MRI / diffusion, 5 references
[8] doi:10.1016/j.isci.2026.117281 [code]
Spatial pattern-driven interpretable model and biological correlates in brain glioblastoma-lymphoma differentiation.
Journal: iScience
In common: neuroHarmonize, neuroCombat, NiBabel, 3 other tools, 1 reference
[9] doi:10.1162/imag.a.1338 [code]
Systematic fMRI signal differences across cohorts alter lifespan trajectories of functional brain networks.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: pandas, NumPy, OpenNeuro ds004856, 3 references
[10] doi:10.1162/imag.a.1337 [code]
Data quality biases normative models derived from fetal brain MRI.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: neuroHarmonize, NiBabel, pandas, 1 other tool, structural MRI / diffusion, 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.