OSCR

Mouse white matter matters: cortical origins and spatial organization of mouse white matter tracts.

Code ↔ Paper

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

The 5 matches
  1. [1] § Materials and methods ↔ Projection_Density_Filtered_AllenSDK_Pipeline.ipynb, lines 257 to 291 · score 1.00 · SSP tr, SSP un, SSp bfd, SSp ul, AUDpo, ORBvl · Report a mismatch
  2. [2] § Materials and methods ↔ AllenSDK_Pipeline.ipynb, lines 107 to 135 · score 1.00 · SSP tr, SSP un, SSp bfd, SSp ul, AUDpo, ORBvl · Report a mismatch
  3. [3] § Results ↔ Projection_Density_Filtered_AllenSDK_Pipeline.ipynb, lines 257 to 291 · score 0.99 · SSp ll, SSp bfd, SSp tr, SSp ul, SSp un, AUDpo · Report a mismatch
  4. [4] § Results ↔ AllenSDK_Pipeline.ipynb, lines 107 to 135 · score 0.99 · SSp ll, SSp bfd, SSp tr, SSp ul, SSp un, AUDpo · Report a mismatch
  5. [5] § Materials and methods ↔ Projection_Density_Filtered_AllenSDK_Pipeline.ipynb, lines 61 to 106 · score 0.89 · projection signal, weighted center, injection centroids, projection densities, injection density, mass · 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

