The role of network connectivity and transcriptomic vulnerability in shaping gray matter atrophy in multiple sclerosis.
10 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 11 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
- [1] § MATERIALS AND METHODS › Network-based atrophy modeling ↔ scripts/01.group/AtrophyModelling_cross.py, lines 501 to 534 · score 0.71 · transcriptomic neighborhood atrophy, transcriptomic vulnerability, subcortico cortical, spatial correlation, CGE, distance · block
oscr:b:N6BVCFJ0PZ0E1-S· Report a mismatch - [2] § RESULTS › Network mechanisms shape GM atrophy ↔ scripts/06.stats/R_NAM_stats.qmd, lines 515 to 572 · score 0.68 · structural cortico cortical, functional cortico cortical, functional subcortico cortical, structural subcortico cortical, strength centrality, nodal stress · block
oscr:b:GMZNPPP3NW8X5-U· Report a mismatch - [3] § MATERIALS AND METHODS › Network-based atrophy modeling ↔ scripts/06.stats/R_NAM_stats.qmd, lines 273 to 308 · score 0.65 · strength centrality, Gene expression, subcortico cortical, transcriptomic, atrophy · block
oscr:b:Q4TSA5H5N2RBP-N· Report a mismatch - [4] § MATERIALS AND METHODS › Network-based atrophy modeling ↔ scripts/R_NAM_stats.qmd, lines 223 to 258 · score 0.65 · strength centrality, Gene expression, subcortico cortical, transcriptomic, atrophy · block
oscr:b:5Z09CYAYCZ84R-Z· Report a mismatch - [5] § RESULTS › Patient- and subgroup-tailored atrophy modeling ↔ scripts/06.stats/OrganizeData.Rmd, lines 941 to 1008 · score 0.64 · disease duration, clinical phenotype, PP, SP, ER, LR · block
oscr:b:AKP1SB1PJT9MT-O· Report a mismatch - [6] § MATERIALS AND METHODS › Patient- and subgroup-tailored atrophy modeling ↔ scripts/06.stats/OrganizeData.Rmd, lines 1010 to 1139 · score 0.63 · adjusted Rand, ARI, atrophy patterns, clusters, subtype, HYDRA · block
oscr:b:YGDK8ER7ZYJED-3· Report a mismatch - [7] § RESULTS › Study population ↔ scripts/01.group/AtrophyModelling_cross.py, lines 129 to 215 · score 0.58 · NeuroImage, human brain, spin permutation, Network, maps, Atrophy · block
oscr:b:5ED63YBJFHBYD-L· Report a mismatch - [8] § RESULTS › Network mechanisms shape GM atrophy ↔ scripts/R1/probability_maps.sh, the whole file · a weak match · score 0.56 · lesion probability, disconnection probability, overlapped, space · block
oscr:b:9R37TYDHWSDM6-2· Report a mismatch - [9] § MATERIALS AND METHODS › Spatial permutation tests ↔ scripts/01.group/AtrophyModelling_cross.py, lines 129 to 215 · score 0.55 · spin permutation, rotations, spheres, permuted, surface, brain · block
oscr:b:5ED63YBJFHBYD-L· Report a mismatch - [10] § RESULTS › Patient- and subgroup-tailored atrophy modeling ↔ scripts/06.stats/R_NAM_stats.qmd, lines 171 to 219 · score 0.55 · disease duration, clinical phenotype, S3, DD, sex, HYDRA · block
oscr:b:C00DS3W1JMDC2-5· Report a mismatch - [11] § MATERIALS AND METHODS › Network-based explanation of atrophy progression ↔ scripts/04.GAM/GAM_modelling.Rmd, lines 171 to 191 · score 0.52 · REML, bam, GAMs, AIC, fit, neighborhood atrophy · block
oscr:b:DMAA2H62RZHET-M· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 911 lines · 47 KB · MIT · 3 matches
- #!/data/anw/knw-work/g.pontillo/predictive_modelling/python-env/atrophymodelling/bin/python
- #authors: [email hidden]
- #updates: 22 Jan 2024
- #%%
- import os
- import numpy as np
- import pandas as pd
- import pingouin as pg
- import matplotlib.pyplot as plt
- from enigmatoolbox.datasets import load_sc, load_fc
- from enigmatoolbox.utils.parcellation import parcel_to_surface
- from enigmatoolbox.plotting import plot_cortical
- from enigmatoolbox.plotting import plot_subcortical
- from enigmatoolbox.permutation_testing import spin_test#, shuf_test
- from enigmatoolbox.permutation_testing import centroid_extraction_sphere, rotate_parcellation
- from enigmatoolbox.datasets import load_fsa5
- root_pth = "/data/anw/knw-work/g.pontillo/predictive_modelling/code/stats/AtrophyModelling/repos/ENIGMA/enigmatoolbox/permutation_testing"
- #%%
- #==============================================================================
- # FUNCTIONS
- #==============================================================================
- def partial_perm_sphere_p(x, y, z, perm_id, corr_type='pearson', null_dist=False):
- """
- Generate a p-value for the partial spatial correlation between two cortical maps (x, y),
- controlling for a third covariate map (z), using spherical spin permutations.
- Parameters
- ----------
- x : ndarray
- Map 1 (e.g., connectivity-weighted neighbourhood atrophy map)
- y : ndarray
- Map 2 (e.g., atrophy map)
- z : ndarray
- Map 3 (Covariate map to be controlled for, e.g., proximity-weighted neighbourhood atrophy map)
- perm_id : ndarray
- Array of permutations from rotate_parcellation, shape = (n_regions, n_rot)
- corr_type : string, optional
- Correlation type {'pearson', 'spearman'}. Default is 'pearson'.
- null_dist : bool, optional
- Output null correlations. Default is False.
- """
- #nroi = perm_id[0] # number of regions
- #nperm = perm_id[1] # number of permutations
- nroi, nperm= perm_id.shape
- print(nroi, nperm)
- print("x shape:", np.shape(x))
- print("y shape:", np.shape(y))
- print("z shape:", np.shape(z))
- # 1. Empirical partial correlation (The real world baseline)
- df_emp = pd.DataFrame({'X': x, 'Y': y, 'Z': z})
- rho_emp = pg.partial_corr(data=df_emp, x='X', y='Y', covar='Z', method=corr_type).at[corr_type, 'r']
- # 2. Pre-generate all spun permutations for the maps
- x_perm = np.empty((0, nroi))
- y_perm = np.empty((0, nroi))
- z_perm = np.empty((0, nroi))
- for rr in range(nperm):
- x_perm2 = []
- y_perm2 = []
- z_perm2 = []
- #print(rr)
- for ii in range(nroi):
- idx = int(perm_id[ii, rr])
- #idx = int(ii)
- #print(idx)
- x_perm2 = np.append(x_perm2, x[idx])
- y_perm2 = np.append(y_perm2, y[idx])
- z_perm2 = np.append(z_perm2, z[idx])
- x_perm = np.vstack((x_perm, x_perm2))
- y_perm = np.vstack((y_perm, y_perm2))
- z_perm = np.vstack((z_perm, z_perm2))
- x_perm = np.transpose(x_perm)
- y_perm = np.transpose(y_perm)
- z_perm = np.transpose(z_perm)
- # 3. Dual-null framework loops
- rho_null_xy = [] # Version A: Rotate only Y
- rho_null_yx = [] # Version B: Rotate X and Z together
- for rr in range(nperm):
- # ------------------------------------------------------------------
- # Version A: Map 1 (X) and Covariate (Z) are FIXED. Only Map 2 (Y) is SPUN.
- # ------------------------------------------------------------------
- df_null_A = pd.DataFrame({
- 'X_static': x,
- 'Y_rot': y_perm[:, rr],
- 'Z_static': z
- })
- r_A = pg.partial_corr(data=df_null_A, x='X_static', y='Y_rot', covar='Z_static', method=corr_type).at[corr_type, 'r']
- rho_null_xy = np.append(rho_null_xy, r_A)
- # ------------------------------------------------------------------
- # Version B: Map 2 (Y) is FIXED. Map 1 (X) and Covariate (Z) are SPUN together.
- # ------------------------------------------------------------------
- df_null_B = pd.DataFrame({
- 'X_rot': x_perm[:, rr],
- 'Y_static': y,
- 'Z_rot': z_perm[:, rr]
- })
- r_B = pg.partial_corr(data=df_null_B, x='X_rot', y='Y_static', covar='Z_rot', method=corr_type).at[corr_type, 'r']
- rho_null_yx = np.append(rho_null_yx, r_B)
- # 4. Calculate directional two-tailed p-values
- if rho_emp >= 0:
- p_perm_xy = np.sum((rho_null_xy > rho_emp).astype(int)) / nperm
- p_perm_yx = np.sum((rho_null_yx > rho_emp).astype(int)) / nperm
- elif rho_emp < 0:
- p_perm_xy = np.sum((rho_null_xy < rho_emp).astype(int)) / nperm
- p_perm_yx = np.sum((rho_null_yx < rho_emp).astype(int)) / nperm
- # Combine the dual-null tracks into an averaged, robust p-value
- p_perm = (p_perm_xy + p_perm_yx) / 2
- if null_dist:
- return p_perm, rho_emp, np.append(rho_null_xy, rho_null_yx)
- return p_perm, rho_emp
- def spin_test_partial(map1, map2, map3, surface_name='fsa5', parcellation_name='aparc', n_rot=1000,
- type='pearson', null_dist=False, ventricles=False):
- """Spin permutation (author: @saratheriver)
- Parameters
- ----------
- map1 : narray, ndarray, or pandas.Series
- One of two map to be correlated
- map2 : narray, ndarray, or pandas.Series
- The other map to be correlated
- surface_name : string, optional
- Surface name {'fsa5', 'fsa5_with_sctx'}. Use 'fsa5' for Conte69. Default is 'fsa5'.
- parcellation_name : string, optional
- Parcellation name {'aparc', 'aparc_aseg'}. Default is 'aparc'.
- n_rot : int, optional
- Number of spin rotations. Default is 1000.
- type : string, optional
- Correlation type {'pearson', 'spearman'}. Default is 'pearson'.
- null_dist : bool, optional
- Output null correlations. Default is False.
- ventricles : bool, optional
- Whether ventricles are present in map1, map2. Only used when ``parcellation_name is 'aparc_aseg'``.
- Default is False.
- Returns
- -------
- p_spin : float
- Permutation p-value
- r_dist : 1D ndarray
- Null correlations, shape = (n_rot*2,). Only if ``null_dist is True``.
- See Also
- --------
- :func:`centroid_extraction_sphere`
- :func:`rotate_parcellation`
- :func:`perm_sphere_p`
- References
- ----------
- * Alexander-Bloch A, Shou H, Liu S, Satterthwaite TD, Glahn DC,
- Shinohara RT, Vandekar SN and Raznahan A (2018). On testing for spatial
- correspondence between maps of human brain structure and function.
- NeuroImage, 178:540-51.
- * Váša F, Seidlitz J, Romero-Garcia R, Whitaker KJ, Rosenthal G, Vértes PE,
- Shinn M, Alexander-Bloch A, Fonagy P, Dolan RJ, Goodyer IM, the NSPN consortium,
- Sporns O, Bullmore ET (2017). Adolescent tuning of association cortex in human
- structural brain networks. Cerebral Cortex, 28(1):281–294.
- """
- if surface_name == "fsa5":
- sphere_lh, sphere_rh = load_fsa5(as_sphere=True)
- elif surface_name == "fsa5_with_sctx":
- sphere_lh, sphere_rh = load_fsa5(as_sphere=True, with_sctx=True)
- #root_pth = os.path.dirname(__file__)
- # get sphere coordinates of parcels
- if surface_name == "fsa5_with_sctx" and parcellation_name =="aparc_aseg":
- annotfile_lh = os.path.join(root_pth, 'annot', surface_name + '_lh_' + parcellation_name + '.csv')
- annotfile_rh = os.path.join(root_pth, 'annot', surface_name + '_rh_' + parcellation_name + '.csv')
- lh_centroid = centroid_extraction_sphere(sphere_lh.Points, annotfile_lh, ventricles=ventricles)
- rh_centroid = centroid_extraction_sphere(sphere_rh.Points, annotfile_rh, ventricles=ventricles)
- else:
- annotfile_lh = os.path.join(root_pth, 'annot', surface_name + '_lh_' + parcellation_name + '.annot')
- annotfile_rh = os.path.join(root_pth, 'annot', surface_name + '_rh_' + parcellation_name + '.annot')
- lh_centroid = centroid_extraction_sphere(sphere_lh.Points, annotfile_lh)
- rh_centroid = centroid_extraction_sphere(sphere_rh.Points, annotfile_rh)
- # generate permutation maps
- perm_id = rotate_parcellation(lh_centroid, rh_centroid, n_rot)
- # generate spin permuted p-value
- if isinstance(map1, pd.DataFrame) or isinstance(map1, pd.Series):
- map1 = map1.to_numpy()
- if isinstance(map2, pd.DataFrame) or isinstance(map2, pd.Series):
- map2 = map2.to_numpy()
- if isinstance(map3, pd.DataFrame) or isinstance(map3, pd.Series):
- map3 = map3.to_numpy()
- p_spin, r_emp, r_dist = partial_perm_sphere_p(map1, map2, map3, perm_id, type, null_dist=True)
- if null_dist is True:
- return p_spin, r_emp, r_dist
- elif null_dist is not True:
- return p_spin, r_emp
- #%%
- def shuf_test_1(map1, map2, n_rot=10000, type='pearson', null_dist=False):
- """Shuf permuation (author: @saratheriver)
- Parameters
- ----------
- map1 : narray, ndarray, or pandas.Series
- One of two map to be correlated
- map2 : narray, ndarray, or pandas.Series
- The other map to be correlated
- n_rot : int, optional
- Number of shuffles. Default is 1000.
- type : string, optional
- Correlation type {'pearson', 'spearman'}. Default is 'pearson'.
- null_dist : bool, optional
- Output null correlations. Default is False.
- Returns
- -------
- p_shuf : float
- Permutation p-value
- r_dist : 1D ndarray
- Null correlations, shape = (n_rot*2,). Only if ``null_dist is True``.
- """
- r = 0 # count successful (r) iterations unsuccessful (c) iterations
- c = 0 # count unsuccessful (c) iterations
- nroi = map1.shape[0] # number of regions
- # generate random permutations
- perm_id = np.zeros((nroi, n_rot))
- while (r < n_rot):
- rot_lr_sort = np.random.permutation(nroi)
- # verify that permutation does not map to itself
- if np.all(rot_lr_sort == range(nroi)) is not True:
- perm_id[:, r] = rot_lr_sort
- r = r + 1
- elif np.all(rot_lr_sort == range(nroi)) is True:
- c = c + 1
- print('map to itself n.' + str(c))
- # track progress
- if np.mod(r, 100) == 0:
- print('permutation ' + str(r) + ' of ' + str(n_rot))
- # empirical correlation
- #rho_emp = pd.Series(map1).corr(pd.Series(map2), method=type)
- rho_emp = np.corrcoef(map1, map2)[0,1]
- # permutation of measures
- x_perm = np.empty((0, nroi))
- y_perm = np.empty((0, nroi))
- for rr in range(n_rot):
- x_perm2 = []
- y_perm2 = []
- for ii in range(nroi):
- x_perm2 = np.append(x_perm2, map1[int(perm_id[ii, rr])])
- y_perm2 = np.append(y_perm2, map2[int(perm_id[ii, rr])])
- x_perm = np.vstack((x_perm, x_perm2))
- y_perm = np.vstack((y_perm, y_perm2))
- x_perm = np.transpose(x_perm)
- y_perm = np.transpose(y_perm)
- # correlation to unpermuted measures
- rho_null_xy = []
- rho_null_yx = []
- for rr in range(n_rot):
- #rho_null_xy = np.append(rho_null_xy, pd.Series(x_perm[:, rr]).corr(map2, method=type))
- #rho_null_yx = np.append(rho_null_yx, pd.Series(map1).corr(pd.Series(y_perm[:, rr]), method=type))
- rho_null_xy = np.append(rho_null_xy, np.corrcoef(x_perm[:, rr], map2)[0,1])
- rho_null_yx = np.append(rho_null_yx, np.corrcoef(map1, y_perm[:, rr])[0,1])
- # p-value definition depends on the sign of the empirical correlation
- if rho_emp >= 0:
- p_perm_xy = np.sum((rho_null_xy > rho_emp).astype(int)) / n_rot
- p_perm_yx = np.sum((rho_null_yx > rho_emp).astype(int)) / n_rot
- else:
- p_perm_xy = np.sum((rho_null_xy < rho_emp).astype(int)) / n_rot
- p_perm_yx = np.sum((rho_null_yx < rho_emp).astype(int)) / n_rot
- # average p-values
- p_shuf = (p_perm_xy + p_perm_yx) / 2
- # null distribution
- r_dist = np.append(rho_null_xy, rho_null_yx)
- if null_dist is True:
- return p_shuf, r_dist
- elif null_dist is not True:
- return p_shuf
- def load_csv_to_numpy(file_mapping, base_path):
- "reads multiple csv files into numpy arrays"
- arrays = {}
- for key, filename in file_mapping.items():
- arrays[key] = pd.read_csv(f"{base_path}/{filename}", header=None).to_numpy()
- return arrays
- def compute_dc(fc_ctx, sc_ctx, fc_sctx, sc_sctx):
- "computes degree centrality for fmri & dmri"
- fc_ctx_dc = np.sum(fc_ctx, axis = 0)
- sc_ctx_dc = np.sum(sc_ctx, axis = 0)
- fc_sctx_dc = np.sum(fc_sctx, axis =1)
- sc_sctx_dc = np.sum(sc_sctx, axis =1)
- return fc_ctx_dc, sc_ctx_dc, fc_sctx_dc, sc_sctx_dc
- def plot_cortical_atrophy(atrophy, atlas, output_folder, filename, color_range=(0,20), cmap="RdBu_r"):
- #atrophy_ctx = atrophy.iloc[:,:-14] #remove subcortical
- #atrophy_ctx.to_numpy()
- atrophy_surf = parcel_to_surface(atrophy, atlas)
- plot_cortical(array_name=atrophy_surf, surface_name="fsa5", size=(2000,1500),
- cmap=cmap, color_bar=True, color_range=color_range,
- #label_text={'left': ['left']},
- screenshot=True, transparent_bg=False,
- filename=f"{output_folder}/{filename}.png")
- def plot_subcortical_atrophy(atrophy, output_folder, filename, color_range=(0,10), cmap="RdBu_r"):
- #atrophy_sctx = atrophy.iloc[:,-14:] #remove cortical
- #atrophy_sctx = atrophy_sctx.to_numpy().T.squeeze()
- plot_subcortical(array_name=atrophy, ventricles=False,
- size=(2000,1500), cmap=cmap, color_bar=True, color_range=color_range,
- screenshot=True, transparent_bg=False,
- filename=f"{output_folder}/{filename}.png")
- def nodal_stress(fc_ctx_dc, fc_sctx_dc, sc_ctx_dc, sc_sctx_dc, atrophy, parcellation):
- " performs spatial correlation between funtional/structural hubs and atrophy z-scores "
- ################# spatial correlation #################
- atrophy_ctx = atrophy.iloc[:,:-14].reset_index(drop=True).squeeze()
- atrophy_sctx = atrophy.iloc[:,-14:].reset_index(drop=True).squeeze()
- fc_ctx_r = np.corrcoef(fc_ctx_dc, atrophy_ctx)[0,1]
- fc_sctx_r = np.corrcoef(fc_sctx_dc, atrophy_sctx)[0,1]
- sc_ctx_r = np.corrcoef(sc_ctx_dc, atrophy_ctx)[0,1]
- sc_sctx_r = np.corrcoef(sc_sctx_dc, atrophy_sctx)[0,1]
- #store correlation coefficients
- rvals = {'functional cortico-cortical degree centrality': fc_ctx_r,
- 'functional subcortico-cortical degree centrality': fc_sctx_r,
- 'structural cortico-cortical degree centrality': sc_ctx_r,
- 'structural subcortico-cortical degree centrality': sc_sctx_r}
- ################# premutation testing #################
- fc_ctx_p, fc_ctx_d = spin_test(fc_ctx_dc, atrophy_ctx,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- sc_ctx_p, sc_ctx_d = spin_test(sc_ctx_dc, atrophy_ctx,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- # Shuf permutation testing for two subcortical maps
- fc_sctx_p, fc_sctx_d = shuf_test_1(fc_sctx_dc, atrophy_sctx, n_rot=10000,
- type='pearson', null_dist=True)
- sc_sctx_p, sc_sctx_d = shuf_test_1(sc_sctx_dc, atrophy_sctx, n_rot=10000,
- type='pearson', null_dist=True)
- # Store p-values and null distributions
- p_and_d = {'functional cortico-cortical degree centrality': [fc_ctx_p, fc_ctx_d],
- 'functional subcortico-cortical degree centrality': [fc_sctx_p, fc_sctx_d],
- 'structural cortico-cortical degree centrality': [sc_ctx_p, sc_ctx_d],
- 'structural subcortico-cortical degree centrality': [sc_sctx_p, sc_sctx_d]}
- # Store meas
- meas = {('functional cortico-cortical degree centrality', "cortical atrophy (cohen's d)"): [fc_ctx_dc, atrophy_ctx],
- ('functional subcortico-cortical degree centrality', "subcortical atrophy (cohen's d)"): [fc_sctx_dc, atrophy_sctx],
- ('structural cortico-cortical degree centrality', "cortical atrophy (cohen's d)"): [sc_ctx_dc, atrophy_ctx],
- ('structural subcortico-cortical degree centrality', "subcortical atrophy (cohen's d)"): [sc_sctx_dc, atrophy_sctx]}
- return rvals, p_and_d, meas
- def neighbour_atrophy(fc_ctx_ngh, fc_sctx_ngh, sc_ctx_ngh, sc_sctx_ngh, atrophy, parcellation):
- """
- performs spatial correlation between atrophy z-scores and neighbour atrophy
- weighted by funtional/structural connection strenght
- """
- ################# spatial correlation #################
- atrophy_ctx = atrophy.iloc[:,:-14].reset_index(drop=True).squeeze()
- atrophy_sctx = atrophy.iloc[:,-14:].reset_index(drop=True).squeeze()
- fc_ctx_r = np.corrcoef(fc_ctx_ngh, atrophy_ctx)[0,1]
- fc_sctx_r = np.corrcoef(fc_sctx_ngh, atrophy_sctx)[0,1]
- sc_ctx_r = np.corrcoef(sc_ctx_ngh, atrophy_ctx)[0,1]
- sc_sctx_r = np.corrcoef(sc_sctx_ngh, atrophy_sctx)[0,1]
- #store correlation coefficients
- rvals = {'functional cortico-cortical neighbour atrophy': fc_ctx_r,
- 'functional subcortico-cortical neighbour atrophy': fc_sctx_r,
- 'structural cortico-cortical neighbour atrophy': sc_ctx_r,
- 'structural subcortico-cortical neighbour atrophy': sc_sctx_r}
- ################# premutation testing #################
- fc_ctx_p, fc_ctx_d = spin_test(fc_ctx_ngh, atrophy_ctx,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- sc_ctx_p, sc_ctx_d = spin_test(sc_ctx_ngh, atrophy_ctx,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- # Shuf permutation testing for two subcortical maps
- fc_sctx_p, fc_sctx_d = shuf_test_1(fc_sctx_ngh, atrophy_sctx, n_rot=10000,
- type='pearson', null_dist=True)
- sc_sctx_p, sc_sctx_d = shuf_test_1(sc_sctx_ngh, atrophy_sctx, n_rot=10000,
- type='pearson', null_dist=True)
- # Store p-values and null distributions
- p_and_d = {'functional cortico-cortical neighbour atrophy': [fc_ctx_p, fc_ctx_d],
- 'functional subcortico-cortical neighbour atrophy': [fc_sctx_p, fc_sctx_d],
- 'structural cortico-cortical neighbour atrophy': [sc_ctx_p, sc_ctx_d],
- 'structural subcortico-cortical neighbour atrophy': [sc_sctx_p, sc_sctx_d]}
- meas = {('functional cortico-cortical neighbour atrophy', "cortical atrophy (cohen's d)"): [fc_ctx_ngh, atrophy_ctx],
- ('functional subcortico-cortical neighbour atrophy', "subcortical atrophy (cohen's d)"): [fc_sctx_ngh, atrophy_sctx],
- ('structural cortico-cortical neighbour atrophy', "cortical atrophy (cohen's d)"): [sc_ctx_ngh, atrophy_ctx],
- ('structural subcortico-cortical neighbour atrophy', "subcortical atrophy (cohen's d)"): [sc_sctx_ngh, atrophy_sctx]}
- return rvals, p_and_d, meas
- def neighbour_atrophy_partial(fc_ctx_ngh, sc_ctx_ngh, ecd_ctx_ngh, atrophy, parcellation):
- """
- performs spatial correlation between atrophy z-scores and neighbour atrophy
- weighted by funtional/structural connection strenght
- """
- ################# spatial correlation #################
- atrophy_ctx = atrophy.iloc[:,:-14].reset_index(drop=True).squeeze()
- ################# premutation testing #################
- fc_ctx_p, fc_ctx_r, fc_ctx_d = spin_test_partial(fc_ctx_ngh, atrophy_ctx, ecd_ctx_ngh,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- sc_ctx_p, sc_ctx_r, sc_ctx_d = spin_test_partial(sc_ctx_ngh, atrophy_ctx, ecd_ctx_ngh,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- #store correlation coefficients
- rvals = {'functional cortico-cortical neighbour atrophy': fc_ctx_r,
- 'structural cortico-cortical neighbour atrophy': sc_ctx_r}
- # Store p-values and null distributions
- p_and_d = {'functional cortico-cortical neighbour atrophy': [fc_ctx_p, fc_ctx_d],
- 'structural cortico-cortical neighbour atrophy': [sc_ctx_p, sc_ctx_d]}
- meas = {('functional cortico-cortical neighbour atrophy', "cortical atrophy (cohen's d)"): [fc_ctx_ngh, atrophy_ctx],
- ('structural cortico-cortical neighbour atrophy', "cortical atrophy (cohen's d)"): [sc_ctx_ngh, atrophy_ctx]}
- return rvals, p_and_d, meas
- def axonal_disc(sc_ctx_dc, sc_sctx_dc, atrophy, parcellation):
- " performs spatial correlation between funtional/structural hubs and atrophy z-scores "
- ################# spatial correlation #################
- atrophy_ctx = atrophy.iloc[:,:-14].reset_index(drop=True).squeeze()
- atrophy_sctx = atrophy.iloc[:,-14:].reset_index(drop=True).squeeze()
- sc_ctx_r = np.corrcoef(sc_ctx_dc, atrophy_ctx)[0,1]
- sc_sctx_r = np.corrcoef(sc_sctx_dc, atrophy_sctx)[0,1]
- #store correlation coefficients
- rvals = {'structural cortico-cortical disconnection': sc_ctx_r,
- 'structural subcortico-cortical disconnection': sc_sctx_r}
- ################# premutation testing #################
- sc_ctx_p, sc_ctx_d = spin_test(sc_ctx_dc, atrophy_ctx,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- # Shuf permutation testing for two subcortical maps
- sc_sctx_p, sc_sctx_d = shuf_test_1(sc_sctx_dc, atrophy_sctx, n_rot=10000,
- type='pearson', null_dist=True)
- # Store p-values and null distributions
- p_and_d = {'structural cortico-cortical disconnection': [sc_ctx_p, sc_ctx_d],
- 'structural subcortico-cortical disconnection': [sc_sctx_p, sc_sctx_d]}
- meas = {('structural cortico-cortical disconnection', "cortical atrophy (cohen's d)"): [sc_ctx_dc, atrophy_ctx],
- ('structural subcortico-cortical disconnection', "subcortical atrophy (cohen's d)"): [sc_sctx_dc, atrophy_sctx]}
- return rvals, p_and_d, meas
- def transcriptomic_vulnerablity(cge_ctx, cge_sctx, atrophy, parcellation):
- """
- performs spatial correlation between atrophy z-scores and neighbour atrophy
- weighted by funtional/structural connection strenght
- """
- ################# spatial correlation #################
- atrophy_ctx = atrophy.iloc[:,:-14].reset_index(drop=True).squeeze()
- atrophy_sctx = atrophy.iloc[:,-14:].reset_index(drop=True).squeeze()
- cge_ctx_r = np.corrcoef(cge_ctx, atrophy_ctx)[0,1]
- cge_sctx_r = np.corrcoef(cge_sctx, atrophy_sctx)[0,1]
- #store correlation coefficients
- rvals = {'cortico-cortical transcriptomic neighbour atrophy': cge_ctx_r,
- 'subcortico-cortical transcriptomic neighbour atrophy': cge_sctx_r}
- ################# premutation testing #################
- fc_ctx_p, fc_ctx_d = spin_test(cge_ctx, atrophy_ctx,
- surface_name='fsa5', parcellation_name=parcellation,
- type='pearson', n_rot=10000, null_dist=True)
- # Shuf permutation testing for two subcortical maps
- fc_sctx_p, fc_sctx_d = shuf_test_1(cge_sctx, atrophy_sctx, n_rot=10000,
- type='pearson', null_dist=True)
- # Store p-values and null distributions
- p_and_d = {'cortico-cortical transcriptomic neighbour atrophy': [fc_ctx_p, fc_ctx_d],
- 'subcortico-cortical transcriptomic neighbour atrophy': [fc_sctx_p, fc_sctx_d]}
- meas = {('cortico-cortical transcriptomic neighbour atrophy', "cortical atrophy (cohen's d)"): [cge_ctx, atrophy_ctx],
- ('subcortico-cortical transcriptomic neighbour atrophy', "subcortical atrophy (cohen's d)"): [cge_sctx, atrophy_sctx]}
- return rvals, p_and_d, meas
- def plot_null_distributions(p_and_d, rvals, filename):
- fig, axs = plt.subplots(1, 4, figsize=(15, 3))
- for k, (fn, dd) in enumerate(p_and_d.items()):
- # Define plot colors
- if k <= 1:
- col = '#A8221C' # red for functional hubs
- else:
- col = '#324F7D' # blue for structural hubs
- # Plot null distributions
- axs[k].hist(dd[1], bins=50, density=True, color=col, edgecolor='white', lw=0.5)
- axs[k].axvline(rvals[fn], lw=1.5, ls='--', color='k', dashes=(2, 3),
- label='$r$={:.2f}'.format(rvals[fn]) + '\n$p$={:.3f}'.format(dd[0]))
- axs[k].set_xlabel('Null correlations \n ({})'.format(fn))
- axs[k].set_ylabel('Density')
- axs[k].spines['top'].set_visible(False)
- axs[k].spines['right'].set_visible(False)
- axs[k].legend(loc=1, frameon=False)
- fig.tight_layout()
- fig.savefig(f"{output_folder}/{filename}.png", dpi=300, bbox_inches='tight')
- plt.show()
- def plot_hubs_vs_atrophy(p_and_d, rvals, meas, filename):
- fig, axs = plt.subplots(1, 4, figsize=(17, 4))
- for k, (fn, dd) in enumerate(meas.items()):
- # Define scatter colors
- if k <= 1:
- col = '#A8221C'
- else:
- col = '#324F7D'
- # Plot relationships between hubs and atrophy
- axs[k].scatter(meas[fn][0], meas[fn][1], color=col,
- label='$r$={:.2f}'.format(rvals[fn[0]]) + '\n$p$={:.3f}'.format(p_and_d[fn[0]][0]))
- m, b = np.polyfit(meas[fn][0], meas[fn][1], 1)
- axs[k].plot(meas[fn][0], m * meas[fn][0] + b, color=col)
- axs[k].set_ylim((-1, 1))
- axs[k].set_xlabel('{}'.format(fn[0].capitalize()))
- axs[k].set_ylabel('{}'.format(fn[1].capitalize()))
- axs[k].spines['top'].set_visible(False)
- axs[k].spines['right'].set_visible(False)
- axs[k].legend(loc=1, frameon=False, markerscale=0)
- fig.tight_layout()
- fig.savefig(f"{output_folder}/{filename}.png", dpi=300, bbox_inches='tight')
- plt.show()
- #%%
- #==============================================================================
- # IMPORT DATA
- #==============================================================================
- # ################# NORMATIVE DATA HUMAN CONNECTOME PROJECT #################
- sc_ctx_100, sc_ctx_labels_100, sc_sctx_100, sc_sctx_labels_100 = load_sc(parcellation="schaefer_100")
- fc_ctx_100, fc_ctx_labels_100, fc_sctx_100, fc_sctx_labels_100 = load_fc(parcellation="schaefer_100")
- sc_ctx_400, sc_ctx_labels_400, sc_sctx_400, sc_sctx_labels_400 = load_sc(parcellation="schaefer_400")
- fc_ctx_400, fc_ctx_labels_400, fc_sctx_400, fc_sctx_labels_400 = load_fc(parcellation="schaefer_400")
- # structural subcortical are [14,X14], remove 14 subcortical regions
- sc_sctx_100 = sc_sctx_100[:,:-14]
- sc_sctx_400 = sc_sctx_400[:,:-14]
- #normative enigma data
- fc_ctx_dc_100, sc_ctx_dc_100, fc_sctx_dc_100, sc_sctx_dc_100 = compute_dc(fc_ctx_100, sc_ctx_100, fc_sctx_100, sc_sctx_100)
- fc_ctx_dc_400, sc_ctx_dc_400, fc_sctx_dc_400, sc_sctx_dc_400 = compute_dc(fc_ctx_400, sc_ctx_400, fc_sctx_400, sc_sctx_400)
- #%%
- # ################# ATROPHY CROSS DATA FROM AMSTERDAM #################
- dir = "/data/anw/knw-work/g.pontillo/predictive_modelling/code/stats/AtrophyModelling"
- atrophycross_dir = f'{dir}/data/atrophy_cross'
- atrophy_cross_group_100_fdr = pd.read_csv(f"{atrophycross_dir}/atrophy_baseline_SchaeferSubcortex114Parcels_group_pfdr.csv")
- atrophy_cross_group_400_fdr = pd.read_csv(f"{atrophycross_dir}/atrophy_baseline_SchaeferSubcortex414Parcels_group_pfdr.csv")
- atrophy_cross_group_100 = pd.read_csv(f"{atrophycross_dir}/atrophy_baseline_SchaeferSubcortex114Parcels_group_cohend.csv")
- atrophy_cross_group_400 = pd.read_csv(f"{atrophycross_dir}/atrophy_baseline_SchaeferSubcortex414Parcels_group_cohend.csv")
- #%%
- mean_val = atrophy_cross_group_100.mean(axis=1).iloc[0]
- std_val = atrophy_cross_group_100.std(axis=1, ddof=1).iloc[0]
- #%%
- # ################# NEIGHBOUR DATA FROM AMSTERDAM #################
- neighdir = f'{dir}/data/neighbourhood_atrophy'
- neighcross_group_100_fc_ctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_fc_ctx.csv")
- neighcross_group_100_fc_sctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_fc_sctx.csv")
- neighcross_group_100_sc_ctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_sc_ctx.csv")
- neighcross_group_100_sc_sctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_sc_sctx.csv")
- neighcross_group_400_fc_ctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex414Parcels_group_fc_ctx.csv")
- neighcross_group_400_fc_sctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex414Parcels_group_fc_sctx.csv")
- neighcross_group_400_sc_ctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex414Parcels_group_sc_ctx.csv")
- neighcross_group_400_sc_sctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex414Parcels_group_sc_sctx.csv")
- #%%
- # ################# DISCONNECTOME DATA FROM AMSTERDAM #################
- discdir = f'{dir}/data/disc'
- disc_group_100_ctx = pd.read_csv(f"{discdir}/disc_SchaeferSubcortex114Parcels_group_ctx.csv", header=None)
- disc_group_100_sctx = pd.read_csv(f"{discdir}/disc_SchaeferSubcortex114Parcels_group_sctx.csv", header=None)
- disc_group_400_ctx = pd.read_csv(f"{discdir}/disc_SchaeferSubcortex414Parcels_group_ctx.csv", header=None)
- disc_group_400_sctx = pd.read_csv(f"{discdir}/disc_SchaeferSubcortex414Parcels_group_sctx.csv", header=None)
- #%%
- # ################# NEIGHBOUR DATA WEIGHTED BY GENE #################
- cge_group_100_ctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_cge_ctx.csv")
- cge_group_100_sctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_cge_sctx.csv")
- cge_group_400_ctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex414Parcels_group_cge_ctx.csv")
- cge_group_400_sctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex414Parcels_group_cge_sctx.csv")
- #%%
- # ################# NEIGHBOUR DATA WEIGHTED BY EUCLIDEAN DISTANCE #################
- ecd_group_ctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_ecd_ctx.csv")
- ecd_group_sctx = pd.read_csv(f"{neighdir}/neighbourhood_atrophy_cross_SchaeferSubcortex114Parcels_group_ecd_sctx.csv")
- #%%
- # =============================================================================
- # #Load functional data from programs
- # dir = "/data/anw/knw-work/g.pontillo/predictive_modelling/code/stats/AtrophyModelling"
- # fc = f'{dir}/data/fc'
- #
- # connectivities = ["fc"]
- # regions = ["ctx", "sctx"]
- # atlas = ["114", "414"]
- # groups = ["HC", "MS"]
- #
- # file_mapping = {
- # f"{conn}_{region}_{res}_{group}": f"PrograMS_{conn}_SchaeferSubcortex{res}Parcels_{group}_{region}.csv"
- # for conn in connectivities
- # for region in regions
- # for res in atlas
- # for group in groups
- # }
- #
- # fcp = load_csv_to_numpy(file_mapping, fc)
- #
- # #programs data
- # fc_ctx_dc_MS100, sc_ctx_dc_100, fc_sctx_dc_MS100, sc_sctx_dc_100 = compute_dc(fcp["fc_ctx_114_MS"], sc_ctx_100, fcp["fc_sctx_114_MS"], sc_sctx_100)
- # fc_ctx_dc_MS400, sc_ctx_dc_400, fc_sctx_dc_MS400, sc_sctx_dc_400 = compute_dc(fcp["fc_ctx_414_MS"], sc_ctx_400, fcp["fc_sctx_414_MS"], sc_sctx_400)
- #
- # fc_ctx_dc_HC100, sc_ctx_dc_100, fc_sctx_dc_HC100, sc_sctx_dc_100 = compute_dc(fcp["fc_ctx_114_HC"], sc_ctx_100, fcp["fc_sctx_114_HC"], sc_sctx_100)
- # fc_ctx_dc_HC400, sc_ctx_dc_400, fc_sctx_dc_HC400, sc_sctx_dc_400 = compute_dc(fcp["fc_ctx_414_HC"], sc_ctx_400, fcp["fc_sctx_414_HC"], sc_sctx_400)
- #
- # =============================================================================
- #%%
- #==============================================================================
- # PLOT DATA
- #==============================================================================
- output_folder = f"{dir}/output/may/cross_group_results_ecd"
- os.makedirs(output_folder, exist_ok=True)
- # ################# ATROPHY CROSS DATA FROM AMSTERDAM #################
- atrophy_d100_ctx = atrophy_cross_group_100.iloc[:,:-14].to_numpy() #remove sctx
- atrophy_d400_ctx = atrophy_cross_group_400.iloc[:,:-14].to_numpy() #remove sctx
- atrophy_d100_sctx = atrophy_cross_group_100.iloc[:,-14:].to_numpy().T.squeeze() #remove cortical
- atrophy_d400_sctx = atrophy_cross_group_100.iloc[:,-14:].to_numpy().T.squeeze() #remove cortical
- #%%
- plot_cortical_atrophy(atrophy_d100_ctx, "schaefer_100_fsa5", output_folder, "atrophy_cross_group_100_ctx_map", color_range=(-0.8,0.8), cmap="RdBu_r")
- plot_cortical_atrophy(atrophy_d400_ctx, "schaefer_400_fsa5", output_folder, "atrophy_cross_group_400_ctx_map", color_range=(-0.8,0.8), cmap="RdBu_r")
- plot_subcortical_atrophy(atrophy_d100_sctx, output_folder, "atrophy_cross_group_100_sctx_map", color_range=(-0.8, 0.8), cmap="RdBu_r")
- plot_subcortical_atrophy(atrophy_d400_sctx, output_folder, "atrophy_cross_group_400_sctx_map", color_range=(-0.8, 0.8), cmap="RdBu_r")
- #%%
- # ################# ATROPHY CROSS DATA FROM AMSTERDAM #################
- atrophy_pfdr100_ctx = atrophy_cross_group_100_fdr.iloc[:,:-14].to_numpy() #remove sctx
- atrophy_pfdr400_ctx = atrophy_cross_group_400_fdr.iloc[:,:-14].to_numpy() #remove sctx
- atrophy_pfdr100_sctx = atrophy_cross_group_100_fdr.iloc[:,-14:].to_numpy().T.squeeze() #remove cortical
- atrophy_pfdr400_sctx = atrophy_cross_group_400_fdr.iloc[:,-14:].to_numpy().T.squeeze() #remove cortical
- log_atrophy_pfdr100_ctx = -np.log(atrophy_pfdr100_ctx)
- log_atrophy_pfdr400_ctx = -np.log(atrophy_pfdr400_ctx)
- log_atrophy_pfdr100_sctx = -np.log(atrophy_pfdr100_sctx)
- log_atrophy_pfdr400_sctx = -np.log(atrophy_pfdr400_sctx)
- plot_cortical_atrophy(log_atrophy_pfdr100_ctx, "schaefer_100_fsa5", output_folder, "atrophy_cross_group_100_ctx_pfdr_map", color_range=(1.3,20), cmap="Reds")
- plot_cortical_atrophy(log_atrophy_pfdr400_ctx, "schaefer_400_fsa5", output_folder, "atrophy_cross_group_400_ctx_pfdr_map", color_range=(1.3,20), cmap="Reds")
- plot_subcortical_atrophy(log_atrophy_pfdr100_sctx, output_folder, "atrophy_cross_group_100_sctx_pfdr_map", color_range=(1.3,20), cmap="Reds")
- plot_subcortical_atrophy(log_atrophy_pfdr400_sctx, output_folder, "atrophy_cross_group_400_sctx_pfdr_map", color_range=(1.3,20), cmap="Reds")
- #%%
- # ################# NORMATIVE DATA HUMAN CONNECTOME PROJECT #################
- plot_cortical_atrophy(fc_ctx_dc_100, "schaefer_100_fsa5", output_folder, "fc_ctx_dc_100_cortical_map", color_range=(-40,40), cmap="RdBu_r")
- plot_cortical_atrophy(sc_ctx_dc_100, "schaefer_100_fsa5", output_folder, "sc_ctx_dc_100_cortical_map", color_range=(-340,340), cmap="RdBu")
- plot_subcortical_atrophy(fc_sctx_dc_100, output_folder, "fc_sctx_dc_100_subcortical_map", color_range=(-20,20), cmap="RdBu_r")
- plot_subcortical_atrophy(sc_sctx_dc_100, output_folder, "sc_sctx_dc_100_subcortical_map", color_range=(-410,410), cmap="RdBu")
- plot_cortical_atrophy(fc_ctx_dc_400, "schaefer_400_fsa5", output_folder, "fc_ctx_dc_400_cortical_map", color_range=(-40,40), cmap="RdBu_r")
- plot_cortical_atrophy(sc_ctx_dc_400, "schaefer_400_fsa5", output_folder, "sc_ctx_dc_400_cortical_map", color_range=(-340,340), cmap="RdBu")
- plot_subcortical_atrophy(fc_sctx_dc_400, output_folder, "fc_sctx_dc_400_subcortical_map", color_range=(-20,20), cmap="RdBu_r")
- plot_subcortical_atrophy(sc_sctx_dc_400, output_folder, "sc_sctx_dc_400_subcortical_map", color_range=(-410,410), cmap="RdBu")
- #%%
- # ################# NEIGHBOURHOOD DATA #################
- neighcross_group_100_fc_ctx=neighcross_group_100_fc_ctx.T.squeeze().astype(np.float64)
- neighcross_group_100_sc_ctx=neighcross_group_100_sc_ctx.T.squeeze().astype(np.float64)
- neighcross_group_100_fc_sctx=neighcross_group_100_fc_sctx.T.squeeze().astype(np.float64)
- neighcross_group_100_sc_sctx=neighcross_group_100_sc_sctx.T.squeeze().astype(np.float64)
- neighcross_group_400_fc_ctx=neighcross_group_400_fc_ctx.T.squeeze().astype(np.float64)
- neighcross_group_400_sc_ctx=neighcross_group_400_sc_ctx.T.squeeze().astype(np.float64)
- neighcross_group_400_fc_sctx=neighcross_group_400_fc_sctx.T.squeeze().astype(np.float64)
- neighcross_group_400_sc_sctx=neighcross_group_400_sc_sctx.T.squeeze().astype(np.float64)
- #%%
- plot_cortical_atrophy(neighcross_group_100_fc_ctx, "schaefer_100_fsa5", output_folder, "neighcross_group_100_fc_ctx_map", color_range=(-0.2,0.2), cmap="RdBu_r")
- plot_cortical_atrophy(neighcross_group_100_sc_ctx, "schaefer_100_fsa5", output_folder, "neighcross_group_100_sc_ctx_map", color_range=(-4,4), cmap="RdBu")
- plot_cortical_atrophy(neighcross_group_400_fc_ctx, "schaefer_400_fsa5", output_folder, "neighcross_group_400_fc_ctx_map", color_range=(-0.2,0.2), cmap="RdBu_r")
- plot_cortical_atrophy(neighcross_group_400_sc_ctx, "schaefer_400_fsa5", output_folder, "neighcross_group_400_sc_ctx_map", color_range=(-4,4), cmap="RdBu")
- plot_subcortical_atrophy(neighcross_group_100_fc_sctx, output_folder, "neighcross_group_100_fc_sctx_map", color_range=(-0.1,0.1), cmap="RdBu_r")
- plot_subcortical_atrophy(neighcross_group_100_sc_sctx, output_folder, "neighcross_group_100_sc_sctx_map", color_range=(-3,3), cmap="RdBu")
- plot_subcortical_atrophy(neighcross_group_400_fc_sctx, output_folder, "neighcross_group_400_fc_sctx_map", color_range=(-0.1,0.1), cmap="RdBu_r")
- plot_subcortical_atrophy(neighcross_group_400_sc_sctx, output_folder, "neighcross_group_400_sc_sctx_map", color_range=(-3,3), cmap="RdBu")
- #%%
- # ################# DISCONNECTOME DATA #################
- disc_ctx_dc_100, disc_ctx_dc_400, disc_sctx_dc_100, disc_sctx_dc_400 = compute_dc(disc_group_100_ctx, disc_group_400_ctx, disc_group_100_sctx, disc_group_400_sctx)
- plot_cortical_atrophy(disc_ctx_dc_100, "schaefer_100_fsa5", output_folder, "disc_group_100_ctx_map", color_range=(0,1600), cmap="Reds")
- plot_cortical_atrophy(disc_ctx_dc_400, "schaefer_400_fsa5", output_folder, "disc_group_400_ctx_map", color_range=(0,1600), cmap="Reds")
- plot_subcortical_atrophy(disc_sctx_dc_100, output_folder, "disc_group_100_sctx_map", color_range=(0,1200), cmap="Reds")
- plot_subcortical_atrophy(disc_sctx_dc_400, output_folder, "disc_group_400_sctx_map", color_range=(0,1200), cmap="Reds")
- #%%
- # ################# ALTERNATIVE DISCONNECTOME DATA #################
- parcel_group_100_ctx = pd.read_csv(f"{discdir}/parcel_disc_SchaeferSubcortex114Parcels_group_ctx.csv", header=None)
- parcel_group_100_sctx = pd.read_csv(f"{discdir}/parcel_disc_SchaeferSubcortex114Parcels_group_sctx.csv", header=None)
- parcel_group_400_ctx = pd.read_csv(f"{discdir}/parcel_disc_SchaeferSubcortex414Parcels_group_ctx.csv", header=None)
- parcel_group_400_sctx = pd.read_csv(f"{discdir}/parcel_disc_SchaeferSubcortex414Parcels_group_sctx.csv", header=None)
- plot_cortical_atrophy(parcel_group_100_ctx.squeeze(), "schaefer_100_fsa5", output_folder, "parcel_group_100_ctx_map", color_range=(0,0.3), cmap="Reds")
- plot_cortical_atrophy(parcel_group_400_ctx.squeeze(), "schaefer_400_fsa5", output_folder, "parcel_group_400_ctx_map", color_range=(0,0.3), cmap="Reds")
- plot_subcortical_atrophy(parcel_group_100_sctx.squeeze(), output_folder, "parcel_group_100_sctx_map", color_range=(0,0.3), cmap="Reds")
- plot_subcortical_atrophy(parcel_group_400_sctx.squeeze(), output_folder, "parcel_group_400_sctx_map", color_range=(0,0.3), cmap="Reds")
- #%%
- # ################# TRANSCRIPTOMIC DATA #################
- cge_group_100_ctx.fillna(0, inplace=True)
- cge_group_100_sctx.fillna(0, inplace=True)
- cge_group_400_ctx.fillna(0, inplace=True)
- cge_group_400_sctx.fillna(0, inplace=True)
- cge_group_100_ctx=cge_group_100_ctx.T.squeeze().astype(np.float64)
- cge_group_400_ctx=cge_group_400_ctx.T.squeeze().astype(np.float64)
- cge_group_100_sctx=cge_group_100_sctx.T.squeeze().astype(np.float64)
- cge_group_400_sctx=cge_group_400_sctx.T.squeeze().astype(np.float64)
- plot_cortical_atrophy(cge_group_100_ctx, "schaefer_100_fsa5", output_folder, "cge_group_100_ctx_map", color_range=(0,0.2), cmap="Reds")
- plot_cortical_atrophy(cge_group_400_ctx, "schaefer_400_fsa5", output_folder, "cge_group_400_ctx_map", color_range=(0,0.2), cmap="Reds")
- plot_subcortical_atrophy(cge_group_100_sctx, output_folder, "cge_group_100_sctx_map", color_range=(-0.2,0), cmap="Reds_r")
- plot_subcortical_atrophy(cge_group_400_sctx, output_folder, "cge_group_400_sctx_map", color_range=(-0.2,0), cmap="Reds_r")
- #%%
- # ################# NEIGHBOUR DATA WEIGHTED BY EUCLIDEAN DISTANCE #################
- ecd_group_ctx=ecd_group_ctx.T.squeeze().astype(np.float64)
- ecd_group_sctx=ecd_group_sctx.T.squeeze().astype(np.float64)
- plot_cortical_atrophy(ecd_group_ctx, "schaefer_100_fsa5", output_folder, "neighcross_group_100_ecd_ctx_map", color_range=(-0.005,0.005), cmap="RdBu_r")
- plot_subcortical_atrophy(ecd_group_sctx, output_folder, "neighcross_group_100_ecd_sctx_map", color_range=(-0.005,0.005), cmap="RdBu_r")
- #%%
- #==============================================================================
- # NODAL STRESS
- #==============================================================================
- rvals_crossgroup_100, p_and_d_crossgroup_100, meas_crossgroup_100 = nodal_stress(fc_ctx_dc_100, fc_sctx_dc_100, sc_ctx_dc_100, sc_sctx_dc_100, atrophy_cross_group_100, "schaefer_100")
- rvals_crossgroup_400, p_and_d_crossgroup_400, meas_crossgroup_400 = nodal_stress(fc_ctx_dc_400, fc_sctx_dc_400, sc_ctx_dc_400, sc_sctx_dc_400, atrophy_cross_group_400, "schaefer_400")
- plot_null_distributions(p_and_d_crossgroup_100, rvals_crossgroup_100, "plot_nodalstress_group_cross_100_null" )
- plot_null_distributions(p_and_d_crossgroup_400, rvals_crossgroup_400, "plot_nodalstress_group_cross_400_null")
- plot_hubs_vs_atrophy(p_and_d_crossgroup_100, rvals_crossgroup_100, meas_crossgroup_100, "plot_nodalstress_group_cross_100")
- plot_hubs_vs_atrophy(p_and_d_crossgroup_400, rvals_crossgroup_400, meas_crossgroup_400, "plot_nodalstress_group_cross_400")
- #%%
- #==============================================================================
- # TRANSNEURONAL DEGENERATION (neighbour atrophy)
- #==============================================================================
- #neighcross_group_100_fc_ctx_dc, neighcross_group_100_sc_ctx_dc, neighcross_group_100_fc_sctx_dc, neighcross_group_100_sc_sctx_dc = compute_dc(neighcross_group_100_fc_ctx, neighcross_group_100_sc_ctx, neighcross_group_100_fc_sctx, neighcross_group_100_sc_sctx)
- rvals_neighcross_100, p_and_d_neighcross_100, meas_neighcross_100 = neighbour_atrophy(neighcross_group_100_fc_ctx, neighcross_group_100_fc_sctx, neighcross_group_100_sc_ctx, neighcross_group_100_sc_sctx, atrophy_cross_group_100, "schaefer_100")
- rvals_neighcross_400, p_and_d_neighcross_400, meas_neighcross_400 = neighbour_atrophy(neighcross_group_400_fc_ctx, neighcross_group_400_fc_sctx, neighcross_group_400_sc_ctx, neighcross_group_400_sc_sctx, atrophy_cross_group_400, "schaefer_400")
- plot_null_distributions(p_and_d_neighcross_100, rvals_neighcross_100, "plot_neigh_group_cross_100_null")
- plot_null_distributions(p_and_d_neighcross_400, rvals_neighcross_400, "plot_neigh_group_cross_400_null")
- plot_hubs_vs_atrophy(p_and_d_neighcross_100, rvals_neighcross_100, meas_neighcross_100, "plot_neigh_group_cross_100")
- plot_hubs_vs_atrophy(p_and_d_neighcross_400, rvals_neighcross_400, meas_neighcross_400, "plot_neigh_group_cross_400")
- #%%
- #==============================================================================
- # TRANSNEURONAL DEGENERATION (euclidean distance)
- #==============================================================================
- #neighcross_group_100_fc_ctx_dc, neighcross_group_100_sc_ctx_dc, neighcross_group_100_fc_sctx_dc, neighcross_group_100_sc_sctx_dc = compute_dc(neighcross_group_100_fc_ctx, neighcross_group_100_sc_ctx, neighcross_group_100_fc_sctx, neighcross_group_100_sc_sctx)
- rvals_ecd_100, p_and_d_ecd_100, meas_ecd_100 = neighbour_atrophy(ecd_group_ctx, ecd_group_sctx, ecd_group_ctx, ecd_group_sctx, atrophy_cross_group_100, "schaefer_100")
- #rvals_neighcross_400, p_and_d_neighcross_400, meas_neighcross_400 = neighbour_atrophy(neighcross_group_400_fc_ctx, neighcross_group_400_fc_sctx, neighcross_group_400_sc_ctx, neighcross_group_400_sc_sctx, atrophy_cross_group_400, "schaefer_400")
- plot_null_distributions(p_and_d_ecd_100, rvals_ecd_100, "plot_ecd_group_cross_100_null")
- #plot_null_distributions(p_and_d_ecd_400, rvals_ecd_400, "plot_neigh_group_cross_400_null")
- plot_hubs_vs_atrophy(p_and_d_ecd_100, rvals_ecd_100, meas_ecd_100, "plot_ecd_group_cross_100")
- #plot_hubs_vs_atrophy(p_and_d_neighcross_400, rvals_neighcross_400, meas_neighcross_400, "plot_neigh_group_cross_400")
- #%%
- #==============================================================================
- # TRANSNEURONAL DEGENERATION (neighbourhood atrophy controling for distance)
- #==============================================================================
- ## test with spatial
- rvals_ecd_100, p_and_d_ecd_100, meas_ecd_100 = neighbour_atrophy_partial(neighcross_group_100_fc_ctx, neighcross_group_100_sc_ctx, ecd_group_ctx, atrophy_cross_group_100, "schaefer_100")
- #%%
- #==============================================================================
- # AXONAL TRANSECTION
- #==============================================================================
- rvals_disc_100, p_and_d_disc_100, meas_disc_100 = axonal_disc(disc_ctx_dc_100, disc_sctx_dc_100, atrophy_cross_group_100, "schaefer_100")
- rvals_disc_400, p_and_d_disc_400, meas_disc_400 = axonal_disc(disc_ctx_dc_400, disc_sctx_dc_100, atrophy_cross_group_400, "schaefer_400")
- plot_null_distributions(p_and_d_disc_100, rvals_disc_100, "plot_disc_group_cross_100_null")
- plot_null_distributions(p_and_d_disc_400, rvals_disc_400, "plot_disc_group_cross_400_null")
- plot_hubs_vs_atrophy(p_and_d_disc_100, rvals_disc_100, meas_disc_100, "plot_disc_group_cross_100")
- plot_hubs_vs_atrophy(p_and_d_disc_400, rvals_disc_400, meas_disc_400, "plot_disc_group_cross_400")
- #%%
- rvals_parcel_100, p_and_d_parcel_100, meas_parcel_100 = axonal_disc(parcel_group_100_ctx.squeeze(), parcel_group_100_sctx.squeeze(), atrophy_cross_group_100, "schaefer_100")
- rvals_parcel_400, p_and_d_parcel_400, meas_parcel_400 = axonal_disc(parcel_group_400_ctx.squeeze(), parcel_group_400_sctx.squeeze(), atrophy_cross_group_400, "schaefer_400")
- plot_null_distributions(p_and_d_parcel_100, rvals_parcel_100, "plot_parcel_group_cross_100_null")
- plot_null_distributions(p_and_d_parcel_400, rvals_parcel_400, "plot_parcel_group_cross_400_null")
- plot_hubs_vs_atrophy(p_and_d_parcel_100, rvals_parcel_100, meas_parcel_100, "plot_parcel_group_cross_100")
- plot_hubs_vs_atrophy(p_and_d_parcel_400, rvals_parcel_400, meas_parcel_400, "plot_parcel_group_cross_400")
- #%%
- #==============================================================================
- # TRANSCRIPTOMIC VULNERABILITY
- #==============================================================================
- rvals_cge_100, p_and_d_cge_100, meas_cge_100 = transcriptomic_vulnerablity(cge_group_100_ctx, cge_group_100_sctx, atrophy_cross_group_100, "schaefer_100")
- rvals_cge_400, p_and_d_cge_400, meas_cge_400 = transcriptomic_vulnerablity(cge_group_400_ctx, cge_group_400_sctx, atrophy_cross_group_400, "schaefer_400")
- plot_null_distributions(p_and_d_cge_100, rvals_cge_100, "plot_cge_group_cross_100_null")
- plot_null_distributions(p_and_d_cge_400, rvals_cge_400, "plot_cge_group_cross_400_null")
- plot_hubs_vs_atrophy(p_and_d_cge_100, rvals_cge_100, meas_cge_100, "plot_cge_group_cross_100")
- plot_hubs_vs_atrophy(p_and_d_cge_400, rvals_cge_400, meas_cge_400, "plot_cge_group_cross_400")
AtrophyModelling_cross.py at commit 85266b3, under MIT · at the source
Overview
13 affiliations
- MS Center Amsterdam, Amsterdam UMC location Vrije Universiteit Amsterdam, Anatomy and Neurosciences, Amsterdam, Netherlands
- Amsterdam Neuroscience, Neuroinfection and Neuroinflammation, Brain Imaging, Amsterdam, Netherlands
- Department of Radiology and Nuclear Medicine, Amsterdam University Medical Center, Vrije Universiteit, Amsterdam, Netherlands
- Department of Advanced Biomedical Sciences, University “Federico II,” Naples, Italy
- MS Center Amsterdam, Amsterdam UMC location Vrije Universiteit Amsterdam, Radiology and Nuclear Medicine, Amsterdam, Netherlands
- Department of Neuroscience, Rehabilitation, Ophthalmology, Genetics, Maternal and Child Health (DiNOGMI), University of Genoa, Genoa, Italy
- Department of Neurology, Research Unit for Neuronal Plasticity and Repair, Medical University of Graz, Graz, Austria
- Department of Neurology, Neuroimaging Research Unit, Medical University of Graz, Graz, Austria
- Department of Neurology, Medical University of Graz, Graz, Austria
- Department of Neurology and Centre of Clinical Neuroscience, First Faculty of Medicine, Charles University in Prague and General University Hospital, Prague, Czechia
- Department of Radiology, First Faculty of Medicine, Charles University in Prague and General University Hospital, Prague, Czechia
- MS Center Amsterdam, Amsterdam UMC location Vrije Universiteit Amsterdam, Neurology, Amsterdam, Netherlands
- Queen Square Institute of Neurology and Centre for Medical Imaging Computing, University College London, London, UK
Abstract
Clinical progression is strongly linked to gray matter atrophy in multiple sclerosis (MS), detectable early on MRI and progressing nonrandomly across the brain. However, the mechanisms driving its spatiotemporal progression and individual variability remain unclear. Using MRIs from 2187 participants, alongside normative data, we systematically investigated network-based mechanisms underlying MS-related atrophy. Regional atrophy was associated with functional cortical hubness, supporting the nodal stress hypothesis, and was constrained by anatomical and functional connections, consistent with transneuronal degeneration. Lesional disconnection and transcriptomic vulnerability played marginal roles. Patient- and subgroup-level analyses revealed that network-based mechanisms are specifically linked to MS-related neurodegeneration and may operate differently in distinct subtypes or disease phases. Atrophy patterns were anchored to the connectivity profiles of disease epicenters involving the visual, sensorimotor, and temporal cortices, as well as the hippocampi, amygdalae, and thalami. Network-based measures enhanced the explanation of future atrophy progression in people with MS, providing a mechanistic framework to understand neurodegeneration in MS.
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 11 matches between paragraphs and lines of code.
Zenodo 21281372
Availability: 1 check, the latest on 14 November 2026: the link answers (HTTP 200)
- 14 November 2026: the link answers (HTTP 200)
42 files
- scripts/
01.group/ , Python, 911 linesAtrophyModelling_cross.p y - scripts/
01.group/ , Python, 563 linesAtrophyModelling_cross_G lasser.py - scripts/
01.group/ , Python, 751 linesAtrophyModelling_cross_g roup.py - scripts/
01.group/ , Python, 667 linesAtrophyModelling_long.py - scripts/
01.group/ , R, 31 lineseuclidian_distance.R - scripts/
02.indv/ , Python, 292 lines400parcellation/ AxDisc_Indv_400.py - scripts/
02.indv/ , Python, 217 lines400parcellation/ NodalStress_Indv_400.py - scripts/
02.indv/ , Python, 256 lines400parcellation/ TransDeg_Indv_400.py - scripts/
02.indv/ , Python, 262 lines400parcellation/ TransVul_Indv_400.py - scripts/
02.indv/ , Python, 292 linesAxDisc_Indv.py - scripts/
02.indv/ , Shell, 29 linesAxDisc_Indv_run.sh - scripts/
02.indv/ , Python, 246 linesNodalStress_Indv.py - scripts/
02.indv/ , Shell, 29 linesNodalStress_Indv_run.sh - scripts/
02.indv/ , Python, 256 linesTransDeg_Indv.py - scripts/
02.indv/ , Shell, 29 linesTransDeg_Indv_run.sh - scripts/
02.indv/ , Python, 262 linesTransVul_Indv.py - scripts/
02.indv/ , Shell, 29 linesTransVul_Indv_run.sh - scripts/
03.epicenter-mapping/ , Python, 188 linesEpicenterMapping.py - scripts/
03.epicenter-mapping/ , Python, 133 linesEpicenterMapping_long.py - scripts/
03.epicenter-mapping/ , Python, 91 linesEpicenterMapping_plots.p y - scripts/
03.epicenter-mapping/ , Python, 134 linesepicenter-mapping_indv.p y - scripts/
03.epicenter-mapping/ , Python, 134 linesepicenter-mapping_indv_4 00.py - scripts/
03.epicenter-mapping/ , Python, 134 linesepicenter-mapping_indv_g lasser.py - scripts/
03.epicenter-mapping/ , Python, 358 linesepicenter-mapping_indv_p lots.py - scripts/
03.epicenter-mapping/ , Python, 358 linesepicenter-mapping_indv_p lots_glasser.py - scripts/
03.epicenter-mapping/ , Shell, 29 linesrun_EpicenterMapping.sh - scripts/
03.epicenter-mapping/ , Shell, 48 linesrun_epicenter-mapping_in dv.sh - scripts/
03.epicenter-mapping/ , Shell, 48 linesrun_epicenter-mapping_in dv_400.sh - scripts/
03.epicenter-mapping/ , Shell, 48 linesrun_epicenter-mapping_in dv_glasser.sh - scripts/
04.GAM/ , R, 219 linesGAM_modelling.Rmd - scripts/
05.hydra/ , Python, 16 lineshydra.py - scripts/
05.hydra/ , Python, 16 lineshydra414.py - scripts/
05.hydra/ , Python, 152 linesplot_sustain_stages.py - scripts/
06.stats/ , R, 1,142 linesOrganizeData.Rmd - scripts/
06.stats/ , Quarto, 1,216 linesR_NAM_stats.qmd - scripts/
R1/ , R, 2,455 linesOrganizeData_R1.Rmd - scripts/
R1/ , Python, 76 linesmean_maps.py - scripts/
R1/ , Shell, 45 linesprobability_maps.sh - scripts/
R1/ , Python, 82 linesstd_maps.py - scripts/
R_NAM_stats.qmd , Quarto, 615 lines - LICENSE, License, 21 lines
- README.md, Text, 93 lines
giupontillo/AtrophyModellingMS
85266b335118c96f77d7c7f46296243f743ebbda, 10 July 2026Availability: 1 check, the latest on 14 November 2026: the link answers
- 14 November 2026: the link answers
42 files
- scripts/
01.group/ , Python, 911 lines, 3 matchesAtrophyModelling_cross.p y - scripts/
01.group/ , Python, 563 linesAtrophyModelling_cross_G lasser.py - scripts/
01.group/ , Python, 751 linesAtrophyModelling_cross_g roup.py - scripts/
01.group/ , Python, 667 linesAtrophyModelling_long.py - scripts/
01.group/ , R, 31 lineseuclidian_distance.R - scripts/
02.indv/ , Python, 292 lines400parcellation/ AxDisc_Indv_400.py - scripts/
02.indv/ , Python, 217 lines400parcellation/ NodalStress_Indv_400.py - scripts/
02.indv/ , Python, 256 lines400parcellation/ TransDeg_Indv_400.py - scripts/
02.indv/ , Python, 262 lines400parcellation/ TransVul_Indv_400.py - scripts/
02.indv/ , Python, 292 linesAxDisc_Indv.py - scripts/
02.indv/ , Shell, 29 linesAxDisc_Indv_run.sh - scripts/
02.indv/ , Python, 246 linesNodalStress_Indv.py - scripts/
02.indv/ , Shell, 29 linesNodalStress_Indv_run.sh - scripts/
02.indv/ , Python, 256 linesTransDeg_Indv.py - scripts/
02.indv/ , Shell, 29 linesTransDeg_Indv_run.sh - scripts/
02.indv/ , Python, 262 linesTransVul_Indv.py - scripts/
02.indv/ , Shell, 29 linesTransVul_Indv_run.sh - scripts/
03.epicenter-mapping/ , Python, 188 linesEpicenterMapping.py - scripts/
03.epicenter-mapping/ , Python, 133 linesEpicenterMapping_long.py - scripts/
03.epicenter-mapping/ , Python, 91 linesEpicenterMapping_plots.p y - scripts/
03.epicenter-mapping/ , Python, 134 linesepicenter-mapping_indv.p y - scripts/
03.epicenter-mapping/ , Python, 134 linesepicenter-mapping_indv_4 00.py - scripts/
03.epicenter-mapping/ , Python, 134 linesepicenter-mapping_indv_g lasser.py - scripts/
03.epicenter-mapping/ , Python, 358 linesepicenter-mapping_indv_p lots.py - scripts/
03.epicenter-mapping/ , Python, 358 linesepicenter-mapping_indv_p lots_glasser.py - scripts/
03.epicenter-mapping/ , Shell, 29 linesrun_EpicenterMapping.sh - scripts/
03.epicenter-mapping/ , Shell, 48 linesrun_epicenter-mapping_in dv.sh - scripts/
03.epicenter-mapping/ , Shell, 48 linesrun_epicenter-mapping_in dv_400.sh - scripts/
03.epicenter-mapping/ , Shell, 48 linesrun_epicenter-mapping_in dv_glasser.sh - scripts/
04.GAM/ , R, 219 lines, 1 matchGAM_modelling.Rmd - scripts/
05.hydra/ , Python, 16 lineshydra.py - scripts/
05.hydra/ , Python, 16 lineshydra414.py - scripts/
05.hydra/ , Python, 152 linesplot_sustain_stages.py - scripts/
06.stats/ , R, 1,142 lines, 2 matchesOrganizeData.Rmd - scripts/
06.stats/ , Quarto, 1,216 lines, 3 matchesR_NAM_stats.qmd - scripts/
R1/ , R, 2,455 linesOrganizeData_R1.Rmd - scripts/
R1/ , Python, 76 linesmean_maps.py - scripts/
R1/ , Shell, 45 lines, 1 matchprobability_maps.sh - scripts/
R1/ , Python, 82 linesstd_maps.py - scripts/
R_NAM_stats.qmd , Quarto, 615 lines, 1 match - LICENSE, License, 21 lines
- README.md, Text, 93 lines
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:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 80 scripts, each with its path and the digest of its content;
- 11 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
No dataset and no data link were found in the paper.
Data, code, and materials availability
All data and code needed to evaluate and reproduce the results in the paper are present in the paper and/
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, 14 November 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 18 authors, 12 MeSH terms, 8 funders, 67 references.
Cite
This paper
Barrantes-Cepas, M., Tranfa, M., van Nederpelt, D. R., Koubiyr, I., Lorenzini, L., Helmlinger, B., Ropele, S., Pinter, D., Enzinger, C., Uher, T., Vaneckova, M., Killestein, J., Strijbis, E. M. M., Steenwijk, M. D., Vrenken, H., Barkhof, F., Schoonheim, M. M., & Pontillo, G. (2026). The role of network connectivity and transcriptomic vulnerability in shaping gray matter atrophy in multiple sclerosis. Science advances, 12(46), eaeg3412. https://
BibTeX
@article{barrantescepas2
author = {Barrantes-Cepas, Mar and Tranfa, Mario and van Nederpelt, David R and Koubiyr, Ismail and Lorenzini, Luigi and Helmlinger, Birgit and Ropele, Stefan and Pinter, Daniela and Enzinger, Christian and Uher, Tomas and Vaneckova, Manuela and Killestein, Joep and Strijbis, Eva M M and Steenwijk, Martijn D and Vrenken, Hugo and Barkhof, Frederik and Schoonheim, Menno M and Pontillo, Giuseppe},
title = {{The role of network connectivity and transcriptomic vulnerability in shaping gray matter atrophy in multiple sclerosis}},
journal = {Science advances},
year = {2026},
month = nov,
volume = {12},
number = {46},
pages = {eaeg3412},
publisher = {American Association for the Advancement of Science},
issn = {2375-2548},
doi = {10.1126/
url = {https://
pmid = {43013671},
pmcid = {PMC13754032}
}
RIS
TY - JOUR
AU - Barrantes-Cepas, Mar
AU - Tranfa, Mario
AU - van Nederpelt, David R
AU - Koubiyr, Ismail
AU - Lorenzini, Luigi
AU - Helmlinger, Birgit
AU - Ropele, Stefan
AU - Pinter, Daniela
AU - Enzinger, Christian
AU - Uher, Tomas
AU - Vaneckova, Manuela
AU - Killestein, Joep
AU - Strijbis, Eva M M
AU - Steenwijk, Martijn D
AU - Vrenken, Hugo
AU - Barkhof, Frederik
AU - Schoonheim, Menno M
AU - Pontillo, Giuseppe
TI - The role of network connectivity and transcriptomic vulnerability in shaping gray matter atrophy in multiple sclerosis
T2 - Science advances
J2 - Sci Adv
PY - 2026
DA - 2026/
VL - 12
IS - 46
SP - eaeg3412
SN - 2375-2548
PB - American Association for the Advancement of Science
DO - 10.1126/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1126/
"type": "article-journal",
"title": "The role of network connectivity and transcriptomic vulnerability in shaping gray matter atrophy in multiple sclerosis",
"container-title": "Science advances",
"author": [
{
"family": "Barrantes-Cepas",
"given": "Mar"
},
{
"family": "Tranfa",
"given": "Mario"
},
{
"family": "van Nederpelt",
"given": "David R"
},
{
"family": "Koubiyr",
"given": "Ismail"
},
{
"family": "Lorenzini",
"given": "Luigi"
},
{
"family": "Helmlinger",
"given": "Birgit"
},
{
"family": "Ropele",
"given": "Stefan"
},
{
"family": "Pinter",
"given": "Daniela"
},
{
"family": "Enzinger",
"given": "Christian"
},
{
"family": "Uher",
"given": "Tomas"
},
{
"family": "Vaneckova",
"given": "Manuela"
},
{
"family": "Killestein",
"given": "Joep"
},
{
"family": "Strijbis",
"given": "Eva M M"
},
{
"family": "Steenwijk",
"given": "Martijn D"
},
{
"family": "Vrenken",
"given": "Hugo"
},
{
"family": "Barkhof",
"given": "Frederik"
},
{
"family": "Schoonheim",
"given": "Menno M"
},
{
"family": "Pontillo",
"given": "Giuseppe"
}
],
"container-title-short":
"volume": "12",
"issue": "46",
"page": "eaeg3412",
"DOI": "10.1126/
"PMID": "43013671",
"PMCID": "PMC13754032",
"ISSN": "2375-2548",
"publisher": "American Association for the Advancement of Science",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
11,
11
]
]
}
}
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.1016/j.ynirp.2025.100252 [code]
- Repeatability and reproducibility of brain age estimates in multiple sclerosis for three publicly available models.Journal: Neuroimage. ReportsIn common: FSL, NiBabel, tidyverse, 3 other tools, multiple sclerosis, structural MRI / diffusion, 2 references, 3 authors
- [2] doi:10.1002/hbm.70480 [code]
- Time-Varying Brain Functional Reconfiguration Patterns Associated With Fatigue in Multiple Sclerosis.Journal: Human brain mappingIn common: multiple sclerosis, structural MRI / diffusion, 1 reference, 4 authors
- [3] doi:10.1038/s43856-026-01707-2 [code]
- Decreased amyloid-related structure-function coupling in preclinical Alzheimer's disease.Journal: Communications medicineIn common: NiBabel, pandas, SciPy, 2 other tools, 1 reference, 4 authors
- [4] doi:10.1002/hbm.26144 [code]
- Benchmarking the generalizability of brain age models: Challenges posed by scanner variance and prediction bias.Journal: Human brain mappingIn common: mgcv, nlme, broom, 10 other tools, structural MRI / diffusion, 3 references
- [5] doi:10.1093/brain/awac180 [code]
- Regional healthy brain activity, glioma occurrence and symptomatology.Journal: Brain : a journal of neurologyIn common: nlme, Pingouin, rstatix, 9 other tools, author Menno M Schoonheim
- [6] doi:10.1371/journal.pbio.3002710 [code]
- The multiscale brain structural re-organization that occurs from childhood to adolescence correlates with cortical morphology maturation and functional specialization.Journal: PLoS biologyIn common: mgcv, nlme, rstatix, 8 other tools, structural MRI / diffusion, 4 references
- [7] doi:10.1038/s41467-025-60556-0 [code]
- Cell-specific mechanisms drive connectivity across the time course of Huntington's disease.Journal: Nature communicationsIn common: statsmodels, NiBabel, ggplot2, 5 other tools, structural MRI / diffusion, 8 references
- [8] doi:10.1093/braincomms/fcae234 [code]
- Longitudinal network-based brain grey matter MRI measures are clinically relevant and sensitive to treatment effects in multiple sclerosis.Journal: Brain communicationsIn common: NiBabel, pandas, NumPy, multiple sclerosis, structural MRI / diffusion, 5 references, author Frederik Barkhof
- [9] doi:10.1002/alz.70762 [code]
- Cortical thickness subtypes in cognitively unimpaired individuals: Differential network and transcriptomic vulnerability to cortical thinning.Journal: Alzheimer's & dementia : the journal of the Alzheimer's AssociationIn common: NiBabel, pandas, SciPy, 1 other tool, structural MRI / diffusion, genetics / omics, 3 references, 2 authors
- [10] doi:10.1186/s12916-025-04099-7 [code]
- Normative structural connectome constrains spreading transient brain activity in generalized epilepsy.Journal: BMC medicineIn common: mgcv, FSL, NiBabel, 4 other tools, structural MRI / diffusion, 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 80 scripts, and 11 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:a03e7eeb8ebab334…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1126/sciadv.aeg3412)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1126/sciadv.aeg3412.svg
:target: https://openscicode.org/badge/doi/10.1126/sciadv.aeg3412
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1126/sciadv.aeg3412"><img src="https://openscicode.org/badge/doi/10.1126/sciadv.aeg3412.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge 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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
