OSCR

Decreased amyloid-related structure-function coupling in preclinical Alzheimer's disease.

Code ↔ Paper

9 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 9 matches · 3 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
  1. [1] § Materials and Methods › Statistics and reproducibility › Transcriptomic determinants of amyloid-related structure–function coupling ↔ abagen/reporting.py, lines 105–169 · score 0.78 · post mortem brains, Allen Human Brain, female, abagen, AHBA, microarray
  2. [2] § Materials and Methods › Structural-decoupling index (SDI) computation ↔ Code_NCOMMS/Matlab/GSP_FullPipeline.m, lines 5–10 · score 0.70 · graph Laplacian, fMRI, structural connections, pipeline, harmonics, signal
  3. [3] § Materials and Methods › Imaging data acquisition & processing › Resting-state fMRI preprocessing and functional connectome computation ↔ Code_NCOMMS/Matlab/BrainGraphTools/show_FSmesh.m, the whole file · a weak match · score 0.60 · FreeSurfer, subdivides, algorithm, dorsal, ventral, matrices
  4. [4] § Materials and Methods › Graph metrics and network topology analysis ↔ Code_NCOMMS/Matlab/cnm/sw_net.m, the whole file · a weak match · score 0.60 · clustering coefficient, Diagonal, shortest, undirected, edges, node
  5. [5] § Materials and Methods › Imaging data acquisition & processing › Diffusion-weighted imaging preprocessing and structural connectome computation ↔ abagen/correct.py, lines 438–529 · score 0.58 · MNI space, volume, symmetric, cortical, parcels, parcellation
  6. [6] § Materials and Methods › Imaging data acquisition & processing › Resting-state fMRI preprocessing and functional connectome computation ↔ abagen/cli/run.py, lines 59–123 · score 0.57 · pre processed, noise, boundary, filtering, parcels, space
  7. [7] § Materials and Methods › Statistics and reproducibility › Transcriptomic determinants of amyloid-related structure–function coupling ↔ abagen/datasets/fetchers.py, lines 72–160 · score 0.57 · Allen Human Brain, abagen, adult, Ontology, transcriptomic, microarray
  8. [8] § Materials and Methods › Graph metrics and network topology analysis ↔ Code_NCOMMS/Matlab/cnm/avgClusteringCoefficient.m, the whole file · a weak match · score 0.52 · clustering coefficient, undirected, zero, node, matrices, graph
  9. [9] § Materials and Methods › Imaging data acquisition & processing › Diffusion-weighted imaging preprocessing and structural connectome computation ↔ abagen/allen.py, lines 83–142 · score 0.51 · terminated, native, intensity, tissue, MNI, filtering

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 · 625 lines · 27 KB · BSD-3-Clause · 1 match

  1. # -*- coding: utf-8 -*-
  2. """
  3. Functions for generating workflow methods reports
  4. Note: all text contained within this module is released under a `CC-0 license
  5. <https://creativecommons.org/publicdomain/zero/1.0/>`_.
  6. """
  7. import logging
  8. import numpy as np
  9. from . import __version__
  10. from .datasets import check_donors, fetch_donor_info
  11. from .images import coerce_atlas_to_dict
  12. from .utils import first_entry
  13. LGR = logging.getLogger('abagen')
  14. METRICS = {
  15. np.mean: 'mean',
  16. np.median: 'median'
  17. }
  18. REFERENCES = dict(
  19. A2019N=('Arnatkevic̆iūtė, A., Fulcher, B. D., & Fornito, A. (2019). '
  20. 'A practical guide to linking brain-wide gene expression and '
  21. 'neuroimaging data. Neuroimage, 189, 353-367.'),
  22. F2016P=('Fulcher, B. D., & Fornito, A. (2016). A transcriptional '
  23. 'signature of hub connectivity in the mouse connectome. '
  24. 'Proceedings of the National Academy of Sciences, 113(5), '
  25. '1435-1440.'),
  26. F2013J=('Fulcher, B. D., Little, M. A., & Jones, N. S. (2013). '
  27. 'Highly comparative time-series analysis: the empirical '
  28. 'structure of time series and their methods. Journal of '
  29. 'the Royal Society Interface, 10(83), 20130048.'),
  30. H2012N=('Hawrylycz, M. J., Lein, E. S., Guillozet-Bongaarts, A. L., '
  31. 'Shen, E. H., Ng, L., Miller, J. A., ... & Jones, A. R. '
  32. '(2012). An anatomically comprehensive atlas of the adult '
  33. 'human brain transcriptome. Nature, 489(7416), 391-399.'),
  34. H2015N=('Hawrylycz, M., Miller, J. A., Menon, V., Feng, D., '
  35. 'Dolbeare, T., Guillozet-Bongaarts, A. L., ... & Lein, E. '
  36. '(2015). Canonical genetic signatures of the adult human '
  37. 'brain. Nature Neuroscience, 18(12), 1832.'),
  38. M2021B=('Markello, R.D., Arnatkevic̆iūtė, A., Poline, J-B., Fulcher, B. '
  39. 'D., Fornito, A., & Misic, B. (2021). Standardizing workflows in '
  40. 'imaging transcriptomics with the abagen toolbox. Biorxiv.'),
  41. P2017G=('Parkes, L., Fulcher, B. D., Yücel, M., & Fornito, A. '
  42. '(2017). Transcriptional signatures of connectomic '
  43. 'subregions of the human striatum. Genes, Brain and '
  44. 'Behavior, 16(7), 647-663.'),
  45. Q2002N=('Quackenbush, J. (2002). Microarray data normalization and '
  46. 'transformation. Nature Genetics, 32(4), 496-501.'),
  47. R2018N=('Romero-Garcia, R., Whitaker, K. J., Váša, F., Seidlitz, '
  48. 'J., Shinn, M., Fonagy, P., ... & NSPN Consortium. (2018). '
  49. 'Structural covariance networks are coupled to expression '
  50. 'of genes enriched in supragranular layers of the human '
  51. 'cortex. NeuroImage, 171, 256-267.')
  52. )
  53. class Report:
  54. """ Generates report of methods for :func:`abagen.get_expression_data()`
  55. Refer to the doc-string of the workflow for an overview of paramter options
  56. """
  57. def __init__(self, atlas, atlas_info=None, *, ibf_threshold=0.5,
  58. probe_selection='diff_stability', donor_probes='aggregate',
  59. lr_mirror=None, missing=None, tolerance=2, sample_norm='srs',
  60. gene_norm='srs', norm_matched=True, norm_structures=False,
  61. region_agg='donors', agg_metric='mean', corrected_mni=True,
  62. reannotated=True, donors='all', return_donors=False,
  63. data_dir=None, counts=None, n_probes=None, n_genes=None):
  64. efflevel = LGR.getEffectiveLevel()
  65. LGR.setLevel(100)
  66. atlas, self.group_atlas = \
  67. coerce_atlas_to_dict(atlas, donors, atlas_info=atlas_info,
  68. data_dir=data_dir)
  69. self.atlas = first_entry(atlas)
  70. self.atlas_info = self.atlas.atlas_info
  71. self.ibf_threshold = ibf_threshold
  72. self.probe_selection = probe_selection
  73. self.donor_probes = donor_probes
  74. self.lr_mirror = lr_mirror
  75. self.missing = missing
  76. self.tolerance = tolerance
  77. self.sample_norm = sample_norm
  78. self.gene_norm = gene_norm
  79. self.norm_matched = norm_matched
  80. self.norm_structures = norm_structures
  81. self.region_agg = region_agg
  82. self.agg_metric = METRICS.get(agg_metric, agg_metric)
  83. self.corrected_mni = corrected_mni
  84. self.reannotated = reannotated
  85. self.donors = donors
  86. self.return_donors = return_donors
  87. self.counts = counts
  88. self.n_probes = n_probes
  89. self.n_genes = n_genes
  90. self.body = self.gen_report()
  91. LGR.setLevel(efflevel)
  92. def gen_report(self):
  93. """ Generates main text of report
  94. """
  95. report = ''
  96. report += """
  97. Regional microarry expression data were obtained from {n_donors}
  98. post-mortem brains ({n_female} female, ages {min}--{max}, {mean:.2f}
  99. +/- {std:.2f}) provided by the Allen Human Brain Atlas (AHBA,
  100. https://human.brain-map.org; [H2012N]). Data were processed with the
  101. abagen toolbox (version {vers}; https://github.com/rmarkello/abagen;
  102. [M2021B])
  103. """.format(**_get_donor_demographics(self.donors), vers=__version__)
  104. if self.atlas.volumetric and self.group_atlas:
  105. report += """
  106. using a {n_region}-region volumetric atlas in MNI space.<br>
  107. """.format(n_region=len(self.atlas.labels))
  108. elif not self.atlas.volumetric and self.group_atlas:
  109. report += """
  110. using a {n_region}-region surface-based atlas in MNI space.<br>
  111. """.format(n_region=len(self.atlas.labels))
  112. elif self.atlas.volumetric and not self.group_atlas:
  113. report += """
  114. using a {n_region}-region volumetric atlas, independently aligned
  115. to each donor's native MRI space.<br>
  116. """.format(n_region=len(self.atlas.labels))
  117. else:
  118. report += ".<br>"
  119. if self.reannotated:
  120. report += """
  121. First, microarray probes were reannotated using data provided by
  122. [A2019N]; probes not matched to a valid Entrez ID were discarded.
  123. """
  124. else:
  125. report += """
  126. First, microarray probes not matched to a valid Entrez ID were
  127. discarded.
  128. """
  129. if self.ibf_threshold > 0:
  130. report += """
  131. Next, probes were filtered based on their expression intensity
  132. relative to background noise [Q2002N], such that probes with
  133. intensity less than the background in >={threshold:.2f}% of samples
  134. across donors were discarded
  135. """.format(threshold=self.ibf_threshold * 100)
  136. if self.n_probes is not None:
  137. report += """
  138. , yielding {n_probes:,} probes
  139. """.format(n_probes=self.n_probes)
  140. report += "."
  141. if self.probe_selection == 'average':
  142. report += """
  143. When multiple probes indexed the expression of the same gene we
  144. calculated the mean expression across probes.
  145. """
  146. elif self.probe_selection == 'diff_stability':
  147. report += r"""
  148. When multiple probes indexed the expression of the same gene, we
  149. selected and used the probe with the most consistent pattern of
  150. regional variation across donors (i.e., differential stability;
  151. [H2015N]), calculated with:<br>
  152. $$ \Delta_{{S}}(p) = \frac{{1}}{{\binom{{N}}{{2}}}} \,
  153. \sum_{{i=1}}^{{N-1}} \sum_{{j=i+1}}^{{N}}
  154. \rho[B_{{i}}(p), B_{{j}}(p)] $$<br>
  155. where $ \rho $ is Spearman's rank correlation of the expression of
  156. a single probe, p, across regions in two donors $B_{{i}}$ and
  157. $B_{{j}}$, and N is the total number of donors. Here, regions
  158. correspond to the structural designations provided in the ontology
  159. from the AHBA.
  160. """
  161. elif self.probe_selection == "pc_loading":
  162. report += """
  163. When multiple probes indexed the expression of the same gene we
  164. selected and used the probe with the highest loading on the first
  165. principal component taken from a decomposition of probe expression
  166. across samples from all donors [P2017G].
  167. """
  168. elif self.probe_selection == "max_intensity":
  169. report += """
  170. When multiple probes indexed the expression of the same gene we
  171. selected and used the probe with the highest mean intensity across
  172. samples.
  173. """
  174. elif self.probe_selection == "max_variance":
  175. report += """
  176. When multiple probes indexed the expression of the same gene we
  177. selected and used the probe with the highest variance across
  178. samples.
  179. """
  180. elif self.probe_selection == "corr_intensity":
  181. report += """
  182. When multiple probes indexed the expression of the same gene we
  183. selected and used the expression profile of a single representative
  184. probe. For genes where only two probes were available we selected
  185. the probe with the highest mean intensity across samples; where
  186. three or more probes were available, we calculated the correlation
  187. of probe expression across samples and selected the probe with the
  188. highest average correlation.
  189. """
  190. elif self.probe_selection == "corr_variance":
  191. report += """
  192. When multiple probes indexed the expression of the same gene we
  193. selected and used the expression profile of a single representative
  194. probe. For genes where only two probes were available we selected
  195. the probe with the highest variance across samples; where three or
  196. more probes were available, we calculated the correlation of probe
  197. expression across samples and selected the probe with the highest
  198. average correlation.
  199. """
  200. elif self.probe_selection == "rnaseq":
  201. report += """
  202. When multiple probes indexed the expression of the same gene we
  203. selected and used the probe with the most consistent pattern of
  204. regional expression to RNA-seq data (available for two donors in
  205. the AHBA). That is, we calculated the Spearman’s rank correlation
  206. between each probes' microarray expression and RNA-seq expression
  207. data of the corresponding gene, and selected the probe with the
  208. highest correspondence. Here, regions correspond to the structural
  209. designations provided in the ontology from the AHBA.
  210. """
  211. if (self.donor_probes == "aggregate" and self.probe_selection not in
  212. ['average', 'diff_stability', 'rnaseq']):
  213. report += """
  214. The selection of probes was performed using sample expression data
  215. aggregated across all donors.<br>
  216. """
  217. elif (self.donor_probes == "aggregate" and self.probe_selection in
  218. ['average', 'diff_stability', 'rnaseq']):
  219. report += "<br>"
  220. elif self.donor_probes == "independent":
  221. report += """
  222. The selection of probes was performed independently for each donor,
  223. such that the probes chosen to represent each gene could differ
  224. across donors.<br>
  225. """
  226. elif self.donor_probes == "common":
  227. report += """
  228. The selection of probes was performed independently for each donor,
  229. and the probe most commonly selected across all donors was chosen
  230. to represent the expression of each gene for all donors.<br>
  231. """
  232. if self.corrected_mni and self.group_atlas:
  233. report += """
  234. The MNI coordinates of tissue samples were updated to those
  235. generated via non-linear registration using the Advanced
  236. Normalization Tools (ANTs; https://github.com/chrisfilo/alleninf).
  237. """
  238. if self.lr_mirror == 'bidirectional':
  239. report += """
  240. To increase spatial coverage, tissue samples were mirrored
  241. bilaterally across the left and right hemispheres [R2018N].
  242. """
  243. elif self.lr_mirror == 'leftright':
  244. report += """
  245. To increase spatial coverage, tissue samples in the left hemisphere
  246. were mirrored into the right hemisphere [R2018N].
  247. """
  248. elif self.lr_mirror == 'rightleft':
  249. report += """
  250. To increase spatial coverage, tissue samples in the right
  251. hemisphere were mirrored into the left hemisphere [R2018N].
  252. """
  253. if self.tolerance == 0 and not self.atlas.volumetric:
  254. report += """
  255. Samples were assigned to brain regions by minimizing the Euclidean
  256. distance between the {space} coordinates of each sample and the
  257. nearest surface vertex. Samples where the Euclidean distance to the
  258. nearest vertex was greater than the mean distance for all samples
  259. belonging to that donor were excluded.
  260. """.format(space='MNI' if self.group_atlas else 'native voxel')
  261. elif self.tolerance == 0 and self.atlas.volumetric:
  262. report += """
  263. Samples were assigned to brain regions in the provided atlas only
  264. if their {space} coordinates were directly within a voxel belonging
  265. to a parcel.
  266. """.format(space='MNI' if self.group_atlas else 'native voxel')
  267. elif self.tolerance > 0 and not self.atlas.volumetric:
  268. report += """
  269. Samples were assigned to brain regions by minimizing the Euclidean
  270. distance between the {space} coordinates of each sample and the
  271. nearest surface vertex. Samples where the Euclidean distance to the
  272. nearest vertex was more than {tolerance} standard deviations above
  273. the mean distance for all samples belonging to that donor were
  274. excluded.
  275. """.format(space='MNI' if self.group_atlas else 'native voxel',
  276. tolerance=self.tolerance)
  277. elif self.tolerance > 0 and self.atlas.volumetric:
  278. report += """
  279. Samples were assigned to brain regions in the provided atlas if
  280. their {space} coordinates were within {tolerance} mm of a given
  281. parcel.
  282. """.format(space='MNI' if self.group_atlas else 'native voxel',
  283. tolerance=self.tolerance)
  284. elif self.tolerance < 0 and not self.atlas.volumetric:
  285. report += """
  286. Samples were assigned to brain regions by minimizing the Euclidean
  287. distance between the {space} coordinates of each sample and the
  288. nearest surface vertex. Samples where the Euclidean distance to the
  289. nearest vertex was more than {tolerance}mm were excluded.
  290. """.format(space='MNI' if self.group_atlas else 'native voxel',
  291. tolerance=abs(self.tolerance))
  292. if self.atlas_info is not None:
  293. report += """
  294. To reduce the potential for misassignment, sample-to-region
  295. matching was constrained by hemisphere and gross structural
  296. divisions (i.e., cortex, subcortex/brainstem, and cerebellum, such
  297. that e.g., a sample in the left cortex could only be assigned to an
  298. atlas parcel in the left cortex; [A2019N]).
  299. """
  300. if self.missing == 'centroids':
  301. report += """
  302. If a brain region was not assigned a sample from any donor based on
  303. the above procedure, the tissue sample closest to the centroid of
  304. that parcel was identified independently for each donor. The
  305. average of these samples was taken across donors, weighted by the
  306. distance between the parcel centroid and the sample, to obtain an
  307. estimate of the parcellated expression values for the missing
  308. region.
  309. """
  310. if self.counts is not None:
  311. n_missing = np.sum(self.counts.sum(axis=1) == 0)
  312. if n_missing > 0:
  313. report += """
  314. This procedure was performed for {n_missing} regions that
  315. were not assigned tissue samples.
  316. """.format(n_missing=n_missing)
  317. elif self.missing == 'interpolate':
  318. report += """
  319. If a brain region was not assigned a tissue sample based on the
  320. above procedure, every {node} in the region was mapped to the
  321. nearest tissue sample from the donor in order to generate a dense,
  322. interpolated expression map. The average of these expression values
  323. was taken across all {nodes} in the region, weighted by the
  324. distance between each {node} and the sample mapped to it, in order
  325. to obtain an estimate of the parcellated expression values for the
  326. missing region.
  327. """.format(node='voxel' if self.atlas.volumetric else 'vertex',
  328. nodes='voxels' if self.atlas.volumetric else 'vertices')
  329. if self.norm_matched:
  330. report += """
  331. All tissue samples not assigned to a brain region in the provided
  332. atlas were discarded.
  333. """
  334. report += "<br>"
  335. if self.sample_norm is not None:
  336. report += """
  337. Inter-subject variation was addressed {}
  338. """.format(_get_norm_procedure(self.sample_norm, 'sample_norm'))
  339. if self.gene_norm is None:
  340. pass
  341. elif self.gene_norm == self.sample_norm:
  342. report += """
  343. Gene expression values were then normalized across tissue samples
  344. using an identical procedure.
  345. """
  346. elif (self.gene_norm != self.sample_norm
  347. and self.sample_norm is not None):
  348. report += """
  349. Inter-subject variation in gene expression was then addressed {}
  350. """.format(_get_norm_procedure(self.gene_norm, 'gene_norm'))
  351. elif self.gene_norm != self.sample_norm and self.sample_norm is None:
  352. report += """
  353. Inter-subject variation was addressed {}
  354. """.format(_get_norm_procedure(self.gene_norm, 'gene_norm'))
  355. if not self.norm_matched and not self.norm_structures:
  356. report += """
  357. All available tissue samples were used in the normalization process
  358. regardless of whether they were assigned to a brain region.
  359. """
  360. elif not self.norm_matched and self.norm_structures:
  361. report += """
  362. All available tissue samples were used in the normalization process
  363. regardless of whether they were matched to a brain region; however,
  364. normalization was performed separately for samples in distinct
  365. structural classes (i.e., cortex, subcortex/brainstem, cerebellum).
  366. """
  367. elif self.norm_matched and self.norm_structures:
  368. report += """
  369. Normalization was performed separately for samples in distinct
  370. structural classes (i.e., cortex, subcortex/brainstem, cerebellum).
  371. """
  372. if not self.norm_matched and self.gene_norm is not None:
  373. report += """
  374. Tissue samples not matched to a brain region were discarded after
  375. normalization.
  376. """
  377. if self.region_agg == 'donors' and self.agg_metric == 'mean':
  378. report += """
  379. Samples assigned to the same brain region were averaged separately
  380. for each donor{donors}, yielding a regional expression matrix
  381. {n_donors}
  382. """.format(donors=' and then across donors' if
  383. not self.return_donors else '',
  384. n_donors=' for each donor ' if
  385. self.return_donors else '')
  386. elif self.region_agg == 'samples' and self.agg_metric == 'mean':
  387. report += """
  388. Samples assigned to the same brain region were averaged across all
  389. donors, yielding a regional expression matrix
  390. """
  391. elif self.region_agg == 'donors' and self.agg_metric == 'median':
  392. report += """
  393. The median value of samples assigned to the same brain region was
  394. computed separately for each donor{donors}, yielding a regional
  395. expression matrix{n_donors}
  396. """.format(donors=' and then across donors' if
  397. not self.return_donors else '',
  398. n_donors=' for each donor' if
  399. self.return_donors else '')
  400. elif self.region_agg == 'samples' and self.agg_metric == 'median':
  401. report += """
  402. The median value of samples assigned to the same brain region was
  403. computed across donors, yielding a single regional expression
  404. matrix
  405. """
  406. if self.n_genes is not None:
  407. report += """
  408. with {n_region} rows, corresponding to brain regions, and
  409. {n_genes:,} columns, corresponding to the retained genes
  410. """.format(n_region=len(self.atlas.labels),
  411. n_genes=self.n_genes)
  412. report += "\b."
  413. report += str(_add_references(report))
  414. return _sanitize_text(report)
  415. def _sanitize_text(text):
  416. """ Cleans up line and paragraph breaks in `text`
  417. """
  418. text = ' '.join(text.replace('\n', ' ').split())
  419. return text.replace('<br> ', '\n\n') \
  420. .replace('<p>', '\n')
  421. def _get_donor_demographics(donors):
  422. """
  423. Gets demographic info about the requested `donors`
  424. Parameters
  425. ----------
  426. donors : list, optional
  427. List of donors. Can be either donor numbers or UID. If not specified
  428. will use all available donors. Note that donors '9861' and '10021'
  429. have samples from both left + right hemispheres; all other donors have
  430. samples from the left hemisphere only. Default: 'all'
  431. Returns
  432. -------
  433. info : dict
  434. With keys ['n_donor', 'n_female','min', 'max', 'mean', 'std']. The
  435. values represent features of the age distribution of requested donors.
  436. """
  437. donors = [int(i) for i in check_donors(donors)]
  438. info = fetch_donor_info().set_index('uid').loc[donors]
  439. age_info = info['age'].describe()
  440. dinfo = dict(n_donors=len(info), n_female=sum(info['sex'] == 'F'))
  441. dinfo.update(age_info.loc[['min', 'max', 'mean', 'std']].to_dict())
  442. return dinfo
  443. def _get_norm_procedure(norm, parameter):
  444. """
  445. Returns methods description of the provided `norm`
  446. Parameters
  447. ----------
  448. norm : str
  449. Normalization procedure
  450. Returns
  451. -------
  452. procedure : str
  453. Reporting procedures
  454. """
  455. if parameter not in ('sample_norm', 'gene_norm'):
  456. raise ValueError(f'Invalid norm parameter {parameter}')
  457. if parameter == 'sample_norm':
  458. mod = ('tissue sample expression values across genes')
  459. suff = ('tissue sample across genes')
  460. else:
  461. mod = ('gene expression values across tissue samples')
  462. suff = ('gene across tissue samples')
  463. sigmoid = r"""
  464. independently for each donor using a sigmoid function [F2016P]:<br>
  465. $$ x_{{norm}} = \frac{{1}}{{1 + \exp(-\frac{{(x - \overline{{x}})}}
  466. {{\sigma_{{x}}}})}} $$<br>
  467. where $\bar{{x}}$ is the arithmetic mean and $\sigma_{{x}}$ is the
  468. sample standard deviation of the expression of a single
  469. """
  470. robust_sigmoid = r"""
  471. using a robust sigmoid function [F2013J]:<br>
  472. $$ x_{{norm}} = \frac{{1}}{{1 + \exp(-\frac{{(x-\langle x \rangle)}}
  473. {{\text{{IQR}}_{{x}}}})}} $$<br>
  474. where $\langle x \rangle$ is the median and $\text{{IQR}}_{{x}}$
  475. is the normalized interquartile range of the expression of a single
  476. """
  477. rescale = r"""
  478. Normalized expression values were then rescaled to the unit interval: <br>
  479. $$ x_{{scaled}} = \frac{{x_{{norm}} - \min(x_{{norm}})}}
  480. {{\max(x_{{norm}}) - \min(x_{{norm}})}} $$<br>
  481. """
  482. procedure = ''
  483. if norm in ['center', 'demean']:
  484. procedure += """
  485. by demeaning {mod} independently for each donor.
  486. """.format(mod=mod)
  487. elif norm == 'zscore':
  488. procedure += """
  489. by mean- and variance-normalizing (i.e., z-scoring) {mod} independently
  490. for each donor.
  491. """.format(mod=mod)
  492. elif norm == 'minmax':
  493. procedure += r"""
  494. by rescaling {mod} to the unit interval independently for each donor:
  495. <br>
  496. $$ x_{{{{scaled}}}} = \frac{{{{x - \min(x)}}}}{{{{\max(x) - \min(x)}}}}
  497. $$<br>
  498. """.format(mod=mod)
  499. elif norm in ['sigmoid', 'sig']:
  500. procedure += r"""
  501. by normalizing {mod} {sigmoid} {suff}.
  502. """.format(mod=mod, sigmoid=sigmoid, suff=suff)
  503. elif norm in ['scaled_sigmoid', 'scaled_sig']:
  504. procedure += r"""
  505. by normalizing {mod} {sigmoid} {suff}. {rescale}
  506. """.format(mod=mod, sigmoid=sigmoid, suff=suff, rescale=rescale)
  507. elif norm in ['scaled_sigmoid_quantiles', 'scaled_sig_qnt']:
  508. procedure += r"""
  509. by normalizing {mod} {sigmoid} {suff}, calculated using only data in
  510. the 5–95th percentile range to downweight the impact of outliers.
  511. {rescale}
  512. """.format(mod=mod, sigmoid=sigmoid, suff=suff, rescale=rescale)
  513. elif norm in ['robust_sigmoid', 'rsig', 'rs']:
  514. procedure += r"""
  515. by normalizing {mod} {robust_sigmoid} {suff}.
  516. """.format(mod=mod, robust_sigmoid=robust_sigmoid, suff=suff)
  517. elif norm in ['scaled_robust_sigmoid', 'scaled_rsig', 'srs']:
  518. procedure += r"""
  519. by normalizing {mod} {robust_sigmoid} {suff}. {rescale}
  520. """.format(mod=mod, robust_sigmoid=robust_sigmoid, suff=suff,
  521. rescale=rescale)
  522. elif norm in ['mixed_sigmoid', 'mixed_sig']:
  523. procedure += r"""
  524. by normalizing {mod} using a mixed sigmoid function [F2013J]:<br>
  525. $$ x_{{{{norm}}}} = \left\{{{{\begin{{{{array}}}}{{{{r r}}}}
  526. \frac{{{{1}}}}{{{{1 + \exp(-\frac{{{{(x-\overline{{{{x}}}})}}}}
  527. {{{{\sigma_{{{{x}}}}}}}})}}}} ,& \text{{{{IQR}}}}_{{{{x}}}} = 0
  528. \frac{{{{1}}}}{{{{1 + \exp(-\frac{{{{(x-\langle x \rangle)}}}}
  529. {{{{\text{{{{IQR}}}}_{{{{x}}}}}}}})}}}} ,& \text{{{{IQR}}}}_{{{{x}}}}
  530. \neq 0 \end{{{{array}}}}\right. $$<br>
  531. where $\bar{{{{x}}}}$ is the arithmetic mean, $\sigma_{{{{x}}}}$ is the
  532. sample standard deviation, $\langle x \rangle$ is the median, and
  533. $\text{{{{IQR}}}}_{{{{x}}}}$ is the normalized interquartile range of
  534. the expression value of a single {suff}. {rescale}
  535. """.format(mod=mod, suff=suff, rescale=rescale)
  536. return procedure
  537. def _add_references(report):
  538. """
  539. Detects references in `report` and generates list
  540. Parameters
  541. ----------
  542. report : str
  543. Report body
  544. Returns
  545. -------
  546. references : str
  547. List of references to be appended to `report`
  548. """
  549. refreport = ''
  550. for ref, cite in REFERENCES.items():
  551. if ref in report:
  552. refreport += f'[{ref}]: {cite}<p>'
  553. if len(refreport) > 0:
  554. refreport = '<br> REFERENCES<p>----------<p>' + refreport
  555. if refreport.endswith('<p> '):
  556. refreport = refreport[:-4]
  557. return refreport