Jupyter notebook · 572 lines · 19 KB · no license · 3 matches

  1. # %%
  2. # imports
  3. import numpy as np
  4. import pandas as pd
  5. import matplotlib.pyplot as plt
  6. from allensdk.core.mouse_connectivity_cache import MouseConnectivityCache
  7. from mpl_toolkits.mplot3d import Axes3D
  8. from sklearn.linear_model import LinearRegression
  9. from scipy.stats import linregress
  10. import statsmodels.api as sm
  11. from tqdm import tqdm
  12. import time
  13. from matplotlib.patches import Patch
  14. # %%
  15. # config
  16. voxel_size_um = 25 # um per voxel 25um
  17. min_mean_bundle_density = 1e-4
  18. # structures
  19. isocortex_id = 315
  20. bundle_ids = [884] # replace with any fiber tract ids
  21. # hemisphere: right, left, or None
  22. hemisphere = "right"
  23. # cache and structure tree from allensdk
  24. mcc = MouseConnectivityCache()
  25. st = mcc.get_structure_tree()
  26. # %%
  27. # experiments
  28. print("loading isocortex non-cre injection experiments")
  29. exps = mcc.get_experiments(cre=False, injection_structure_ids=[isocortex_id])
  30. experiment_ids = [e["id"] for e in exps]
  31. print(f"using {len(experiment_ids)} isocortex experiments")
  32. # %%
  33. # build bundle mask
  34. mask_union = None
  35. for sid in bundle_ids:
  36. m, _ = mcc.get_structure_mask(sid)
  37. mask_union = m.astype(bool) if mask_union is None else (mask_union | m.astype(bool))
  38. if mask_union is None:
  39. raise RuntimeError("no structure masks were built (check bundle_ids).")
  40. # restrict to one hemisphere
  41. if hemisphere in ("right", "left"):
  42. mid = mask_union.shape[2] // 2
  43. if hemisphere == "right":
  44. mask_union[:, :, :mid] = False
  45. else:
  46. mask_union[:, :, mid:] = False
  47. # precompute voxel indices
  48. mx, my, mz = np.where(mask_union)
  49. mask_index_tuple = (mx, my, mz)
  50. print(f"mask ready: {mx.size:,} voxels ({hemisphere or 'both'} hemisphere)")
  51. # %%
  52. # HELPERS
  53. # density volumes are 3d arrays where each allensdk voxel stores the fraction of the
  54. # voxel filled by signal. Density values are between 0 and 1
  55. # as written in the allen dev docs:
  56. # projection density= sum of detected projection pixels / sum of all pixels in voxel
  57. # injection_density= density of detected projection pixels within the
  58. # manually annotated injection site
  59. # this gets the projection crossing coordinates within mask using density values
  60. def weighted_centroid_from_density(density_vol, idx_tuple, voxel_size_um):
  61. w = density_vol[idx_tuple] # get projection density values inside your mask
  62. pos = w > 0 # keep only voxels with nonzero density
  63. if not np.any(pos): # if no signal at all, return None
  64. return None
  65. x = idx_tuple[0][pos] # x voxel indices of nonzero voxels
  66. y = idx_tuple[1][pos] # y voxel indices
  67. z = idx_tuple[2][pos] # z voxel indices
  68. w = w[pos].astype(np.float32) # weights = projection density values
  69. # weighted average voxel index + converted to um
  70. vx = float(np.average(x, weights=w)) * voxel_size_um
  71. vy = float(np.average(y, weights=w)) * voxel_size_um
  72. vz = float(np.average(z, weights=w)) * voxel_size_um
  73. return vx, vy, vz
  74. #finds the center of mass of the projection signal within wm mask
  75. # weights projection densities so that brighter voxels influence the centroid more
  76. # this gets the injection site centroid based on all nonzero voxels in injection volume
  77. def weighted_centroid_from_binary(density_vol, voxel_size_um):
  78. pos = density_vol > 0 # find voxels with injection signal
  79. if not np.any(pos): # if no injection voxels, return None
  80. return None
  81. x, y, z = np.where(pos) # voxel coordinates of injection
  82. w = density_vol[pos].astype(np.float32) # injection densities as weights
  83. # weighted centroid
  84. vx = float(np.average(x, weights=w)) * voxel_size_um
  85. vy = float(np.average(y, weights=w)) * voxel_size_um
  86. vz = float(np.average(z, weights=w)) * voxel_size_um
  87. return vx, vy, vz
  88. # finds the weighted center of the injection site
  89. # weighs injection densitites so that denser parts of the injection count more
  90. # outputs injection centroid
  91. # %%
  92. # main loop
  93. inj_x, inj_y, inj_z = {}, {}, {}
  94. proj_x, proj_y, proj_z = {}, {}, {}
  95. t0 = time.time()
  96. for eid in tqdm(experiment_ids, desc="processing experiments"):
  97. try:
  98. proj_vol, _ = mcc.get_projection_density(eid) # 3d projection density volume
  99. inj_vol, _ = mcc.get_injection_density(eid) # 3d injection density volume
  100. # projection densities inside WM mask (after hemisphere filtering)
  101. wm_densities = proj_vol[mask_index_tuple].astype(np.float32)
  102. # drop NaNs
  103. wm_densities = wm_densities[~np.isnan(wm_densities)]
  104. # skip if no valid voxels in the bundle
  105. if wm_densities.size == 0:
  106. continue
  107. # mean projection density through the WM structure
  108. bundle_mean = float(np.mean(wm_densities))
  109. # filter: require mean density >= threshold
  110. if bundle_mean < min_mean_bundle_density:
  111. continue
  112. # centroids only for experiments that passed the filter
  113. proj_centroid = weighted_centroid_from_density(
  114. proj_vol, mask_index_tuple, voxel_size_um
  115. )
  116. if proj_centroid is None:
  117. continue
  118. px, py, pz = proj_centroid
  119. proj_x[eid], proj_y[eid], proj_z[eid] = px, py, pz
  120. inj_centroid = weighted_centroid_from_binary(inj_vol, voxel_size_um)
  121. if inj_centroid is None:
  122. continue
  123. ix, iy, iz = inj_centroid
  124. inj_x[eid], inj_y[eid], inj_z[eid] = ix, iy, iz
  125. except Exception as e:
  126. print(f"{eid}: {e}")
  127. elapsed = time.time() - t0
  128. print(f"\n total processing time: {elapsed:.2f} s")
  129. # how many experiments were kept?
  130. kept_ids = sorted(proj_x.keys())
  131. print(f"kept {len(kept_ids)} / {len(experiment_ids)} experiments "
  132. f"(mean WM density ≥ {min_mean_bundle_density})")
  133. print("first few kept IDs + means:")
  134. for eid in kept_ids[:10]:
  135. # recompute just for display
  136. proj_vol, _ = mcc.get_projection_density(eid)
  137. wm = proj_vol[mask_index_tuple].astype(np.float32)
  138. wm = wm[~np.isnan(wm)]
  139. print(eid, np.mean(wm))
  140. # %%
  141. # dataframe + correlation
  142. common_ids = sorted(set(inj_x) & set(proj_x))
  143. df = pd.DataFrame({
  144. "injection_x": [inj_x[e] for e in common_ids],
  145. "injection_y": [inj_y[e] for e in common_ids],
  146. "injection_z": [inj_z[e] for e in common_ids],
  147. "projection_x": [proj_x[e] for e in common_ids],
  148. "projection_y": [proj_y[e] for e in common_ids],
  149. "projection_z": [proj_z[e] for e in common_ids],
  150. }, index=common_ids)
  151. print(f"final n = {len(df)} rows")
  152. print("\ncorrelation matrix (injection → projection):")
  153. print(df.corr(numeric_only=True))
  154. # %%
  155. import pandas as pd
  156. import numpy as np
  157. from statsmodels.stats.outliers_influence import variance_inflation_factor
  158. def compute_vif(df, predictors):
  159. X = df[predictors].dropna().astype(float).values
  160. X_ = np.column_stack([np.ones(X.shape[0]), X])
  161. vif_vals = [variance_inflation_factor(X_, i) for i in range(1, X_.shape[1])]
  162. vif_table = pd.DataFrame({
  163. "predictor": predictors,
  164. "VIF": vif_vals
  165. })
  166. def interpret(v):
  167. if v < 2:
  168. return "low collinearity"
  169. elif v < 5:
  170. return "moderate collinearity"
  171. elif v < 10:
  172. return "high collinearity"
  173. else:
  174. return "severe collinearity"
  175. vif_table["interpretation"] = vif_table["VIF"].apply(interpret)
  176. return vif_table
  177. predictors = ['injection_x','injection_y','injection_z']
  178. vif_table = compute_vif(df, predictors)
  179. print(vif_table)
  180. # %%
  181. # Lasso regression
  182. # %%
  183. # attach region labels to df using experiment injection structure acronyms
  184. # build: exp_id to injection structure acronym
  185. exp_struct_acro = {}
  186. for e in exps:
  187. try:
  188. s = st.get_structures_by_id([e['structure_id']])[0]
  189. exp_struct_acro[e['id']] = s['acronym']
  190. except Exception:
  191. pass
  192. # keep only rows present in df.index
  193. df_regions = df.copy()
  194. df_regions['region'] = [get_region_group(exp_struct_acro.get(eid, None)) for eid in df_regions.index]
  195. df_regions = df_regions[df_regions['region'].notna()]
  196. print(f"region-labeled n = {len(df_regions)} (dropped unlabeled)")
  197. # %%
  198. # modeling helpers
  199. predictor_cols = ['injection_x', 'injection_y', 'injection_z']
  200. axis_map = {'x': 'projection_x', 'y': 'projection_y', 'z': 'projection_z'}
  201. axis_label = {'x': 'A-P', 'y': 'D-V', 'z': 'M-L'}
  202. def fit_models(df_in: pd.DataFrame):
  203. x = sm.add_constant(df_in[predictor_cols])
  204. models = {}
  205. for ax, ycol in axis_map.items():
  206. y = df_in[ycol]
  207. models[ax] = sm.OLS(y, x).fit()
  208. return models
  209. models = fit_models(df_regions)
  210. # %%
  211. print("Experiments with NaN projection centroids:",
  212. sum(np.isnan(list(proj_x.values()))))
  213. print("Experiments used in regression dataframe:", len(df))
  214. # %%
  215. # Color palette
  216. region_colors = {
  217. 'Prefrontal': {'acronyms': {'ACAd','ACAv','FRP','ILA','ORBl','ORBvl','PL'},
  218. 'color': [0.97, 0.83, 0.34]},
  219. 'Insula': {'acronyms': {'AId','GU','VISC'},
  220. 'color': [1.00, 0.62, 0.23]},
  221. 'Motor': {'acronyms': {'MOp','MOs'},
  222. 'color': [0.40, 0.76, 0.40]},
  223. 'Somatosensory': {'acronyms': {'SSp-bfd','SSp-ll','SSp-m','SSp-n','SSp-tr','SSp-ul','SSp-un','SSs'},
  224. 'color': [0.85, 0.19, 0.20]},
  225. 'Temporal': {'acronyms': {'ECT','AUDd','AUDp','AUDpo','AUDv'},
  226. 'color': [1.00, 0.45, 0.71]},
  227. 'Retrosplenial': {'acronyms': {'RSPagl','RSPd','RSPv'},
  228. 'color': [0.78, 0.00, 1.00]},
  229. 'Visual': {'acronyms': {'VISp','VISal','VISam','VISl','VISpm','VISpor','VISpl','VISli'},
  230. 'color': [0.00, 0.55, 1.00]}
  231. }
  232. legend_order = ["Prefrontal", "Insula", "Motor",
  233. "Somatosensory", "Temporal", "Retrosplenial", "Visual"]
  234. # Convert RGB to hex
  235. def rgb_to_hex(rgb):
  236. r, g, b = (int(255*c) for c in rgb)
  237. return f"#{r:02x}{g:02x}{b:02x}"
  238. group_color_hex = {k: rgb_to_hex(v['color']) for k, v in region_colors.items()}
  239. # Helper to get region group by acronym
  240. def get_region_group(acronym: str):
  241. for group, props in region_colors.items():
  242. if acronym in props['acronyms']:
  243. return group
  244. return None
  245. # %%
  246. # lasso imports
  247. import numpy as np
  248. import matplotlib.pyplot as plt
  249. from sklearn.preprocessing import StandardScaler
  250. from sklearn.linear_model import LassoCV
  251. from sklearn.metrics import r2_score
  252. from matplotlib.patches import Patch
  253. # %%
  254. # axis labels and column mappings
  255. axis_label = {'x': 'A-P', 'y': 'D-V', 'z': 'M-L'}
  256. predictors = [
  257. 'injection_x',
  258. 'injection_y',
  259. 'injection_z'
  260. ]
  261. axis_to_ycol = {
  262. 'x': 'projection_x',
  263. 'y': 'projection_y',
  264. 'z': 'projection_z'
  265. }
  266. # %%
  267. def fit_lasso_models(df, axes=('x', 'y', 'z'), cv=5, alphas=None, random_state=0):
  268. """
  269. Fit one LassoCV model per projection axis on standardized predictors.
  270. Returns:
  271. dict: axis {
  272. 'scaler': StandardScaler,
  273. 'model': LassoCV,
  274. 'index': DataFrame index used for fitting
  275. }
  276. """
  277. models = {}
  278. for ax in axes:
  279. cols = predictors + [axis_to_ycol[ax]]
  280. sub = df.dropna(subset=cols).copy()
  281. X = sub[predictors].to_numpy(float)
  282. y = sub[axis_to_ycol[ax]].to_numpy(float)
  283. scaler = StandardScaler()
  284. Xz = scaler.fit_transform(X)
  285. lcv = LassoCV(
  286. cv=cv,
  287. alphas=alphas,
  288. random_state=random_state,
  289. max_iter=10000
  290. )
  291. lcv.fit(Xz, y)
  292. models[ax] = {
  293. 'scaler': scaler,
  294. 'model': lcv,
  295. 'index': sub.index
  296. }
  297. return models
  298. # %%
  299. def plot_axis_summary_lasso(
  300. models,
  301. df_regions,
  302. group_color_hex,
  303. legend_order,
  304. axis_key='x'
  305. ):
  306. """
  307. Two-panel summary for a single axis using LassoCV.
  308. Left:
  309. Predicted vs actual projection coordinate, colored by region.
  310. Right:
  311. Lasso coefficients (betas) on standardized predictors.
  312. Title reports R squared and chosen alpha.
  313. """
  314. assert axis_key in ('x', 'y', 'z')
  315. pack = models[axis_key]
  316. scaler = pack['scaler']
  317. lcv = pack['model']
  318. # align rows used by the model
  319. idx = pack['index']
  320. X = df_regions.loc[idx, predictors].to_numpy(float)
  321. y = df_regions.loc[idx, axis_to_ycol[axis_key]].to_numpy(float)
  322. Xz = scaler.transform(X)
  323. y_pred = lcv.predict(Xz)
  324. fig, (ax_scatter, ax_bar) = plt.subplots(
  325. nrows=1,
  326. ncols=2,
  327. figsize=(12, 5),
  328. gridspec_kw={'width_ratios': [1.25, 1]}
  329. )
  330. # predicted vs actual
  331. for region in legend_order:
  332. if region not in group_color_hex:
  333. continue
  334. mask = (df_regions.loc[idx, 'region'] == region).to_numpy()
  335. if not np.any(mask):
  336. continue
  337. ax_scatter.scatter(
  338. y_pred[mask],
  339. y[mask],
  340. s=70,
  341. edgecolor='black',
  342. alpha=0.85,
  343. color=group_color_hex[region],
  344. label=region
  345. )
  346. lo = float(min(y.min(), y_pred.min()))
  347. hi = float(max(y.max(), y_pred.max()))
  348. ax_scatter.plot([lo, hi], [lo, hi], 'r--', lw=2)
  349. pretty = axis_label[axis_key]
  350. r2 = r2_score(y, y_pred)
  351. ax_scatter.set_xlabel(f"Predicted {pretty} Projection (µm)")
  352. ax_scatter.set_ylabel(f"Actual {pretty} Projection (µm)")
  353. ax_scatter.set_title(f"{pretty} Prediction (LassoCV: R²={r2:.3f}, α={lcv.alpha_:.3g})")
  354. ax_scatter.grid(True, linestyle='--', alpha=0.6)
  355. # RIGHT: beta bars (standardized-X coefficients)
  356. coef = lcv.coef_ # corresponds to predictors after standardization
  357. label_map = {
  358. 'injection_x': 'A-P Injection Coordinate',
  359. 'injection_y': 'D-V Injection Coordinate',
  360. 'injection_z': 'M-L Injection Coordinate'
  361. }
  362. labels = [label_map[p] for p in predictors]
  363. bars = ax_bar.bar(labels, coef, color='skyblue', edgecolor='black')
  364. # annotate zeros and values
  365. rng = (max(coef.max(), 0) - min(coef.min(), 0)) or 1.0
  366. for b, v in zip(bars, coef):
  367. ytxt = (b.get_height() + 0.05*rng) if v >= 0 else (b.get_height() - 0.05*rng)
  368. va = 'bottom' if v >= 0 else 'top'
  369. ax_bar.text(b.get_x()+b.get_width()/2, ytxt, f"{v:.3f}", ha='center', va=va, fontsize=10)
  370. ax_bar.axhline(0, color='gray', linestyle='--', linewidth=1)
  371. ax_bar.set_ylabel("Lasso coefficient (β) on standardized predictors")
  372. ax_bar.set_title(f"Influence of Injection Coordinates\non {pretty} Projection")
  373. ax_bar.grid(True, axis='y', linestyle='--', alpha=0.6)
  374. ax_bar.tick_params(axis='x', labelrotation=20)
  375. plt.tight_layout()
  376. plt.show()
  377. # %%
  378. # fit lasso models
  379. lasso_models = fit_lasso_models(df_regions, cv=5)
  380. # plot
  381. plot_axis_summary_lasso(lasso_models, df_regions, group_color_hex, legend_order, axis_key='x') # A-P
  382. plot_axis_summary_lasso(lasso_models, df_regions, group_color_hex, legend_order, axis_key='y') # D-V
  383. plot_axis_summary_lasso(lasso_models, df_regions, group_color_hex, legend_order, axis_key='z') # M-L
  384. # %%
  385. # partial regression plots
  386. # %%
  387. # labels and columns
  388. axis_label = {'x': 'A-P', 'y': 'D-V', 'z': 'M-L'}
  389. predictors = ['injection_x', 'injection_y', 'injection_z']
  390. axis_to_ycol = {'x': 'projection_x', 'y': 'projection_y', 'z': 'projection_z'}
  391. def _residualize(y, X):
  392. """Return residuals of OLS: y ~ X (with constant)."""
  393. Xc = sm.add_constant(X, has_constant='add')
  394. model = sm.OLS(y, Xc, missing='drop').fit()
  395. return model.resid, model
  396. def partial_regression_plots(
  397. df_regions,
  398. axis_key='x',
  399. group_color_hex=None,
  400. legend_order=None,
  401. point_size=70,
  402. alpha=0.85,
  403. show=True
  404. ):
  405. """
  406. Added-variable plots for a chosen projection axis.
  407. Rows used: non-NA on projection axis + all three predictors.
  408. Returns (fig, axes, full_model) where full_model is OLS on all 3 predictors.
  409. """
  410. assert axis_key in ('x','y','z')
  411. ycol = axis_to_ycol[axis_key]
  412. # rows with complete data
  413. needed = predictors + [ycol]
  414. d = df_regions.dropna(subset=needed).copy()
  415. # Fit the full OLS once (y ~ X,Y,Z) for reference
  416. X_full = sm.add_constant(d[predictors], has_constant='add')
  417. full_model = sm.OLS(d[ycol], X_full).fit()
  418. # figure: one subplot per predictor
  419. fig, axes = plt.subplots(1, 3, figsize=(16, 4.8), sharey=False)
  420. fig.suptitle(f"Partial regression (added-variable) plots for {axis_label[axis_key]} projection", y=1.02)
  421. for ax, pred in zip(axes, predictors):
  422. others = [p for p in predictors if p != pred]
  423. # residualize outcome on "others", and predictor on "others"
  424. y_res, _ = _residualize(d[ycol].to_numpy(float), d[others].to_numpy(float))
  425. x_res, _ = _residualize(d[pred].to_numpy(float), d[others].to_numpy(float))
  426. # quick simple regression on residuals -> partial slope & p-value
  427. lr = linregress(x_res, y_res)
  428. slope, intercept, r_val, p_val = lr.slope, lr.intercept, lr.rvalue, lr.pvalue
  429. # scatter (by region if provided)
  430. if group_color_hex and 'region' in d.columns and legend_order:
  431. for region in legend_order:
  432. if region not in group_color_hex:
  433. continue
  434. m = (d['region'] == region).to_numpy()
  435. if not np.any(m):
  436. continue
  437. ax.scatter(
  438. x_res[m], y_res[m],
  439. s=point_size, alpha=alpha,
  440. color=group_color_hex[region],
  441. edgecolor='black', linewidths=0.5
  442. )
  443. else:
  444. ax.scatter(x_res, y_res, s=point_size, alpha=alpha,
  445. color='#4c78a8', edgecolor='black', linewidths=0.5)
  446. # regression line on residuals
  447. xx = np.linspace(x_res.min(), x_res.max(), 100)
  448. ax.plot(xx, intercept + slope*xx, 'r--', lw=2)
  449. # labels and title with stats
  450. nice_pred = {
  451. 'injection_x': 'A-P injection',
  452. 'injection_y': 'D-V injection',
  453. 'injection_z': 'M-L injection'
  454. }[pred]
  455. ax.set_xlabel(f"{nice_pred} residual (µm)")
  456. ax.set_ylabel(f"{axis_label[axis_key]} projection residual (µm)")
  457. beta_full = full_model.params[pred] # equals slope on residuals
  458. ax.set_title(f"{nice_pred} | others\nβ={beta_full:.3f}, R²={r_val**2:.2f}, p={p_val:.2e}")
  459. ax.grid(True, linestyle='--', alpha=0.5)
  460. # shared legend (if region colors provided)
  461. if group_color_hex and legend_order:
  462. handles = [Patch(facecolor=group_color_hex[r], edgecolor='black', label=r)
  463. for r in legend_order if r in group_color_hex]
  464. fig.legend(handles=handles, title='region', bbox_to_anchor=(1.01, 0.5), loc='center left')
  465. plt.tight_layout(rect=[0, 0, 0.95, 1])
  466. if show:
  467. plt.show()
  468. return fig, axes, full_model
  469. # %%
  470. # plot
  471. fig, axes, full_ap = partial_regression_plots(
  472. df_regions,
  473. axis_key='x',
  474. group_color_hex=group_color_hex,
  475. legend_order=legend_order
  476. )
  477. partial_regression_plots(df_regions, axis_key='y', group_color_hex=group_color_hex, legend_order=legend_order)
  478. partial_regression_plots(df_regions, axis_key='z', group_color_hex=group_color_hex, legend_order=legend_order)

