OSCR

Hippocampal subfield thickness and shape analysis in examining the impact of TDP-43 in primary age-related tauopathy.

Code ↔ Paper

1 match between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 1 match
  1. [1] § RESULTS › Demographics and neuropathological characteristics ↔ thickness_cluster_permutation/lh_thickness_cluster_permutation.py, lines 866–919 · score 0.54 · Braak III IV, Braak stage, subset, tau, pathology, TDP

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 · 953 lines · 36 KB · MIT · 1 match

  1. import pandas as pd
  2. import numpy as np
  3. import matplotlib.pyplot as plt
  4. from mne.stats import permutation_cluster_test
  5. from matplotlib.colors import LinearSegmentedColormap
  6. import pyvista as pv
  7. import statsmodels.api as sm
  8. np.random.seed(42)
  9. # =============================================================================
  10. # DATA PATHS - UPDATE THESE FOR YOUR SYSTEM
  11. # =============================================================================
  12. # Left hemisphere thickness grid data from HIPSTA (41x21 grid)
  13. THICKNESS_FILE = "path/to/your/lh_thickness_data.csv"
  14. # Left hemisphere subfield labels for plot overlay
  15. SUBFIELD_LABELS_FILE = "path/to/your/lh_subfield_labels.csv"
  16. # === Load the CSV file ===
  17. df = pd.read_csv(THICKNESS_FILE)
  18. # === Load Subfield Outline ===
  19. outline_df = pd.read_csv(SUBFIELD_LABELS_FILE)
  20. # === Overlay subfield boundaries ===
  21. label_matrix = outline_df.pivot_table(index="x", columns="y", values="subfield label", aggfunc="first").to_numpy()
  22. label_matrix = np.fliplr(label_matrix.T)
  23. label_matrix = np.fliplr(label_matrix) # Flip again inside plotting
  24. # Extract numeric x index
  25. df['x_index'] = df['axis'].str.extract(r'x(\d+)').astype(int)
  26. # Get unique subjects
  27. subjects = df['mrn'].unique()
  28. # === Organize into Groups ===
  29. group0 = [] # Control
  30. group1 = [] # PART
  31. for subj in subjects:
  32. subj_df = df[df['mrn'] == subj].sort_values("x_index")
  33. matrix = subj_df.loc[:, "y0":"y20"].to_numpy()
  34. group_label = subj_df["PART=1_control=0"].iloc[0]
  35. if group_label == 0:
  36. group0.append(matrix)
  37. else:
  38. group1.append(matrix)
  39. group0 = np.array(group0)
  40. group1 = np.array(group1)
  41. print(f"Group 0 (Control): {group0.shape}")
  42. print(f"Group 1 (PART): {group1.shape}")
  43. # === Run Cluster Permutation with MNE ===
  44. X = [group0, group1]
  45. T_obs, clusters, p_values, H0 = permutation_cluster_test(
  46. X,
  47. n_permutations=1000, # default was 1000 permutations
  48. tail=0, # two-sided test
  49. n_jobs=1 # single-threaded
  50. )
  51. # === Significance Mask ===
  52. significance_mask = np.zeros_like(T_obs, dtype=bool)
  53. for i, p_val in enumerate(p_values):
  54. if p_val < 0.05:
  55. significance_mask[clusters[i]] = True
  56. # === Hedges' g calculation ===
  57. def compute_hedges_g(g1, g2):
  58. mean_diff = np.nanmean(g1, axis=0) - np.nanmean(g2, axis=0)
  59. n1, n2 = g1.shape[0], g2.shape[0]
  60. pooled_sd = np.sqrt(((n1 - 1) * np.nanvar(g1, axis=0) + (n2 - 1) * np.nanvar(g2, axis=0)) / (n1 + n2 - 2))
  61. d = mean_diff / pooled_sd
  62. correction = 1 - (3 / (4 * (n1 + n2) - 9))
  63. return d * correction
  64. # === Plotting Cluster Permutation with Hedges' g shown only in significant regions ===
  65. def plot_cluster_permutation_with_effect_size(d_map, sig_mask, title, save_path, outline_df):
  66. flipped_d = np.fliplr(d_map.T)
  67. flipped_mask = np.fliplr(sig_mask.T)
  68. label_matrix = outline_df.pivot_table(index="x", columns="y", values="subfield label", aggfunc="first").to_numpy()
  69. label_matrix = np.fliplr(label_matrix.T)
  70. masked_d = np.ma.masked_where(~flipped_mask, flipped_d)
  71. fig, ax = plt.subplots(figsize=(10, 6))
  72. vmin = 0
  73. vmax = np.nanmax(d_map)
  74. im = ax.imshow(masked_d, cmap='Reds', origin='lower', extent=[40, 0, 0, 20], aspect='auto',
  75. vmin=vmin, vmax=vmax)
  76. ax.contour(flipped_mask, levels=[0.5], colors='black', linewidths=0.5,
  77. origin='lower', extent=[40, 0, 0, 20])
  78. ax.contour(label_matrix, levels=np.unique(label_matrix), linewidths=0.5,
  79. colors='gray', origin='lower', extent=[40, 0, 0, 20])
  80. ax.set_title(title, fontsize=16)
  81. ax.set_xlabel("Lateral -> Medial", fontsize=14)
  82. ax.set_ylabel("Posterior -> Anterior", fontsize=14)
  83. ax.tick_params(axis='y', labelsize=18)
  84. cbar = plt.colorbar(im, ax=ax, label="Hedges' g (masked by Cluster Permutation significance)")
  85. cbar.ax.tick_params(labelsize=18)
  86. plt.tight_layout()
  87. plt.savefig(save_path, dpi=300)
  88. plt.close()
  89. # === Cluster Permutation Result Summary ===
  90. def summarize_cluster_permutation_results(d_map, sig_mask, group0, group1, label):
  91. n_sig = np.sum(sig_mask)
  92. print(f"\n--- {label} ---")
  93. print(f"Significant Points: {n_sig}")
  94. if n_sig > 0 and np.sum(~np.isnan(d_map[sig_mask])) > 0:
  95. mean_effect = np.nanmean(d_map[sig_mask])
  96. max_effect = np.nanmax(np.abs(d_map[sig_mask]))
  97. print(f"Mean Hedges' g in sig. area: {mean_effect:.3f}")
  98. print(f"Max abs(Hedges' g): {max_effect:.3f}")
  99. else:
  100. print("No significant regions to summarize (empty or NaN values).")
  101. print(f"Sample Sizes: Group0 = {group0.shape[0]}, Group1 = {group1.shape[0]}")
  102. # === PART vs Control plot (Control - PART) ===
  103. d_part_control = compute_hedges_g(group0, group1)
  104. plot_cluster_permutation_with_effect_size(d_part_control, significance_mask, "Cluster permutation Significance over Hedges' g\n(Control vs PART)", "lh.cluster_perm_hedgesg_part_vs_control.png", outline_df)
  105. summarize_cluster_permutation_results(d_part_control, significance_mask, group0, group1, "Control vs PART")
  106. # === TDP subgroups Cluster Permutation and Effect Overlay ===
  107. def run_cluster_permutation_comparison(df, group_a, group_b, label, save_name):
  108. group0, group1 = [], []
  109. for subj in df['mrn'].unique():
  110. subj_df = df[df['mrn'] == subj].sort_values("x_index")
  111. tdp_label = subj_df['tdp_status'].iloc[0]
  112. if tdp_label not in [group_a, group_b]:
  113. continue
  114. matrix = subj_df.loc[:, "y0":"y20"].to_numpy()
  115. if tdp_label == group_a:
  116. group0.append(matrix)
  117. elif tdp_label == group_b:
  118. group1.append(matrix)
  119. group0 = np.array(group0)
  120. group1 = np.array(group1)
  121. print(f"{label} comparison -> Group {group_a}: {group0.shape}, Group {group_b}: {group1.shape}")
  122. d_map = compute_hedges_g(group0, group1)
  123. X = [group0, group1]
  124. T_obs, clusters, p_values, H0 = permutation_cluster_test(
  125. X,
  126. n_permutations=1000, # default was 1000 permutations
  127. tail=0, # two-sided test
  128. n_jobs=1 # single-threaded
  129. )
  130. sig_mask = np.zeros_like(T_obs, dtype=bool)
  131. for i, p in enumerate(p_values):
  132. if p < 0.05:
  133. sig_mask[clusters[i]] = True
  134. safe_save_name = save_name.replace("−", "-").replace("–", "-") # Ensure ASCII-safe filenames
  135. effect_overlay_name = safe_save_name.replace("Cluster permutation", "ClusterPerm_hedgesg")
  136. plot_cluster_permutation_with_effect_size(d_map, sig_mask, f"Cluster permutation Significance over Hedges' g\n{label}", effect_overlay_name, outline_df)
  137. summarize_cluster_permutation_results(d_map, sig_mask, group0, group1, label)
  138. # Check if sig_mask has any True values
  139. if np.any(sig_mask) and np.sum(~np.isnan(d_map[sig_mask])) > 0:
  140. max_effect = np.nanmax(np.abs(d_map[sig_mask]))
  141. print(f"Max effect size in significant regions for {label}: {max_effect:.3f}")
  142. else:
  143. print(f"No significant regions found for {label}.")
  144. return T_obs, sig_mask, f"Cluster permutation-enhanced T-value\n({label})", save_name
  145. T1, M1, title1, file1 = run_cluster_permutation_comparison(df, 0, 1, "(TDP− vs TDP+)", "lh.cluster_perm_tdp0_vs_tdp1.png")
  146. T2, M2, title2, file2 = run_cluster_permutation_comparison(df, 2, 0, "(Control vs TDP−)", "lh.cluster_perm_tdp2_vs_tdp0.png")
  147. T3, M3, title3, file3 = run_cluster_permutation_comparison(df, 2, 1, "(Control vs TDP+)", "lh.cluster_perm_tdp2_vs_tdp1.png")
  148. # === Save VTK ===
  149. import pyvista as pv
  150. mesh_path = "path/to/your/mesh_file.vtk" # UPDATE: Replace with your mesh path
  151. base_mesh = pv.read(mesh_path)
  152. flipped_mesh = base_mesh.copy()
  153. x_coords = flipped_mesh.points[:, 0]
  154. flipped_mesh.points[:, 0] = x_coords.max() - x_coords + x_coords.min()
  155. y_coords = flipped_mesh.points[:, 1]
  156. flipped_mesh.points[:, 1] = y_coords.max() - y_coords + y_coords.min()
  157. masks = {
  158. "ClusterPerm_PART_vs_Control": significance_mask,
  159. "ClusterPerm_TDPneg_vs_TDPpos": M1,
  160. "ClusterPerm_TDPneg_vs_Control": M2,
  161. "ClusterPerm_TDPpos_vs_Control": M3
  162. }
  163. for label, mask in masks.items():
  164. mesh = flipped_mesh.copy()
  165. flat_mask = mask.flatten()
  166. if flat_mask.shape[0] != mesh.n_points:
  167. raise ValueError(f"Shape mismatch for {label}: mask has {flat_mask.shape[0]} values, but mesh has {mesh.n_points} vertices")
  168. mesh[label] = flat_mask.astype(int)
  169. output_path = label.replace("ClusterPerm_", "lh.mid-surface_") + ".vtk"
  170. mesh.save(output_path)
  171. print(f"Saved: {output_path}")
  172. #########################################################################
  173. ############################################################################
  174. # === Additional Cluster Permutation: TDP− vs TDP+ restricted to Subfield 234 ===
  175. print("\nRunning Cluster Permutation for TDP− vs TDP+ restricted to Subfield 234...")
  176. subfield_234_mask = (label_matrix == 234) # Already correct (21,41)
  177. group0_sub234, group1_sub234 = [], []
  178. for subj in df['mrn'].unique():
  179. subj_df = df[df['mrn'] == subj].sort_values("x_index")
  180. tdp_label = subj_df['tdp_status'].iloc[0]
  181. if tdp_label not in [0, 1]:
  182. continue
  183. matrix = subj_df.loc[:, "y0":"y20"].to_numpy() # (41,21)
  184. matrix = matrix.T # NOW (21,41)
  185. masked_matrix = np.where(subfield_234_mask, matrix, np.nan)
  186. if tdp_label == 0:
  187. group0_sub234.append(masked_matrix)
  188. elif tdp_label == 1:
  189. group1_sub234.append(masked_matrix)
  190. group0_sub234 = np.array(group0_sub234)
  191. group1_sub234 = np.array(group1_sub234)
  192. print(f"Subfield 234 Group0 (TDP−): {group0_sub234.shape}, Group1 (TDP+): {group1_sub234.shape}")
  193. # Extract valid points
  194. group0_masked = np.stack([m[subfield_234_mask] for m in group0_sub234])
  195. group1_masked = np.stack([m[subfield_234_mask] for m in group1_sub234])
  196. print(f"Masked Subfield 234 Group0: {group0_masked.shape}, Group1: {group1_masked.shape}")
  197. # Cluster Permutation
  198. X_sub234 = [group0_masked, group1_masked]
  199. T_obs_sub234, clusters_sub234, p_values_sub234, H0_sub234 = permutation_cluster_test(
  200. X_sub234,
  201. n_permutations=1000, # default was 1000 permutations
  202. tail=0, # two-sided test
  203. n_jobs=1 # single-threaded
  204. )
  205. # Significance
  206. sig_mask_sub234 = np.zeros_like(T_obs_sub234, dtype=bool)
  207. for i, p in enumerate(p_values_sub234):
  208. if p < 0.05:
  209. sig_mask_sub234[clusters_sub234[i]] = True
  210. # Rebuild maps
  211. full_d_map_sub234 = np.full(subfield_234_mask.shape, np.nan) # (21,41)
  212. full_sig_mask_sub234 = np.zeros(subfield_234_mask.shape, dtype=bool)
  213. full_d_map_sub234[subfield_234_mask] = compute_hedges_g(group0_masked, group1_masked)
  214. full_sig_mask_sub234[subfield_234_mask] = sig_mask_sub234
  215. # Save and plot
  216. plot_cluster_permutation_with_effect_size(
  217. full_d_map_sub234.T, # Flip back for plotting (41,21)
  218. full_sig_mask_sub234.T,
  219. "Cluster permutation Significance over Hedges' g\n(TDP− vs TDP+) Subfield 234",
  220. "lh.cluster_perm_hedgesg_tdp0_vs_tdp1_subfield234.png",
  221. outline_df
  222. )
  223. summarize_cluster_permutation_results(
  224. full_d_map_sub234.T,
  225. full_sig_mask_sub234.T,
  226. group0_masked,
  227. group1_masked,
  228. "(TDP− vs TDP+) Subfield 234"
  229. )
  230. print(f"Completed Cluster Permutation for Subfield 234!")
  231. # === Save Subfield 234 Cluster Permutation mask into VTK ===
  232. vtk_label = "ClusterPerm_TDPneg_vs_TDPpos_Subfield234"
  233. # Load and flip the base mesh again
  234. mesh_path = "path/to/your/mesh_file.vtk" # UPDATE: Replace with your mesh path
  235. base_mesh = pv.read(mesh_path)
  236. flipped_mesh = base_mesh.copy()
  237. x_coords = flipped_mesh.points[:, 0]
  238. flipped_mesh.points[:, 0] = x_coords.max() - x_coords + x_coords.min()
  239. y_coords = flipped_mesh.points[:, 1]
  240. flipped_mesh.points[:, 1] = y_coords.max() - y_coords + y_coords.min()
  241. # Prepare the flat mask
  242. flat_mask_234 = full_sig_mask_sub234.T.flatten() # Note .T to match mesh
  243. if flat_mask_234.shape[0] != flipped_mesh.n_points:
  244. raise ValueError(f"Shape mismatch for Subfield 234 mask: mask has {flat_mask_234.shape[0]} points, mesh has {flipped_mesh.n_points} vertices.")
  245. # Assign and save
  246. flipped_mesh[vtk_label] = flat_mask_234.astype(int)
  247. output_vtk_path = f"lh.mid-surface_cluster_perm_subfield234.vtk"
  248. flipped_mesh.save(output_vtk_path)
  249. print(f"Saved VTK: {output_vtk_path}")
  250. # === Additional Cluster Permutation: TDP− vs TDP+ restricted to Subfield 236 ===
  251. # === Additional Cluster Permutation: TDP− vs TDP+ restricted to Subfield 236 ===
  252. print("\nRunning Cluster Permutation for TDP− vs TDP+ restricted to Subfield 236...")
  253. subfield_236_mask = (label_matrix == 236) # Already correct (21,41)
  254. group0_sub236, group1_sub236 = [], []
  255. for subj in df['mrn'].unique():
  256. subj_df = df[df['mrn'] == subj].sort_values("x_index")
  257. tdp_label = subj_df['tdp_status'].iloc[0]
  258. if tdp_label not in [0, 1]:
  259. continue
  260. matrix = subj_df.loc[:, "y0":"y20"].to_numpy() # (41,21)
  261. matrix = matrix.T # NOW (21,41)
  262. masked_matrix = np.where(subfield_236_mask, matrix, np.nan)
  263. if tdp_label == 0:
  264. group0_sub236.append(masked_matrix)
  265. elif tdp_label == 1:
  266. group1_sub236.append(masked_matrix)
  267. group0_sub236 = np.array(group0_sub236)
  268. group1_sub236 = np.array(group1_sub236)
  269. print(f"Subfield 236 Group0 (TDP−): {group0_sub236.shape}, Group1 (TDP+): {group1_sub236.shape}")
  270. # Extract valid points
  271. group0_masked = np.stack([m[subfield_236_mask] for m in group0_sub236])
  272. group1_masked = np.stack([m[subfield_236_mask] for m in group1_sub236])
  273. print(f"Masked Subfield 236 Group0: {group0_masked.shape}, Group1: {group1_masked.shape}")
  274. # Cluster Permutation
  275. X_sub236 = [group0_masked, group1_masked]
  276. T_obs_sub236, clusters_sub236, p_values_sub236, H0_sub236 = permutation_cluster_test(
  277. X_sub236,
  278. n_permutations=1000, # default was 1000 permutations
  279. tail=0, # two-sided test
  280. n_jobs=1 # single-threaded
  281. )
  282. # Significance
  283. sig_mask_sub236 = np.zeros_like(T_obs_sub236, dtype=bool)
  284. for i, p in enumerate(p_values_sub236):
  285. if p < 0.05:
  286. sig_mask_sub236[clusters_sub236[i]] = True
  287. # Rebuild maps
  288. full_d_map_sub236 = np.full(subfield_236_mask.shape, np.nan) # (21,41)
  289. full_sig_mask_sub236 = np.zeros(subfield_236_mask.shape, dtype=bool)
  290. full_d_map_sub236[subfield_236_mask] = compute_hedges_g(group0_masked, group1_masked)
  291. full_sig_mask_sub236[subfield_236_mask] = sig_mask_sub236
  292. # Save and plot
  293. plot_cluster_permutation_with_effect_size(
  294. full_d_map_sub236.T, # Flip back for plotting (41,21)
  295. full_sig_mask_sub236.T,
  296. "Cluster permutation Significance over Hedges' g\n(TDP− vs TDP+) Subfield 236",
  297. "lh.cluster_perm_hedgesg_tdp0_vs_tdp1_subfield236.png",
  298. outline_df
  299. )
  300. summarize_cluster_permutation_results(
  301. full_d_map_sub236.T,
  302. full_sig_mask_sub236.T,
  303. group0_masked,
  304. group1_masked,
  305. "(TDP− vs TDP+) Subfield 236"
  306. )
  307. print(f"Completed Cluster Permutation for Subfield 236!")
  308. # === Save Subfield 236 Cluster Permutation mask into VTK ===
  309. vtk_label = "ClusterPerm_TDPneg_vs_TDPpos_Subfield236"
  310. # Load and flip the base mesh again
  311. mesh_path = "path/to/your/mesh_file.vtk" # UPDATE: Replace with your mesh path
  312. base_mesh = pv.read(mesh_path)
  313. flipped_mesh = base_mesh.copy()
  314. x_coords = flipped_mesh.points[:, 0]
  315. flipped_mesh.points[:, 0] = x_coords.max() - x_coords + x_coords.min()
  316. y_coords = flipped_mesh.points[:, 1]
  317. flipped_mesh.points[:, 1] = y_coords.max() - y_coords + y_coords.min()
  318. # Prepare the flat mask
  319. flat_mask_236 = full_sig_mask_sub236.T.flatten() # Note .T to match mesh
  320. if flat_mask_236.shape[0] != flipped_mesh.n_points:
  321. raise ValueError(f"Shape mismatch for Subfield 236 mask: mask has {flat_mask_236.shape[0]} points, mesh has {flipped_mesh.n_points} vertices.")
  322. # Assign and save
  323. flipped_mesh[vtk_label] = flat_mask_236.astype(int)
  324. output_vtk_path = f"lh.mid-surface_cluster_perm_subfield236.vtk"
  325. flipped_mesh.save(output_vtk_path)
  326. print(f"Saved VTK: {output_vtk_path}")
  327. # === Additional Cluster Permutation: TDP− vs TDP+ restricted to Subfield 238 ===
  328. print("\nRunning Cluster Permutation for TDP− vs TDP+ restricted to Subfield 238...")
  329. subfield_238_mask = (label_matrix == 238) # Already correct (21,41)
  330. group0_sub238, group1_sub238 = [], []
  331. for subj in df['mrn'].unique():
  332. subj_df = df[df['mrn'] == subj].sort_values("x_index")
  333. tdp_label = subj_df['tdp_status'].iloc[0]
  334. if tdp_label not in [0, 1]:
  335. continue
  336. matrix = subj_df.loc[:, "y0":"y20"].to_numpy() # (41,21)
  337. matrix = matrix.T # NOW (21,41)
  338. masked_matrix = np.where(subfield_238_mask, matrix, np.nan)
  339. if tdp_label == 0:
  340. group0_sub238.append(masked_matrix)
  341. elif tdp_label == 1:
  342. group1_sub238.append(masked_matrix)
  343. group0_sub238 = np.array(group0_sub238)
  344. group1_sub238 = np.array(group1_sub238)
  345. print(f"Subfield 238 Group0 (TDP−): {group0_sub238.shape}, Group1 (TDP+): {group1_sub238.shape}")
  346. # Extract valid points
  347. group0_masked = np.stack([m[subfield_238_mask] for m in group0_sub238])
  348. group1_masked = np.stack([m[subfield_238_mask] for m in group1_sub238])
  349. print(f"Masked Subfield 238 Group0: {group0_masked.shape}, Group1: {group1_masked.shape}")
  350. # Cluster Permutation
  351. X_sub238 = [group0_masked, group1_masked]
  352. T_obs_sub238, clusters_sub238, p_values_sub238, H0_sub238 = permutation_cluster_test(
  353. X_sub238,
  354. n_permutations=1000, # default was 1000 permutations
  355. tail=0, # two-sided test
  356. n_jobs=1 # single-threaded
  357. )
  358. # Significance
  359. sig_mask_sub238 = np.zeros_like(T_obs_sub238, dtype=bool)
  360. for i, p in enumerate(p_values_sub238):
  361. if p < 0.05:
  362. sig_mask_sub238[clusters_sub238[i]] = True
  363. # Rebuild maps
  364. full_d_map_sub238 = np.full(subfield_238_mask.shape, np.nan) # (21,41)
  365. full_sig_mask_sub238 = np.zeros(subfield_238_mask.shape, dtype=bool)
  366. full_d_map_sub238[subfield_238_mask] = compute_hedges_g(group0_masked, group1_masked)
  367. full_sig_mask_sub238[subfield_238_mask] = sig_mask_sub238
  368. # Save and plot
  369. plot_cluster_permutation_with_effect_size(
  370. full_d_map_sub238.T, # Flip back for plotting (41,21)
  371. full_sig_mask_sub238.T,
  372. "Cluster permutation Significance over Hedges' g\n(TDP− vs TDP+) Subfield 238",
  373. "lh.cluster_perm_hedgesg_tdp0_vs_tdp1_subfield238.png",
  374. outline_df
  375. )
  376. summarize_cluster_permutation_results(
  377. full_d_map_sub238.T,
  378. full_sig_mask_sub238.T,
  379. group0_masked,
  380. group1_masked,
  381. "(TDP− vs TDP+) Subfield 238"
  382. )
  383. print(f"Completed Cluster Permutation for Subfield 238!")
  384. # === Save Subfield 238 Cluster Permutation mask into VTK ===
  385. vtk_label = "ClusterPerm_TDPneg_vs_TDPpos_Subfield238"
  386. # Load and flip the base mesh again
  387. mesh_path = "path/to/your/mesh_file.vtk" # UPDATE: Replace with your mesh path
  388. base_mesh = pv.read(mesh_path)
  389. flipped_mesh = base_mesh.copy()
  390. x_coords = flipped_mesh.points[:, 0]
  391. flipped_mesh.points[:, 0] = x_coords.max() - x_coords + x_coords.min()
  392. y_coords = flipped_mesh.points[:, 1]
  393. flipped_mesh.points[:, 1] = y_coords.max() - y_coords + y_coords.min()
  394. # Prepare the flat mask
  395. flat_mask_238 = full_sig_mask_sub238.T.flatten() # Note .T to match mesh
  396. if flat_mask_238.shape[0] != flipped_mesh.n_points:
  397. raise ValueError(f"Shape mismatch for Subfield 238 mask: mask has {flat_mask_238.shape[0]} points, mesh has {flipped_mesh.n_points} vertices.")
  398. # Assign and save
  399. flipped_mesh[vtk_label] = flat_mask_238.astype(int)
  400. output_vtk_path = f"lh.mid-surface_cluster_perm_subfield238.vtk"
  401. flipped_mesh.save(output_vtk_path)
  402. print(f"Saved VTK: {output_vtk_path}")
  403. # === Additional Cluster Permutation: TDP− vs TDP+ restricted to Subfield 240 ===
  404. print("\nRunning Cluster Permutation for TDP− vs TDP+ restricted to Subfield 240...")
  405. subfield_240_mask = (label_matrix == 240) # Already correct (21,41)
  406. group0_sub240, group1_sub240 = [], []
  407. for subj in df['mrn'].unique():
  408. subj_df = df[df['mrn'] == subj].sort_values("x_index")
  409. tdp_label = subj_df['tdp_status'].iloc[0]
  410. if tdp_label not in [0, 1]:
  411. continue
  412. matrix = subj_df.loc[:, "y0":"y20"].to_numpy() # (41,21)
  413. matrix = matrix.T # NOW (21,41)
  414. masked_matrix = np.where(subfield_240_mask, matrix, np.nan)
  415. if tdp_label == 0:
  416. group0_sub240.append(masked_matrix)
  417. elif tdp_label == 1:
  418. group1_sub240.append(masked_matrix)
  419. group0_sub240 = np.array(group0_sub240)
  420. group1_sub240 = np.array(group1_sub240)
  421. print(f"Subfield 240 Group0 (TDP−): {group0_sub240.shape}, Group1 (TDP+): {group1_sub240.shape}")
  422. # Extract valid points
  423. group0_masked = np.stack([m[subfield_240_mask] for m in group0_sub240])
  424. group1_masked = np.stack([m[subfield_240_mask] for m in group1_sub240])
  425. print(f"Masked Subfield 240 Group0: {group0_masked.shape}, Group1: {group1_masked.shape}")
  426. # Cluster Permutation
  427. X_sub240 = [group0_masked, group1_masked]
  428. T_obs_sub240, clusters_sub240, p_values_sub240, H0_sub240 = permutation_cluster_test(
  429. X_sub240,
  430. n_permutations=1000, # default was 1000 permutations
  431. tail=0, # two-sided test
  432. n_jobs=1 # single-threaded
  433. )
  434. # Significance
  435. sig_mask_sub240 = np.zeros_like(T_obs_sub240, dtype=bool)
  436. for i, p in enumerate(p_values_sub240):
  437. if p < 0.05:
  438. sig_mask_sub240[clusters_sub240[i]] = True
  439. # Rebuild maps
  440. full_d_map_sub240 = np.full(subfield_240_mask.shape, np.nan) # (21,41)
  441. full_sig_mask_sub240 = np.zeros(subfield_240_mask.shape, dtype=bool)
  442. full_d_map_sub240[subfield_240_mask] = compute_hedges_g(group0_masked, group1_masked)
  443. full_sig_mask_sub240[subfield_240_mask] = sig_mask_sub240
  444. # Save and plot
  445. plot_cluster_permutation_with_effect_size(
  446. full_d_map_sub240.T, # Flip back for plotting (41,21)
  447. full_sig_mask_sub240.T,
  448. "Cluster permutation Significance over Hedges' g\n(TDP− vs TDP+) Subfield 240",
  449. "lh.cluster_perm_hedgesg_tdp0_vs_tdp1_subfield240.png",
  450. outline_df
  451. )
  452. summarize_cluster_permutation_results(
  453. full_d_map_sub240.T,
  454. full_sig_mask_sub240.T,
  455. group0_masked,
  456. group1_masked,
  457. "(TDP− vs TDP+) Subfield 240"
  458. )
  459. print(f"Completed Cluster Permutation for Subfield 240!")
  460. # === Save Subfield 240 Cluster Permutation mask into VTK ===
  461. vtk_label = "ClusterPerm_TDPneg_vs_TDPpos_Subfield240"
  462. # Load and flip the base mesh again
  463. mesh_path = "path/to/your/mesh_file.vtk" # UPDATE: Replace with your mesh path
  464. base_mesh = pv.read(mesh_path)
  465. flipped_mesh = base_mesh.copy()
  466. x_coords = flipped_mesh.points[:, 0]
  467. flipped_mesh.points[:, 0] = x_coords.max() - x_coords + x_coords.min()
  468. y_coords = flipped_mesh.points[:, 1]
  469. flipped_mesh.points[:, 1] = y_coords.max() - y_coords + y_coords.min()
  470. # Prepare the flat mask
  471. flat_mask_240 = full_sig_mask_sub240.T.flatten() # Note .T to match mesh
  472. if flat_mask_240.shape[0] != flipped_mesh.n_points:
  473. raise ValueError(f"Shape mismatch for Subfield 240 mask: mask has {flat_mask_240.shape[0]} points, mesh has {flipped_mesh.n_points} vertices.")
  474. # Assign and save
  475. flipped_mesh[vtk_label] = flat_mask_240.astype(int)
  476. output_vtk_path = f"lh.mid-surface_cluster_perm_subfield240.vtk"
  477. flipped_mesh.save(output_vtk_path)
  478. print(f"Saved VTK: {output_vtk_path}")
  479. ##########################################################
  480. ######### Braak Cluster Permutation Comparisons in TDP-Negatives ########
  481. ##########################################################
  482. print("\n===== Running Braak Stage Comparisons inside TDP-negatives (TDP0 + TDP2) =====\n")
  483. # Subset only TDP-negative subjects
  484. df_tdpneg = df[df['tdp_status'].isin([0,2])]
  485. # Load and prepare the base left hemisphere mesh
  486. mesh_path = "path/to/your/mesh_file.vtk" # UPDATE: Replace with your mesh path
  487. base_mesh = pv.read(mesh_path)
  488. flipped_mesh = base_mesh.copy()
  489. x_coords = flipped_mesh.points[:, 0]
  490. flipped_mesh.points[:, 0] = x_coords.max() - x_coords + x_coords.min()
  491. y_coords = flipped_mesh.points[:, 1]
  492. flipped_mesh.points[:, 1] = y_coords.max() - y_coords + y_coords.min()
  493. def run_braak_cluster_permutation_comparison(df_subset, braak_a, braak_b, label, save_prefix):
  494. group0, group1 = [], []
  495. for subj in df_subset['mrn'].unique():
  496. subj_df = df_subset[df_subset['mrn'] == subj].sort_values("x_index")
  497. braak_label = subj_df['braak_stage'].iloc[0] # Corrected to braak_stage
  498. if braak_label not in [braak_a, braak_b]:
  499. continue
  500. matrix = subj_df.loc[:, "y0":"y20"].to_numpy()
  501. if braak_label == braak_a:
  502. group0.append(matrix)
  503. elif braak_label == braak_b:
  504. group1.append(matrix)
  505. group0 = np.array(group0)
  506. group1 = np.array(group1)
  507. print(f"{label}: Group {braak_a}: {group0.shape}, Group {braak_b}: {group1.shape}")
  508. if len(group0) == 0 or len(group1) == 0:
  509. print(f"Not enough subjects for {label}. Skipping...")
  510. return None, None
  511. if group0.shape[1:] != group1.shape[1:]:
  512. print(f"Shape mismatch for {label}: {group0.shape} vs {group1.shape}. Skipping...")
  513. return None, None
  514. X = [group0, group1]
  515. control_group = group0
  516. disease_group = group1
  517. d_map = compute_hedges_g(control_group, disease_group)
  518. T_obs, clusters, p_values, H0 = permutation_cluster_test(
  519. X,
  520. n_permutations=1000, # default was 1000 permutations
  521. tail=0, # two-sided test
  522. n_jobs=1 # single-threaded
  523. )
  524. sig_mask = np.zeros_like(T_obs, dtype=bool)
  525. for i, p in enumerate(p_values):
  526. if p < 0.05:
  527. sig_mask[clusters[i]] = True
  528. return d_map, sig_mask
  529. def save_vtk_with_mask(base_mesh, sig_mask, output_name):
  530. mesh_copy = base_mesh.copy()
  531. flat_mask = sig_mask.T.flatten()
  532. if flat_mask.shape[0] != mesh_copy.n_points:
  533. raise ValueError(f"Mismatch: mask {flat_mask.shape[0]}, mesh {mesh_copy.n_points}")
  534. mesh_copy[output_name] = flat_mask.astype(int)
  535. mesh_copy.save(f"{output_name}.vtk")
  536. print(f"Saved VTK: {output_name}.vtk")
  537. # Loop through Braak stages 1–4
  538. for braak_stage in [1,2,3,4]:
  539. label = f"(Braak {braak_stage} vs Control) [TDP-negative]"
  540. save_prefix = f"lh.cluster_perm_braak0_vs_{braak_stage}_tdpneg"
  541. d_map, sig_mask = run_braak_cluster_permutation_comparison(df_tdpneg, 0, braak_stage, label, save_prefix)
  542. if d_map is None or sig_mask is None:
  543. continue
  544. plot_cluster_permutation_with_effect_size(
  545. d_map,
  546. sig_mask,
  547. f"Cluster permutation Significance over Hedges' g\n{label}",
  548. f"{save_prefix}.png",
  549. outline_df
  550. )
  551. save_vtk_with_mask(flipped_mesh, sig_mask, save_prefix)
  552. print(df_tdpneg['braak_stage'].value_counts())
  553. np.nanmax(np.abs(d_map))
  554. ###############################################################################################################
  555. ##################################### PART without TDP-43 Braak Stratification ############################
  556. ###############################################################################################################
  557. print("\n===== PART without TDP-43 Stratified by Braak Stages vs Controls =====\n")
  558. # Select only PART without TDP-43 subjects (tdp_status = 0) and Controls (tdp_status = 2)
  559. df_part_notdp = df[df['tdp_status'].isin([0, 2])]
  560. # Load and prepare the base left hemisphere mesh
  561. mesh_path = "path/to/your/mesh_file.vtk" # UPDATE: Replace with your mesh path
  562. base_mesh = pv.read(mesh_path)
  563. flipped_mesh = base_mesh.copy()
  564. x_coords = flipped_mesh.points[:, 0]
  565. flipped_mesh.points[:, 0] = x_coords.max() - x_coords + x_coords.min()
  566. y_coords = flipped_mesh.points[:, 1]
  567. flipped_mesh.points[:, 1] = y_coords.max() - y_coords + y_coords.min()
  568. def run_part_braak_cluster_permutation_comparison(df_subset, braak_stages, control_braak, label, save_prefix):
  569. """Compare PART without TDP-43 subjects with specific Braak stages vs Controls"""
  570. group0, group1 = [], []
  571. for subj in df_subset['mrn'].unique():
  572. subj_df = df_subset[df_subset['mrn'] == subj].sort_values("x_index")
  573. tdp_status = subj_df['tdp_status'].iloc[0]
  574. braak_stage = subj_df['braak_stage'].iloc[0]
  575. matrix = subj_df.loc[:, "y0":"y20"].to_numpy()
  576. # Group 0: Controls (tdp_status = 2, braak_stage = 0)
  577. if tdp_status == 2 and braak_stage == control_braak:
  578. group0.append(matrix)
  579. # Group 1: PART without TDP-43 with specified Braak stages
  580. elif tdp_status == 0 and braak_stage in braak_stages:
  581. group1.append(matrix)
  582. group0 = np.array(group0)
  583. group1 = np.array(group1)
  584. print(f"{label}: Controls (n={group0.shape[0]}), PART no-TDP Braak {braak_stages} (n={group1.shape[0]})")
  585. if len(group0) == 0 or len(group1) == 0:
  586. print(f"Not enough subjects for {label}. Skipping...")
  587. return None, None
  588. if group0.shape[1:] != group1.shape[1:]:
  589. print(f"Shape mismatch for {label}: {group0.shape} vs {group1.shape}. Skipping...")
  590. return None, None
  591. X = [group0, group1]
  592. # Controls first (reference group)
  593. control_group = group0
  594. disease_group = group1
  595. d_map = compute_hedges_g(control_group, disease_group)
  596. T_obs, clusters, p_values, H0 = permutation_cluster_test(
  597. X,
  598. n_permutations=1000,
  599. tail=0,
  600. n_jobs=1
  601. )
  602. sig_mask = np.zeros_like(T_obs, dtype=bool)
  603. for i, p in enumerate(p_values):
  604. if p < 0.05:
  605. sig_mask[clusters[i]] = True
  606. return d_map, sig_mask
  607. def save_vtk_with_mask(base_mesh, sig_mask, output_name):
  608. mesh_copy = base_mesh.copy()
  609. flat_mask = sig_mask.T.flatten()
  610. if flat_mask.shape[0] != mesh_copy.n_points:
  611. raise ValueError(f"Mismatch: mask {flat_mask.shape[0]}, mesh {mesh_copy.n_points}")
  612. mesh_copy[output_name] = flat_mask.astype(int)
  613. mesh_copy.save(f"{output_name}.vtk")
  614. print(f"Saved VTK: {output_name}.vtk")
  615. # Comparison 1: PART without TDP-43 Braak I-II vs Controls
  616. d_map_braak12, sig_mask_braak12 = run_part_braak_cluster_permutation_comparison(
  617. df_part_notdp,
  618. braak_stages=[1, 2],
  619. control_braak=0,
  620. label="PART no-TDP Braak I-II vs Controls",
  621. save_prefix="lh.cluster_perm_part_notdp_braak12_vs_controls"
  622. )
  623. if d_map_braak12 is not None and sig_mask_braak12 is not None:
  624. plot_cluster_permutation_with_effect_size(
  625. d_map_braak12,
  626. sig_mask_braak12,
  627. f"Cluster permutation Significance over Hedges' g\n(Controls vs PART no-TDP Braak I-II)",
  628. "lh.cluster_perm_part_notdp_braak12_vs_controls.png",
  629. outline_df
  630. )
  631. save_vtk_with_mask(flipped_mesh, sig_mask_braak12, "lh.cluster_perm_part_notdp_braak12_vs_controls")
  632. summarize_cluster_permutation_results(
  633. d_map_braak12,
  634. sig_mask_braak12,
  635. d_map_braak12,
  636. sig_mask_braak12,
  637. "PART no-TDP Braak I-II vs Controls"
  638. )
  639. print("Completed PART no-TDP Braak I-II vs Controls comparison")
  640. # Comparison 2: PART without TDP-43 Braak III-IV vs Controls
  641. d_map_braak34, sig_mask_braak34 = run_part_braak_cluster_permutation_comparison(
  642. df_part_notdp,
  643. braak_stages=[3, 4],
  644. control_braak=0,
  645. label="PART no-TDP Braak III-IV vs Controls",
  646. save_prefix="lh.cluster_perm_part_notdp_braak34_vs_controls"
  647. )
  648. if d_map_braak34 is not None and sig_mask_braak34 is not None:
  649. plot_cluster_permutation_with_effect_size(
  650. d_map_braak34,
  651. sig_mask_braak34,
  652. f"Cluster permutation Significance over Hedges' g\n(Controls vs PART no-TDP Braak III-IV)",
  653. "lh.cluster_perm_part_notdp_braak34_vs_controls.png",
  654. outline_df
  655. )
  656. save_vtk_with_mask(flipped_mesh, sig_mask_braak34, "lh.cluster_perm_part_notdp_braak34_vs_controls")
  657. summarize_cluster_permutation_results(
  658. d_map_braak34,
  659. sig_mask_braak34,
  660. d_map_braak34,
  661. sig_mask_braak34,
  662. "PART no-TDP Braak III-IV vs Controls"
  663. )
  664. print("Completed PART no-TDP Braak III-IV vs Controls comparison")
  665. # Print summary statistics
  666. print(f"\nSummary of PART without TDP-43 subjects by Braak stage:")
  667. part_notdp_only = df_part_notdp[df_part_notdp['tdp_status'] == 0]
  668. print(part_notdp_only['braak_stage'].value_counts().sort_index())
  669. print(f"\nControls by Braak stage:")
  670. controls_only = df_part_notdp[df_part_notdp['tdp_status'] == 2]
  671. print(controls_only['braak_stage'].value_counts().sort_index())
  672. # Additional comparison: Direct comparison between PART no-TDP Braak I-II vs III-IV
  673. print("\n===== Additional: PART no-TDP Braak I-II vs Braak III-IV =====\n")
  674. d_map_tau_progression, sig_mask_tau_progression = run_part_braak_cluster_permutation_comparison(
  675. df_part_notdp,
  676. braak_stages=[3, 4],
  677. control_braak=[1, 2],
  678. label="PART no-TDP Braak III-IV vs Braak I-II",
  679. save_prefix="lh.cluster_perm_part_notdp_braak34_vs_braak12"
  680. )
  681. # Tau progression comparison function
  682. def run_tau_progression_ClusterPerm_comparison(df_subset, label, save_prefix):
  683. """Compare PART without TDP-43 Braak III-IV vs Braak I-II to investigate tau progression"""
  684. group0, group1 = [], [] # group0 = Braak I-II, group1 = Braak III-IV
  685. for subj in df_subset['mrn'].unique():
  686. subj_df = df_subset[df_subset['mrn'] == subj].sort_values("x_index")
  687. tdp_status = subj_df['tdp_status'].iloc[0]
  688. braak_stage = subj_df['braak_stage'].iloc[0]
  689. # Only include PART without TDP-43 subjects
  690. if tdp_status != 0:
  691. continue
  692. matrix = subj_df.loc[:, "y0":"y20"].to_numpy()
  693. if braak_stage in [1, 2]:
  694. group0.append(matrix)
  695. elif braak_stage in [3, 4]:
  696. group1.append(matrix)
  697. group0 = np.array(group0)
  698. group1 = np.array(group1)
  699. print(f"{label}: Braak I-II (n={group0.shape[0]}), Braak III-IV (n={group1.shape[0]})")
  700. if len(group0) == 0 or len(group1) == 0:
  701. print(f"Not enough subjects for {label}. Skipping...")
  702. return None, None
  703. if group0.shape[1:] != group1.shape[1:]:
  704. print(f"Shape mismatch for {label}: {group0.shape} vs {group1.shape}. Skipping...")
  705. return None, None
  706. X = [group0, group1]
  707. # Braak I-II as reference (less pathology)
  708. control_group = group0
  709. disease_group = group1
  710. d_map = compute_hedges_g(control_group, disease_group)
  711. T_obs, clusters, p_values, H0 = permutation_cluster_test(
  712. X,
  713. n_permutations=1000,
  714. tail=0,
  715. n_jobs=1
  716. )
  717. sig_mask = np.zeros_like(T_obs, dtype=bool)
  718. for i, p in enumerate(p_values):
  719. if p < 0.05:
  720. sig_mask[clusters[i]] = True
  721. return d_map, sig_mask
  722. d_map_tau_prog, sig_mask_tau_prog = run_tau_progression_ClusterPerm_comparison(
  723. df_part_notdp,
  724. label="PART no-TDP Tau Progression (Braak III-IV vs I-II)",
  725. save_prefix="lh.cluster_perm_part_notdp_tau_progression"
  726. )
  727. if d_map_tau_prog is not None and sig_mask_tau_prog is not None:
  728. plot_cluster_permutation_with_effect_size(
  729. d_map_tau_prog,
  730. sig_mask_tau_prog,
  731. f"Cluster permutation Significance over Hedges' g\n(PART no-TDP: Braak I-II vs III-IV)",
  732. "lh.cluster_perm_part_notdp_tau_progression.png",
  733. outline_df
  734. )
  735. save_vtk_with_mask(flipped_mesh, sig_mask_tau_prog, "lh.cluster_perm_part_notdp_tau_progression")
  736. summarize_cluster_permutation_results(
  737. d_map_tau_prog,
  738. sig_mask_tau_prog,
  739. d_map_tau_prog,
  740. sig_mask_tau_prog,
  741. "PART no-TDP Tau Progression"
  742. )
  743. print("Completed PART no-TDP tau progression comparison")