reporting.py at commit dc4a007, under BSD-3-Clause · at the source

Overview

Authors: Prithvi Arunachalam1,2, Leonard Pieperhoff1,2, Luigi Lorenzini1,3, Mario Tranfa1,2,4,5,6, Federico Masserini1,2,7, Francesca Treves1,8, Giuseppe Pontillo1,4,6,9, Maria G. Preti10,11, Tommy A. A. Broeders4,12, Menno M. Schoonheim4,12, Linda Douw4, Craig Ritchie13, Mercè Boada14,15, Marta Marquié14,15, Pieter Jelle Visser16,17, Raffaele Cacciaglia18,19,20, Juan Domingo Gispert19,20, Gemma Salvadó19,20,21, Emma S. Luckett1,2,22,23, Lyduine E. Collij1,2, James H. Cole24,25, Frederik Barkhof1,9,24,25, Alle Meije Wink1,2
25 affiliations
  1. Department of Radiology and Nuclear Medicine, UMC Vrije Universiteit Amsterdam,Amsterdam, the Netherlands
  2. Amsterdam Neuroscience, Brain Imaging,Amsterdam, the Netherlands
  3. Department of Neuroscience, Rehabilitation, Ophthalmology, Genetics, Maternal and Child Health (DiNOGMI), University of Genoa,Genoa, Italy
  4. Department of Anatomy and Neurosciences, Amsterdam UMC, Vrije Universiteit Amsterdam,Amsterdam, the Netherlands
  5. Amsterdam Neuroscience, Neurodegeneration,Amsterdam, the Netherlands
  6. Department of Advanced Biomedical Sciences, University “Federico II”,Naples, Italy
  7. Department of Biomedical and Clinical Sciences, Neuroscience Research Center, University of Milan,Milan, Italy
  8. Department of Electrical, Computer and Biomedical Engineering, University of Pavia,Pavia, Italy
  9. UCL Queen Square Institute of Neurology, University College London,London, UK
  10. Neuro-X Institute, Ecole Polytechnique Fédérale De Lausanne (EPFL),Geneva, Switzerland
  11. Department of Radiology and Medical Informatics, University of Geneva (UNIGE),Geneva, Switzerland
  12. MS Center Amsterdam, Amsterdam Neuroscience, Amsterdam UMC, Vrije Universiteit Amsterdam,Amsterdam, the Netherlands
  13. Scottish Brain Sciences, Edinburgh, Scotland
  14. Ace Alzheimer Center Barcelona – Universitat Internacional de Catalunya,Barcelona, Spain
  15. Networking Research Center on Neurodegenerative Diseases (CIBERNED), Instituto de Salud Carlos III,Madrid, Spain
  16. Alzheimer Center Amsterdam, Department of Neurology, Amsterdam UMC,Amsterdam, the Netherlands
  17. Department of Psychiatry, Maastricht University,Maastricht, the Netherlands
  18. Barcelonaβeta Brain Research Center (BBRC), Pasqual Maragall Foundation,Barcelona, Spain
  19. Hospital del Mar Medical Research Institute (IMIM),Barcelona, Spain
  20. Centro de Investigación Biomédica en Red de Fragilidad y Envejecimiento Saludable (CIBERFES),Madrid, Spain
  21. Clinical Memory Research Unit, Department of Clinical Sciences Malmö, Faculty of Medicine, Lund University,Lund, Sweden
  22. Laboratory for Cognitive Neurology, KU Leuven,Leuven, Belgium
  23. Laboratory for Complex Genetics, KU Leuven,Leuven, Belgium
  24. Hawkes Institute, Department of Computer Science, UCL,London, UK
  25. Dementia Research Centre, Queen Square Institute of Neurology, UCL,London, UK