Projection_Density_Filtered_AllenSDK_Pipeline.ipynb at commit dfcdc36, no license · at the source

Overview

Authors: Sofia D. Gordeev1, Melissa Franch2, Sarah R. Heilbronner2
  1. Program in Neuroscience, Rice University,77005 Houston, TX USA
  2. Department of Neurosurgery, Baylor College of Medicine,S836, 1 Baylor Plaza, TX Houston, 77030 USA
Institutions: Rice University (United States); Baylor College of Medicine (United States)
Journal: Brain structure & function, volume 231, issue 3, article 46
Dates: received 1 January 2026; accepted 10 March 2026; published online 27 March 2026; in print 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1007/s00429-026-03101-z · PMID 41893879 · PMCID PMC13031187 · OpenAlex W7141132906
Open access: hybrid, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: structural MRI / diffusion (modality), mouse (organism)
Methods: Statistics
Keywords: Connectivity, Axon, White matter, Model species, Neuroanatomy
MeSH: Cerebral Cortex*, White Matter*, Animals, Brain Mapping, Male, Mice, Mice, Inbred C57BL, Neural Pathways (* major topic)
Topic: Advanced Neuroimaging Techniques and Applications (Radiology, Nuclear Medicine and Imaging, Medicine), according to OpenAlex
Citations: not cited yet (Europe PMC); 63 references in the paper