lh_thickness_cluster_permutation.py at commit 769a8f9, under MIT · at the source

Overview

Authors: Hossam Youssef1, Rodolfo G. Gatto1, Ronald C. Petersen1, R. Ross Reichard2, Clifford R. Jack Jr3, Jennifer L. Whitwell3, Keith A. Josephs1
  1. Department of Neurology Mayo Clinic Rochester Minnesota USA
  2. Department of Laboratory Medicine and Pathology, Mayo Clinic Rochester Minnesota USA
  3. Department of Radiology Mayo Clinic Rochester Minnesota USA
Institutions: Mayo Clinic (United States)
Journal: Alzheimer's & dementia : the journal of the Alzheimer's Association, volume 22, issue 3, article e71267
Dates: received 2 October 2025; accepted 5 February 2026; published online 8 March 2026; in print March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1002/alz.71267 · PMID 41795660 · PMCID PMC12967478 · OpenAlex W7134200121
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: structural MRI / diffusion (modality), human (organism), Alzheimer's / dementia (population), cellular / molecular (subfield)
Methods: Statistics, Connectivity
Keywords: geometry‐based analysis, hippocampal deformation, hippocampal shape analysis, hippocampal subfields, PART, surface‐based analysis, TDP‐43
MeSH: DNA-Binding Proteins*, Hippocampus*, Tauopathies*, Adult, Aged, Aged, 80 and over, Aging, Female, Humans, Magnetic Resonance Imaging, Male, Middle Aged (* major topic)
Topic: Alzheimer's disease research and treatments (Physiology, Medicine), according to OpenAlex
Funding: NIH (R01 AG37491, P30 AG062677, U01 AG06786)
Citations: not cited yet (Europe PMC); 66 references in the paper