Journal: Communications medicine, volume 6, issue 1, article 491
Dates: received 23 December 2025; accepted 27 May 2026; published online 9 June 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s43856-026-01707-2 · PMID 42265349 · PMCID PMC13590598 · OpenAlex W7164051817
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), Alzheimer's / dementia (population), clinical / translational (subfield)
Methods: Spectral & time-frequency, Connectivity, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Graphs, fMRI & imaging, Physiology & signal measures, Machine learning
Keywords: Biomarkers, Alzheimer's disease
Topic: Alzheimer's disease research and treatments (Physiology, Medicine), according to OpenAlex
Citations: not cited yet (Europe PMC); 123 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

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

rmarkello/abagen

License: BSD-3-Clause
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: dc4a007e4e902e51f97251390c8d1bbf7e58c6d3, 29 September 2023
Languages: Python (52), Shell (1)
Size: 130 files, 53 scripts
Software Heritage: archived
Found in: “Transcriptomic determinants of amyloid-related s”
Holds: README, license file, environment (requirements.txt, setup.cfg, setup.py, docs/requirements.txt), tests, continuous integration, documentation
Not found: CITATION.cff
Tools: NumPy (23 files), pandas (22 files), abagen (20 files), NiBabel (11 files), SciPy (7 files)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
55 files