Abstract

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

Repository

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

sdg5-create/MouseWMMatters

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: dfcdc365e212e93131236e7c300e3393998791c0, 29 December 2025
Languages: Jupyter (4)
Size: 4 files, 4 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: 4 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: AllenSDK (4 files), Matplotlib (4 files), NumPy (4 files), pandas (3 files), scikit-learn (3 files), SciPy (3 files), statsmodels (2 files)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
4 files

The paper's code and data availability statement is in the Data section.

Tracing map

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

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 4 scripts, each with its path and the digest of its content;
  • 5 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.

Code and data availability statement

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

Read it in the paper: doi.org/10.1007/s00429-026-03101-z.

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, 3 authors, 5 keywords, 8 MeSH terms, 2 funders, 60 references.

Cite

This paper

Gordeev, S. D., Franch, M., & Heilbronner, S. R. (2026). Mouse white matter matters: cortical origins and spatial organization of mouse white matter tracts. Brain structure & function, 231(3), 46. https://doi.org/10.1007/s00429-026-03101-z

BibTeX

@article{gordeev2026mouse,
author = {Gordeev, Sofia D. and Franch, Melissa and Heilbronner, Sarah R.},
title = {{Mouse white matter matters: cortical origins and spatial organization of mouse white matter tracts}},
journal = {Brain structure \& function},
year = {2026},
month = mar,
volume = {231},
number = {3},
pages = {46},
publisher = {Springer Science+Business Media},
issn = {1863-2653},
doi = {10.1007/s00429-026-03101-z},
url = {https://doi.org/10.1007/s00429-026-03101-z},
pmid = {41893879},
pmcid = {PMC13031187}
}

RIS

TY - JOUR
AU - Gordeev, Sofia D.
AU - Franch, Melissa
AU - Heilbronner, Sarah R.
TI - Mouse white matter matters: cortical origins and spatial organization of mouse white matter tracts
T2 - Brain structure & function
J2 - Brain Struct Funct
PY - 2026
DA - 2026/03/27
VL - 231
IS - 3
SP - 46
SN - 1863-2653
PB - Springer Science+Business Media
DO - 10.1007/s00429-026-03101-z
UR - https://doi.org/10.1007/s00429-026-03101-z
LA - en
ER -

CSL-JSON

{
"id": "10.1007/s00429-026-03101-z",
"type": "article-journal",
"title": "Mouse white matter matters: cortical origins and spatial organization of mouse white matter tracts",
"container-title": "Brain structure & function",
"author": [
{
"family": "Gordeev",
"given": "Sofia D."
},
{
"family": "Franch",
"given": "Melissa"
},
{
"family": "Heilbronner",
"given": "Sarah R."
}
],
"container-title-short": "Brain Struct Funct",
"volume": "231",
"issue": "3",
"page": "46",
"DOI": "10.1007/s00429-026-03101-z",
"PMID": "41893879",
"PMCID": "PMC13031187",
"ISSN": "1863-2653",
"publisher": "Springer Science+Business Media",
"URL": "https://doi.org/10.1007/s00429-026-03101-z",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
27
]
]
}
}

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.2463/mrms.rev.2024-0007 [code]
Tractometry of Human Visual White Matter Pathways in Health and Disease.
Journal: Magnetic resonance in medical sciences : MRMS : an official journal of Japan Society of Magnetic Resonance in Medicine
In common: pandas, Matplotlib, NumPy, structural MRI / diffusion, 7 references
[2] doi:10.7554/elife.107012 [code]
Cross-species standardised cortico-subcortical tractography.
Journal: eLife
In common: structural MRI / diffusion, 7 references
[3] doi:10.1073/pnas.2314918121 [code]
Subcallosal cingulate deep brain stimulation evokes two distinct cortical responses via differential white matter activation.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: pandas, SciPy, Matplotlib, 1 other tool, 5 references
[4] doi:10.3389/fninf.2023.1272243 [code]
Translating single-neuron axonal reconstructions into meso-scale connectivity statistics in the mouse somatosensory thalamus.
Journal: Frontiers in neuroinformatics
In common: AllenSDK, scikit-learn, pandas, 3 other tools, mouse, 3 references
[5] doi:10.1038/s41593-026-02253-9 [code]
Genoarchitecture and input-output organization of the mouse basal ganglia and thalamic parafascicular nucleus.
Journal: Nature neuroscience
In common: AllenSDK, scikit-learn, pandas, 3 other tools, mouse, 3 references
[6] doi:10.1162/imag.a.1310 [code]
Experimental quality control induces changes in Allen mouse brain connectomes.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: AllenSDK, scikit-learn, pandas, 2 other tools, mouse, 3 references
[7] doi:10.1162/imag_a_00245 [code]
Feature attention graph neural network for estimating brain age and identifying important neural connections in mouse models of genetic risk for Alzheimer's disease.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: scikit-learn, pandas, SciPy, 2 other tools, structural MRI / diffusion, mouse, 3 references
[8] doi:10.7554/elife.78635 [code]
A connectomics-based taxonomy of mammals.
Journal: eLife
In common: statsmodels, scikit-learn, pandas, 3 other tools, structural MRI / diffusion, 3 references
[9] doi:10.1007/s00429-024-02773-9 [code]
Comparing mouse and human cingulate cortex organization using functional connectivity.
Journal: Brain structure & function
In common: AllenSDK, statsmodels, pandas, 3 other tools, mouse, 2 references
[10] doi:10.1186/s41747-025-00570-5 [code]
Connectivity related to major brain functions in Alzheimer disease progression: microstructural properties of the cingulum bundle and its subdivision using diffusion-weighted MRI.
Journal: European radiology experimental
In common: statsmodels, pandas, SciPy, 2 other tools, structural MRI / diffusion, 3 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1007/s00429-026-03101-z.svg)](https://openscicode.org/badge/doi/10.1007/s00429-026-03101-z)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1007/s00429-026-03101-z.svg
   :target: https://openscicode.org/badge/doi/10.1007/s00429-026-03101-z
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1007/s00429-026-03101-z"><img src="https://openscicode.org/badge/doi/10.1007/s00429-026-03101-z.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.