Abstract

INTRODUCTION: Hippocampal subfields are vulnerable to the transactive response DNA‐binding protein of 43 kDa (TDP‐43) and tau in primary age‐related tauopathy (PART). Geometry‐based morphometric analysis can improve the detection of structural changes in the hippocampus.

METHODS: Forty‐seven cases of autopsy‐confirmed PART without TDP‐43 and 19 cases of PART with TDP‐43 underwent antemortem magnetic resonance imaging (MRI) hippocampal segmentation and shape analysis. A separate cohort of 16 younger healthy individuals (YHIs) was included as a reference group. Hippocampal shape was analyzed in Python with non‐parametric cluster permutation testing.

RESULTS: PART(TDP+) group exhibited thinner left subiculum and CA1, with curvature deformations in left CA1 and CA2/3, relative to PART(TDP–). Both PART groups showed right‐sided predominance of thinning in presubiculum and subiculum, as well as curvature deformations in right presubiculum, subiculum, and CA1 when compared to YHIs.

DISCUSSION: Geometry‐based analysis showed different patterns of hippocampal thinning and curvature associated with PART(TDP+) compared to PART(TDP–).

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

Repository

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

cherscofield/PART-hippocampal-morphometry-KAJ-lab

License: MIT
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 769a8f917ec6038de78287dae0866a3f407a2283, 4 May 2026
Languages: Python (8)
Size: 12 files, 8 scripts
Software Heritage: not archived
Found in: the text, “Statistical analysis”
Holds: README, license file, environment (requirements.txt)
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: Matplotlib (8 files), NumPy (8 files), pandas (8 files), statsmodels (5 files), MNE-Python (4 files), SciPy (4 files)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
10 files