gpreti/GSP_StructuralDecouplingIndex

License: Apache-2.0
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 16382be93c3bae8e196934a8e05b7a9300a909c3, 10 September 2019
Languages: MATLAB (36), Jupyter (2)
Size: 69 files, 38 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README, license file, 1 notebook
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Statistics and Machine Learning Toolbox (6 files), Matplotlib (2 files), NumPy (2 files), pandas (2 files), seaborn (2 files), FreeSurfer (1 file), SPM (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
40 files

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s43856-026-01707-2.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 91 scripts, each with its path and the digest of its content;
  • 9 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 statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • it says that the data are available on request

Read it in the paper: doi.org/10.1038/s43856-026-01707-2.

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, 23 authors, 2 keywords, 3 funders, 121 references.

Cite

This paper

Arunachalam, P., Pieperhoff, L., Lorenzini, L., Tranfa, M., Masserini, F., Treves, F., Pontillo, G., Preti, M. G., Broeders, T. A. A., Schoonheim, M. M., Douw, L., Ritchie, C., Boada, M., Marquié, M., Visser, P. J., Cacciaglia, R., Gispert, J. D., Salvadó, G., Luckett, E. S., . . . Wink, A. M. (2026). Decreased amyloid-related structure-function coupling in preclinical Alzheimer's disease. Communications medicine, 6(1), 491. https://doi.org/10.1038/s43856-026-01707-2

BibTeX

@article{arunachalam2026decreased,
author = {Arunachalam, Prithvi and Pieperhoff, Leonard and Lorenzini, Luigi and Tranfa, Mario and Masserini, Federico and Treves, Francesca and Pontillo, Giuseppe and Preti, Maria G. and Broeders, Tommy A. A. and Schoonheim, Menno M. and Douw, Linda and Ritchie, Craig and Boada, Mercè and Marquié, Marta and Visser, Pieter Jelle and Cacciaglia, Raffaele and Gispert, Juan Domingo and Salvadó, Gemma and Luckett, Emma S. and Collij, Lyduine E. and Cole, James H. and Barkhof, Frederik and Wink, Alle Meije},
title = {{Decreased amyloid-related structure-function coupling in preclinical Alzheimer's disease}},
journal = {Communications medicine},
year = {2026},
month = jun,
volume = {6},
number = {1},
pages = {491},
publisher = {Nature Publishing Group},
issn = {2730-664X},
doi = {10.1038/s43856-026-01707-2},
url = {https://doi.org/10.1038/s43856-026-01707-2},
pmid = {42265349},
pmcid = {PMC13590598}
}

RIS

TY - JOUR
AU - Arunachalam, Prithvi
AU - Pieperhoff, Leonard
AU - Lorenzini, Luigi
AU - Tranfa, Mario
AU - Masserini, Federico
AU - Treves, Francesca
AU - Pontillo, Giuseppe
AU - Preti, Maria G.
AU - Broeders, Tommy A. A.
AU - Schoonheim, Menno M.
AU - Douw, Linda
AU - Ritchie, Craig
AU - Boada, Mercè
AU - Marquié, Marta
AU - Visser, Pieter Jelle
AU - Cacciaglia, Raffaele
AU - Gispert, Juan Domingo
AU - Salvadó, Gemma
AU - Luckett, Emma S.
AU - Collij, Lyduine E.
AU - Cole, James H.
AU - Barkhof, Frederik
AU - Wink, Alle Meije
TI - Decreased amyloid-related structure-function coupling in preclinical Alzheimer's disease
T2 - Communications medicine
J2 - Commun Med (Lond)
PY - 2026
DA - 2026/06/09
VL - 6
IS - 1
SP - 491
SN - 2730-664X
PB - Nature Publishing Group
DO - 10.1038/s43856-026-01707-2
UR - https://doi.org/10.1038/s43856-026-01707-2
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s43856-026-01707-2",
"type": "article-journal",
"title": "Decreased amyloid-related structure-function coupling in preclinical Alzheimer's disease",
"container-title": "Communications medicine",
"author": [
{
"family": "Arunachalam",
"given": "Prithvi"
},
{
"family": "Pieperhoff",
"given": "Leonard"
},
{
"family": "Lorenzini",
"given": "Luigi"
},
{
"family": "Tranfa",
"given": "Mario"
},
{
"family": "Masserini",
"given": "Federico"
},
{
"family": "Treves",
"given": "Francesca"
},
{
"family": "Pontillo",
"given": "Giuseppe"
},
{
"family": "Preti",
"given": "Maria G."
},
{
"family": "Broeders",
"given": "Tommy A. A."
},
{
"family": "Schoonheim",
"given": "Menno M."
},
{
"family": "Douw",
"given": "Linda"
},
{
"family": "Ritchie",
"given": "Craig"
},
{
"family": "Boada",
"given": "Mercè"
},
{
"family": "Marquié",
"given": "Marta"
},
{
"family": "Visser",
"given": "Pieter Jelle"
},
{
"family": "Cacciaglia",
"given": "Raffaele"
},
{
"family": "Gispert",
"given": "Juan Domingo"
},
{
"family": "Salvadó",
"given": "Gemma"
},
{
"family": "Luckett",
"given": "Emma S."
},
{
"family": "Collij",
"given": "Lyduine E."
},
{
"family": "Cole",
"given": "James H."
},
{
"family": "Barkhof",
"given": "Frederik"
},
{
"family": "Wink",
"given": "Alle Meije"
}
],
"container-title-short": "Commun Med (Lond)",
"volume": "6",
"issue": "1",
"page": "491",
"DOI": "10.1038/s43856-026-01707-2",
"PMID": "42265349",
"PMCID": "PMC13590598",
"ISSN": "2730-664X",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s43856-026-01707-2",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
9
]
]
}
}

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.1002/alz.71609
Cortical gray-white matter contrast alterations precede amyloid-β positivity and macrostructural changes in older adults without dementia.
Journal: Alzheimer's & dementia : the journal of the Alzheimer's Association
In common: Alzheimer's / dementia, 10 references, 11 authors
[2] doi:10.1038/s42003-025-09444-3 [code]
Decoupling of neurophysiological activity from structure mirrors global microarchitectural and neuromodulatory trends.
Journal: Communications biology
In common: abagen, NiBabel, Statistics and Machine Learning Toolbox, 4 other tools, 16 references
[3] doi:10.7554/elife.103097 [code]
Canonical neurodevelopmental trajectories of structural and functional manifolds.
Journal: eLife
In common: NiBabel, Statistics and Machine Learning Toolbox, pandas, 2 other tools, 17 references
[4] doi:10.1017/s0033291726104838 [code]
Variations of structural-functional coupling in post-traumatic stress disorder are associated with underlying molecular and transcriptional features.
Journal: Psychological medicine
In common: abagen, NiBabel, pandas, 2 other tools, 14 references
[5] doi:10.1038/s41467-026-71719-y [code]
Brain functional-structural gradient coupling reflects development, behavior and genetic influences.
Journal: Nature communications
In common: abagen, FreeSurfer, NiBabel, 5 other tools, 11 references
[6] doi:10.1371/journal.pbio.3003927 [code]
Brain structural and functional connectivity converge prenatally but diverge after birth.
Journal: PLoS biology
In common: Statistics and Machine Learning Toolbox, 15 references
[7] doi:10.1177/20552173261448282 [code]
The constrained brain in multiple sclerosis: Cognitive impairment is related to network-specific coupling of structural and functional connectivity.
Journal: Multiple sclerosis journal - experimental, translational and clinical
In common: 3 references, 3 authors
[8] doi:10.1038/s41593-026-02205-3 [code]
Competitive interactions shape mammalian brain network dynamics and computation.
Journal: Nature neuroscience
In common: SPM, NiBabel, Statistics and Machine Learning Toolbox, 5 other tools, 8 references
[9] 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: pandas, SciPy, NumPy, Alzheimer's / dementia, 3 references, 2 authors
[10] doi:10.1186/s40708-026-00312-2 [code]
Synergistic and redundant information dynamics exhibit dissociable alterations across schizophrenia and neurodevelopmental conditions.
Journal: Brain informatics
In common: FreeSurfer, SPM, NiBabel, 5 other tools, 7 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.