Tracing map

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

What the map holds:

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

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

Data

No dataset and no data link were found in the paper.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 7 keywords, 12 MeSH terms, 1 funder, 66 references.

Cite

This paper

Youssef, H., Gatto, R. G., Petersen, R. C., Reichard, R. R., Jack, C. R., Whitwell, J. L., & Josephs, K. A. (2026). Hippocampal subfield thickness and shape analysis in examining the impact of TDP-43 in primary age-related tauopathy. Alzheimer's & dementia : the journal of the Alzheimer's Association, 22(3), e71267. https://doi.org/10.1002/alz.71267

BibTeX

@article{youssef2026hippocampal,
author = {Youssef, Hossam and Gatto, Rodolfo G. and Petersen, Ronald C. and Reichard, R. Ross and Jack, Clifford R. and Whitwell, Jennifer L. and Josephs, Keith A.},
title = {{Hippocampal subfield thickness and shape analysis in examining the impact of TDP-43 in primary age-related tauopathy}},
journal = {Alzheimer's \& dementia : the journal of the Alzheimer's Association},
year = {2026},
month = mar,
volume = {22},
number = {3},
pages = {e71267},
publisher = {Wiley},
issn = {1552-5260},
doi = {10.1002/alz.71267},
url = {https://doi.org/10.1002/alz.71267},
pmid = {41795660},
pmcid = {PMC12967478}
}

RIS

TY - JOUR
AU - Youssef, Hossam
AU - Gatto, Rodolfo G.
AU - Petersen, Ronald C.
AU - Reichard, R. Ross
AU - Jack, Clifford R.
AU - Whitwell, Jennifer L.
AU - Josephs, Keith A.
TI - Hippocampal subfield thickness and shape analysis in examining the impact of TDP-43 in primary age-related tauopathy
T2 - Alzheimer's & dementia : the journal of the Alzheimer's Association
J2 - Alzheimers Dement
PY - 2026
DA - 2026/03/01
VL - 22
IS - 3
SP - e71267
SN - 1552-5260
PB - Wiley
DO - 10.1002/alz.71267
UR - https://doi.org/10.1002/alz.71267
LA - en
ER -

CSL-JSON

{
"id": "10.1002/alz.71267",
"type": "article-journal",
"title": "Hippocampal subfield thickness and shape analysis in examining the impact of TDP-43 in primary age-related tauopathy",
"container-title": "Alzheimer's & dementia : the journal of the Alzheimer's Association",
"author": [
{
"family": "Youssef",
"given": "Hossam"
},
{
"family": "Gatto",
"given": "Rodolfo G."
},
{
"family": "Petersen",
"given": "Ronald C."
},
{
"family": "Reichard",
"given": "R. Ross"
},
{
"family": "Jack",
"given": "Clifford R."
},
{
"family": "Whitwell",
"given": "Jennifer L."
},
{
"family": "Josephs",
"given": "Keith A."
}
],
"container-title-short": "Alzheimers Dement",
"volume": "22",
"issue": "3",
"page": "e71267",
"DOI": "10.1002/alz.71267",
"PMID": "41795660",
"PMCID": "PMC12967478",
"ISSN": "1552-5260",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/alz.71267",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
1
]
]
}
}

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

Similar papers

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

[1] doi:10.1186/s13024-026-00944-2
TDP-43: [GU]-ardian of the transcriptome.
Journal: Molecular neurodegeneration
In common: cellular / molecular, 9 references
[2] doi:10.1002/alz.71571 [code]
Vulnerability of anterior medial temporal lobe subregions to early tau-related neurodegeneration in Alzheimer's disease: Converging evidence from tau-PET and plasma p-tau217.
Journal: Alzheimer's & dementia : the journal of the Alzheimer's Association
In common: NumPy, Alzheimer's / dementia, structural MRI / diffusion, cellular / molecular, 5 references
[3] doi:10.1002/alz.71649 [code]
Postmortem brain MRI reveals differential associations of subcortical and limbic volumes with cortical thinning and neurodegenerative pathologies.
Journal: Alzheimer's & dementia : the journal of the Alzheimer's Association
In common: statsmodels, pandas, SciPy, 2 other tools, Alzheimer's / dementia, structural MRI / diffusion, cellular / molecular, 2 references
[4] doi:10.1162/imag.a.105 [code]
Right posterior theta reflects human parahippocampal phase resetting by salient cues during goal-directed navigation
Journal: n/a
In common: MNE-Python, statsmodels, pandas, 3 other tools, 1 reference
[5] doi:10.1002/hbm.70508 [code]
Cyclic 2.5D Perceptual Loss for Cross-Modal 3D Medical Image Synthesis: T1w MRI to Tau PET.
Journal: Human brain mapping
In common: NumPy, Alzheimer's / dementia, structural MRI / diffusion, 4 references
[6] doi:10.1523/eneuro.0041-26.2026 [code]
Ocular Speech Tracking Persists in Blindness, but Its Dynamics and Oculo-Cerebral Connectivity Depend on Visual Status.
Journal: eNeuro
In common: MNE-Python, statsmodels, pandas, 3 other tools, 1 reference
[7] doi:10.1097/j.pain.0000000000004044 [code]
No effect of rhythmic visual stimulation on experimental pain perception.
Journal: Pain
In common: MNE-Python, statsmodels, pandas, 3 other tools, 1 reference
[8] doi:10.1371/journal.pone.0350140 [code]
Signal combination in flutter vibration perception.
Journal: PloS one
In common: MNE-Python, statsmodels, pandas, 3 other tools, 1 reference
[9] doi:10.3389/fncom.2026.1786996 [code]
Schumann-anchored golden ratio organization of human neural oscillations.
Journal: Frontiers in computational neuroscience
In common: MNE-Python, statsmodels, pandas, 3 other tools, 1 reference
[10] doi:10.1093/cercor/bhag075 [code]
Cortical dynamics of icon perception: effects of concreteness and attractiveness.
Journal: Cerebral cortex (New York, N.Y. : 1991)
In common: MNE-Python, statsmodels, pandas, 3 other tools, 1 reference

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.