Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks.
8 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 8 matches
- [1] § Material and method › Network analysis › Multilayer community detection ↔ Article/Louvain.py, lines 459 to 544 · score 0.62 · resolution parameter, partition stability, NMI, pairwise, modularity, Louvain · block
oscr:b:KD671GX7GA2YB-V· Report a mismatch - [2] § Material and method › Network analysis › Connectivity and density analyses ↔ Article/Compute_Weighted_centralities.py, lines 442 to 469 · score 0.60 · Benjamini Hochberg FDR, weights · block
oscr:b:8W1R5RJW0PYR8-A· Report a mismatch - [3] § Material and method › Neuropsychological assessment and missing data handling ↔ Article/Preprocessing_data/1_Imputations.R, lines 27 to 145 · score 0.59 · imputation model, MICE, variables, imputed, Age, Predictive · block
oscr:b:0ZYQTSH8S8QWA-H· Report a mismatch - [4] § Material and method › Network analysis › Multilayer centrality of neuropsychological task nodes ↔ Article/Compute_Weighted_centralities.py, lines 81 to 154 · score 0.57 · weighted closeness centrality, Weighted degree centrality, summing, strength, edges, correlations · block
oscr:b:FEK3DQFYN8TH5-Q· Report a mismatch - [5] § Material and method › Network analysis › Connectivity and density analyses ↔ Article/Correlation_Matrix_Creation.py, lines 53 to 105 · score 0.53 · Spearman correlation, layer combination, block, network, hemisphere · block
oscr:b:G1C129A1CGSMX-7· Report a mismatch - [6] § Results › NT-centered multilayer centrality analyses ↔ Article/Compute_Weighted_centralities.py, lines 345 to 397 · score 0.53 · NTi CD, NTi SD, closeness centrality, median, permutation, Weighted · block
oscr:b:53XJT2CXHW3DH-W· Report a mismatch - [7] § Material and method › Neuropsychological assessment and missing data handling ↔ Article/Preprocessing_data/4_Reg_Lin_Multiple.py, lines 14 to 63 · score 0.50 · linear regression, age, imputations, scores, hemisphere · block
oscr:b:EPFYEQMF0Y0GN-1· Report a mismatch - [8] § Material and method › Network analysis › Multilayer centrality of neuropsychological task nodes ↔ Article/Interactive_Weighted_centralities_NT_driven.py, lines 20 to 65 · score 0.50 · weighted degree, closeness centrality, cortical damage, interactions, neuropsychological, nodes · block
oscr:b:DTT5A6333RS7G-7· 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 · 765 lines · 30 KB · no license · 3 matches
- # Centrality analysis for NT nodes (degree & closeness)
- #
- # UPDATE 1: adds median-based permutation tests (paired + independent)
- # UPDATE 2: computes WEIGHTED centrality measures:
- # - Strength (weighted degree = sum of edge weights)
- # - Closeness_Weighted (weighted closeness using distance = 1 - r)
- #
- # UPDATE 3 (YOUR REQUEST): adds ONLY p_perm_mean_FDR (BH-FDR) for:
- # - Strength table
- # - Closeness_Weighted table
- # FDR is applied separately by FAMILY (Within vs Between hemisphere).
- #
- # PLOTS:
- # - Degree_Centrality (unweighted): ylim 0–1
- # - Closeness_Centrality (unweighted): ylim 0–1
- # - Closeness_Weighted: ylim 0–1.4
- # - Strength: ylim 0–4
- import numpy as np
- import pandas as pd
- import networkx as nx
- import os
- from scipy.stats import wilcoxon, mannwhitneyu
- # -------------------------------------------------------------------------
- # 0. Paths & Load data
- # -------------------------------------------------------------------------
- file_path = r'd:\DOCTORANTS\Roxane\Pipeline\hemisphere_matrices_with_both_layers.xlsx'
- output_path = r'd:\DOCTORANTS\Roxane\Pipeline\Results'
- os.makedirs(output_path, exist_ok=True)
- left_raw = pd.read_excel(file_path, sheet_name='Left_Hemisphere')
- right_raw = pd.read_excel(file_path, sheet_name='Right_Hemisphere')
- threshold = 0.175
- hemispheres = {
- 'Left': left_raw,
- 'Right': right_raw
- }
- # -------------------------------------------------------------------------
- # 1. Helper: preprocess hemisphere matrix
- # -------------------------------------------------------------------------
- def preprocess_hemisphere_df(df_raw):
- """
- Expected structure:
- - Row 0: column-layer labels (Name='Layer', Layer=NaN, ROI columns: NT/SD/CD)
- - Rows 1..: ROIs with columns:
- Name (ROI label), Layer ('NT','SD','CD'), then ROI correlation columns.
- Returns:
- df : DataFrame indexed by ROI Name; columns = 'Layer' + ROI columns.
- roi_cols : list of ROI column names (no 'Layer')
- """
- _col_layers_row = df_raw.iloc[0, :] # unused, kept for pattern
- df = df_raw.iloc[1:, :].copy()
- df = df.set_index('Name')
- roi_cols = [c for c in df.columns if c != 'Layer']
- return df, roi_cols
- # -------------------------------------------------------------------------
- # 2. Helper: summaries and per-NT centralities (unweighted + weighted)
- # -------------------------------------------------------------------------
- def summarize_vector(values):
- values = np.asarray(values, dtype=float)
- values = values[np.isfinite(values)]
- if len(values) == 0:
- return {'median': np.nan, 'mean': np.nan, 'std': np.nan, 'min': np.nan, 'max': np.nan}
- return {
- 'median': float(np.median(values)),
- 'mean': float(np.mean(values)),
- 'std': float(np.std(values, ddof=0)),
- 'min': float(np.min(values)),
- 'max': float(np.max(values)),
- }
- def compute_nt_centralities_for_combo(hemi_name, df, roi_cols,
- use_layers, type_label, layer_label, threshold):
- """
- Match original logic:
- 1. Build full graph G using only nodes whose row-layer is in use_layers.
- 2. Add edges between all node pairs with correlation >= threshold.
- Store: weight = r, dist = 1 - r
- 3. For each NT node:
- - Build subgraph of {that NT} + all NON-NT nodes in use_layers.
- - Compute:
- * Degree_Centrality (unweighted)
- * Closeness_Centrality (unweighted)
- * Strength (weighted degree = sum of r)
- * Closeness_Weighted (weighted closeness using distance='dist')
- """
- results_per_nt = []
- node_layer = df['Layer'].to_dict()
- # Only nodes with both rows and columns
- all_nodes = [n for n in df.index if n in roi_cols]
- # Nodes in chosen layers
- use_nodes = [n for n in all_nodes if node_layer.get(n) in use_layers]
- nt_nodes = [n for n in use_nodes if node_layer.get(n) == 'NT']
- non_nt_nodes = [n for n in use_nodes if node_layer.get(n) != 'NT']
- if not nt_nodes or not non_nt_nodes:
- return results_per_nt
- corr = df.loc[use_nodes, use_nodes].apply(pd.to_numeric, errors='coerce')
- G = nx.Graph()
- for n in use_nodes:
- G.add_node(n, layer=node_layer.get(n))
- for i, n1 in enumerate(use_nodes):
- for j in range(i + 1, len(use_nodes)):
- n2 = use_nodes[j]
- w = corr.loc[n1, n2]
- if pd.notna(w) and w >= threshold:
- w = float(w)
- G.add_edge(n1, n2, weight=w, dist=float(1.0 - w))
- for nt in nt_nodes:
- nodes_to_include = [nt] + non_nt_nodes
- subG = G.subgraph(nodes_to_include)
- if subG.number_of_nodes() <= 1:
- deg_cent = 0.0
- clo_cent = 0.0
- strength = 0.0
- clo_w = 0.0
- else:
- deg_cent = nx.degree_centrality(subG).get(nt, 0.0)
- clo_cent = nx.closeness_centrality(subG).get(nt, 0.0)
- strength = float(subG.degree(nt, weight="weight"))
- clo_w = nx.closeness_centrality(subG, distance="dist").get(nt, 0.0)
- results_per_nt.append({
- 'Hemisphere': hemi_name,
- 'Type': type_label,
- 'Layer': layer_label,
- 'Node_ROI': nt,
- 'Degree_Centrality': deg_cent,
- 'Closeness_Centrality': clo_cent,
- 'Strength': strength,
- 'Closeness_Weighted': clo_w
- })
- return results_per_nt
- # -------------------------------------------------------------------------
- # 3. Run centrality analysis
- # -------------------------------------------------------------------------
- centrality_nt_rows = []
- centrality_combos = [
- ('Layer Pairs', 'NTi-SD', ['NT', 'SD']),
- ('Layer Pairs', 'NTi-CD', ['NT', 'CD']),
- ('All layers', 'NTi-SD-CD', ['NT', 'SD', 'CD']),
- ]
- for hemi_name, hemi_raw in hemispheres.items():
- df, roi_cols = preprocess_hemisphere_df(hemi_raw)
- for type_label, layer_label, use_layers in centrality_combos:
- rows = compute_nt_centralities_for_combo(
- hemi_name=hemi_name,
- df=df,
- roi_cols=roi_cols,
- use_layers=use_layers,
- type_label=type_label,
- layer_label=layer_label,
- threshold=threshold
- )
- centrality_nt_rows.extend(rows)
- centrality_nt_df = pd.DataFrame(centrality_nt_rows)
- # -------------------------------------------------------------------------
- # 4. Summary tables
- # -------------------------------------------------------------------------
- def build_summary(df, value_col):
- if df.empty:
- return pd.DataFrame(columns=['Hemi', 'Type', 'Layer', 'median', 'mean', 'std', 'min', 'max'])
- grouped = (
- df.groupby(['Hemisphere', 'Type', 'Layer'])[value_col]
- .apply(list)
- .reset_index(name='values')
- )
- rows = []
- for _, r in grouped.iterrows():
- stats = summarize_vector(r['values'])
- stats.update({'Hemi': r['Hemisphere'], 'Type': r['Type'], 'Layer': r['Layer']})
- rows.append(stats)
- return pd.DataFrame(rows)[['Hemi', 'Type', 'Layer', 'median', 'mean', 'std', 'min', 'max']].round(4)
- degree_summary_df = build_summary(centrality_nt_df, 'Degree_Centrality')
- closeness_summary_df = build_summary(centrality_nt_df, 'Closeness_Centrality')
- strength_summary_df = build_summary(centrality_nt_df, 'Strength')
- closeness_w_summary_df = build_summary(centrality_nt_df, 'Closeness_Weighted')
- # -------------------------------------------------------------------------
- # 5. Permutation tests + Cohen's d + bootstrap CI + rank tests
- # Mean + median permutation statistics
- # -------------------------------------------------------------------------
- def permutation_test_paired_mean(x, y, n_perm=10000):
- x = np.asarray(x)
- y = np.asarray(y)
- diffs = x - y
- observed = np.mean(diffs)
- count = 0
- for _ in range(n_perm):
- signs = np.random.choice([-1, 1], size=len(diffs))
- perm_stat = np.mean(diffs * signs)
- if abs(perm_stat) >= abs(observed):
- count += 1
- return observed, (count + 1) / (n_perm + 1)
- def permutation_test_paired_median(x, y, n_perm=10000):
- x = np.asarray(x)
- y = np.asarray(y)
- diffs = x - y
- observed = np.median(diffs)
- count = 0
- for _ in range(n_perm):
- signs = np.random.choice([-1, 1], size=len(diffs))
- perm_stat = np.median(diffs * signs)
- if abs(perm_stat) >= abs(observed):
- count += 1
- return observed, (count + 1) / (n_perm + 1)
- def permutation_test_independent_mean(x, y, n_perm=10000):
- x = np.asarray(x)
- y = np.asarray(y)
- observed = np.mean(x) - np.mean(y)
- combined = np.concatenate([x, y])
- n_x = len(x)
- count = 0
- for _ in range(n_perm):
- perm = np.random.permutation(combined)
- perm_x = perm[:n_x]
- perm_y = perm[n_x:]
- perm_stat = np.mean(perm_x) - np.mean(perm_y)
- if abs(perm_stat) >= abs(observed):
- count += 1
- return observed, (count + 1) / (n_perm + 1)
- def permutation_test_independent_median(x, y, n_perm=10000):
- x = np.asarray(x)
- y = np.asarray(y)
- observed = np.median(x) - np.median(y)
- combined = np.concatenate([x, y])
- n_x = len(x)
- count = 0
- for _ in range(n_perm):
- perm = np.random.permutation(combined)
- perm_x = perm[:n_x]
- perm_y = perm[n_x:]
- perm_stat = np.median(perm_x) - np.median(perm_y)
- if abs(perm_stat) >= abs(observed):
- count += 1
- return observed, (count + 1) / (n_perm + 1)
- def cohens_d_paired(x, y):
- x = np.asarray(x)
- y = np.asarray(y)
- diff = x - y
- sd_diff = diff.std(ddof=1)
- return 0.0 if sd_diff == 0 else diff.mean() / sd_diff
- def cohens_d_independent(x, y):
- x = np.asarray(x)
- y = np.asarray(y)
- nx, ny = len(x), len(y)
- if nx < 2 or ny < 2:
- return 0.0
- sx = x.std(ddof=1)
- sy = y.std(ddof=1)
- sp = np.sqrt(((nx - 1) * sx**2 + (ny - 1) * sy**2) / (nx + ny - 2))
- return 0.0 if sp == 0 else (x.mean() - y.mean()) / sp
- def bootstrap_ci_paired(x, y, n_boot=10000, ci=95):
- x = np.asarray(x)
- y = np.asarray(y)
- diffs = x - y
- n = len(diffs)
- boot_ds = []
- for _ in range(n_boot):
- sample = np.random.choice(diffs, size=n, replace=True)
- sd = sample.std(ddof=1)
- d = sample.mean() / sd if sd != 0 else 0.0
- boot_ds.append(d)
- lower = np.percentile(boot_ds, (100 - ci) / 2)
- upper = np.percentile(boot_ds, 100 - (100 - ci) / 2)
- return lower, upper
- def bootstrap_ci_independent(x, y, n_boot=10000, ci=95):
- x = np.asarray(x)
- y = np.asarray(y)
- nx, ny = len(x), len(y)
- boot_ds = []
- for _ in range(n_boot):
- bx = np.random.choice(x, size=nx, replace=True)
- by = np.random.choice(y, size=ny, replace=True)
- sx = bx.std(ddof=1)
- sy = by.std(ddof=1)
- sp = np.sqrt(((nx - 1) * sx**2 + (ny - 1) * sy**2) / (nx + ny - 2)) if (nx + ny - 2) > 0 else 0.0
- d = (bx.mean() - by.mean()) / sp if sp != 0 else 0.0
- boot_ds.append(d)
- lower = np.percentile(boot_ds, (100 - ci) / 2)
- upper = np.percentile(boot_ds, 100 - (100 - ci) / 2)
- return lower, upper
- def get_vals_paired(df, hemi, layer1, layer2, centrality_key):
- sub = df[df["Hemisphere"] == hemi]
- pivot = sub.pivot_table(index="Node_ROI", columns="Layer", values=centrality_key)
- if layer1 not in pivot.columns or layer2 not in pivot.columns:
- return np.array([]), np.array([])
- pair = pivot[[layer1, layer2]].dropna()
- return pair[layer1].values, pair[layer2].values
- def get_vals_independent(df, hemi, layer, centrality_key):
- sub = df[(df["Hemisphere"] == hemi) & (df["Layer"] == layer)]
- return sub[centrality_key].values
- within_pairs = [
- ("NTi-SD", "NTi-CD"),
- ("NTi-SD", "NTi-SD-CD"),
- ("NTi-CD", "NTi-SD-CD")
- ]
- between_layers = ["NTi-SD", "NTi-CD", "NTi-SD-CD"]
- all_stats_degree = []
- all_stats_closeness = []
- all_stats_strength = []
- all_stats_closeness_w = []
- metrics = [
- ("Degree_Centrality", all_stats_degree),
- ("Closeness_Centrality", all_stats_closeness),
- ("Strength", all_stats_strength),
- ("Closeness_Weighted", all_stats_closeness_w),
- ]
- for centrality_key, results_list in metrics:
- # WITHIN HEMISPHERE (PAIRED)
- for hemi in ["Left", "Right"]:
- for layer1, layer2 in within_pairs:
- x, y = get_vals_paired(centrality_nt_df, hemi, layer1, layer2, centrality_key)
- if len(x) == 0 or len(y) == 0:
- continue
- obs_mean, p_perm_mean = permutation_test_paired_mean(x, y)
- obs_median, p_perm_median = permutation_test_paired_median(x, y)
- d = cohens_d_paired(x, y)
- ci_low, ci_high = bootstrap_ci_paired(x, y)
- try:
- _, w_p = wilcoxon(x, y, zero_method="wilcox")
- except Exception:
- w_p = np.nan
- results_list.append({
- "Metric": centrality_key,
- "Test Type": "Within Hemisphere (Paired)",
- "Hemisphere": hemi,
- "Contrast": f"{layer1} vs {layer2}",
- "Mean_diff": obs_mean,
- "Median_diff": obs_median,
- "p_perm_mean": p_perm_mean,
- "p_perm_median": p_perm_median,
- "Cohen_d": d,
- "CI_low": ci_low,
- "CI_high": ci_high,
- "Wilcoxon_p": w_p
- })
- # BETWEEN HEMISPHERES (INDEPENDENT)
- for layer in between_layers:
- x = get_vals_independent(centrality_nt_df, "Left", layer, centrality_key)
- y = get_vals_independent(centrality_nt_df, "Right", layer, centrality_key)
- if len(x) == 0 or len(y) == 0:
- continue
- obs_mean, p_perm_mean = permutation_test_independent_mean(x, y)
- obs_median, p_perm_median = permutation_test_independent_median(x, y)
- d = cohens_d_independent(x, y)
- ci_low, ci_high = bootstrap_ci_independent(x, y)
- try:
- _, u_p = mannwhitneyu(x, y, alternative="two-sided")
- except Exception:
- u_p = np.nan
- results_list.append({
- "Metric": centrality_key,
- "Test Type": "Between Hemispheres (Independent)",
- "Hemisphere": "Left vs Right",
- "Contrast": layer,
- "Mean_diff": obs_mean,
- "Median_diff": obs_median,
- "p_perm_mean": p_perm_mean,
- "p_perm_median": p_perm_median,
- "Cohen_d": d,
- "CI_low": ci_low,
- "CI_high": ci_high,
- "MannWhitney_p": u_p
- })
- stats_degree_df = pd.DataFrame(all_stats_degree)
- stats_closeness_df = pd.DataFrame(all_stats_closeness)
- stats_strength_df = pd.DataFrame(all_stats_strength)
- stats_closeness_w_df = pd.DataFrame(all_stats_closeness_w)
- # -------------------------------------------------------------------------
- # 5b. ADD ONLY p_perm_mean_FDR (BH-FDR), for Strength and Closeness_Weighted
- # Correction is done separately within each FAMILY (Within vs Between).
- # -------------------------------------------------------------------------
- def bh_fdr(pvals):
- """
- Benjamini–Hochberg FDR correction.
- Returns q-values with NaNs preserved.
- """
- pvals = np.asarray(pvals, dtype=float)
- qvals = np.full_like(pvals, np.nan, dtype=float)
- mask = np.isfinite(pvals)
- p = pvals[mask]
- m = p.size
- if m == 0:
- return qvals
- order = np.argsort(p)
- p_sorted = p[order]
- ranks = np.arange(1, m + 1, dtype=float)
- q_sorted = p_sorted * m / ranks
- # enforce monotonicity
- q_sorted = np.minimum.accumulate(q_sorted[::-1])[::-1]
- q_sorted = np.clip(q_sorted, 0.0, 1.0)
- q = np.empty_like(p_sorted)
- q[order] = q_sorted
- qvals[mask] = q
- return qvals
- def add_ppermmean_fdr_by_family(stats_df, family_col="Test Type"):
- """
- Adds ONLY p_perm_mean_FDR, corrected separately within each family:
- - Within Hemisphere (Paired)
- - Between Hemispheres (Independent)
- """
- df = stats_df.copy()
- if df.empty or "p_perm_mean" not in df.columns or family_col not in df.columns:
- return df
- df["p_perm_mean_FDR"] = np.nan
- for fam, idx in df.groupby(family_col).groups.items():
- df.loc[idx, "p_perm_mean_FDR"] = bh_fdr(df.loc[idx, "p_perm_mean"].values)
- return df
- # Apply ONLY to Strength and Weighted Closeness (as requested)
- stats_strength_df = add_ppermmean_fdr_by_family(stats_strength_df, family_col="Test Type")
- stats_closeness_w_df = add_ppermmean_fdr_by_family(stats_closeness_w_df, family_col="Test Type")
- # -------------------------------------------------------------------------
- # 6. Raincloud plots (Matplotlib-only)
- # y-lims: 0–1, 0–1.4, 0–4 as requested
- # -------------------------------------------------------------------------
- import matplotlib.pyplot as plt
- from scipy.stats import gaussian_kde
- def full_violin(ax, data, x, color, width=0.35, y_grid=400, y_min=0.0, y_max=1.0):
- data = np.asarray(data, dtype=float)
- data = data[np.isfinite(data)]
- if len(data) < 2:
- return
- kde = gaussian_kde(data)
- y = np.linspace(y_min, y_max, y_grid)
- dens = kde(y)
- dens = dens / dens.max() * width if dens.max() > 0 else dens
- ax.fill_betweenx(y, x - dens, x + dens, color=color, alpha=1.0, linewidth=0, zorder=1)
- def boxplot_clean(ax, data, x, width=0.18):
- data = np.asarray(data, dtype=float)
- data = data[np.isfinite(data)]
- if len(data) == 0:
- return
- ax.boxplot([data], positions=[x], widths=width, vert=True, showfliers=False, patch_artist=True,
- boxprops=dict(facecolor="white", edgecolor="black", linewidth=1, alpha=0.80),
- medianprops=dict(color="black", linewidth=1),
- whiskerprops=dict(color="black", linewidth=1),
- capprops=dict(color="black", linewidth=1))
- def strip_black(ax, data, x, jitter=0.12, size=40, alpha=0.7):
- data = np.asarray(data, dtype=float)
- data = data[np.isfinite(data)]
- if len(data) == 0:
- return
- xs = x + np.random.uniform(-jitter, jitter, size=len(data))
- ax.scatter(xs, data, s=size, color="black", alpha=alpha, linewidths=0, zorder=10)
- def clean_axes_keep_ticks(ax, tick_label_size=18, tick_size=5):
- for spine in ax.spines.values():
- spine.set_visible(False)
- ax.grid(False)
- ax.tick_params(axis="both", which="both", length=tick_size, width=1, color="black", labelsize=tick_label_size)
- def raincloud_two_groups(ax, a, b, label_a, label_b,
- x_positions=(1.0, 2.0),
- layer_a=None, layer_b=None,
- tick_label_size=18,
- y_min=0.0, y_max=1.0):
- a = np.asarray(a, dtype=float)
- b = np.asarray(b, dtype=float)
- xa, xb = x_positions
- color_map = {"SD": "green", "CD": "#ad4c4c"}
- full_violin(ax, a, xa, color=color_map.get(layer_a, "gray"), y_min=y_min, y_max=y_max)
- full_violin(ax, b, xb, color=color_map.get(layer_b, "gray"), y_min=y_min, y_max=y_max)
- boxplot_clean(ax, a, xa)
- boxplot_clean(ax, b, xb)
- strip_black(ax, a, xa)
- strip_black(ax, b, xb)
- ax.set_xticks([xa, xb])
- ax.set_xticklabels([label_a, label_b], fontsize=tick_label_size)
- ax.set_ylim(y_min, y_max)
- ax.tick_params(axis="y", labelsize=tick_label_size)
- clean_axes_keep_ticks(ax, tick_label_size=tick_label_size)
- def save_raincloud(fig, out_png, out_pdf=None, dpi=300):
- fig.tight_layout()
- fig.savefig(out_png, dpi=dpi, bbox_inches="tight")
- if out_pdf is not None:
- fig.savefig(out_pdf, bbox_inches="tight")
- plt.close(fig)
- # ----- Unweighted closeness (0–1) -----
- xL, yL = get_vals_paired(centrality_nt_df, "Left", "NTi-SD", "NTi-CD", "Closeness_Centrality")
- xR, yR = get_vals_paired(centrality_nt_df, "Right", "NTi-SD", "NTi-CD", "Closeness_Centrality")
- L_SD = get_vals_independent(centrality_nt_df, "Left", "NTi-SD", "Closeness_Centrality")
- R_SD = get_vals_independent(centrality_nt_df, "Right", "NTi-SD", "Closeness_Centrality")
- L_CD = get_vals_independent(centrality_nt_df, "Left", "NTi-CD", "Closeness_Centrality")
- R_CD = get_vals_independent(centrality_nt_df, "Right", "NTi-CD", "Closeness_Centrality")
- if len(xL) > 0 and len(yL) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xL, yL, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Closeness_Left_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Closeness_Left_NTi-SD_vs_NTi-CD.pdf"))
- if len(xR) > 0 and len(yR) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xR, yR, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Closeness_Right_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Closeness_Right_NTi-SD_vs_NTi-CD.pdf"))
- if len(L_SD) > 0 and len(R_SD) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_SD, R_SD, "Left", "Right", layer_a="SD", layer_b="SD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Closeness_Left_vs_Right_NTi-SD.png"),
- os.path.join(output_path, "Raincloud_Closeness_Left_vs_Right_NTi-SD.pdf"))
- if len(L_CD) > 0 and len(R_CD) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_CD, R_CD, "Left", "Right", layer_a="CD", layer_b="CD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Closeness_Left_vs_Right_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Closeness_Left_vs_Right_NTi-CD.pdf"))
- print("Closeness (unweighted) raincloud plots saved to:", output_path)
- # ----- Unweighted degree (0–1) -----
- xL_deg, yL_deg = get_vals_paired(centrality_nt_df, "Left", "NTi-SD", "NTi-CD", "Degree_Centrality")
- xR_deg, yR_deg = get_vals_paired(centrality_nt_df, "Right", "NTi-SD", "NTi-CD", "Degree_Centrality")
- L_SD_deg = get_vals_independent(centrality_nt_df, "Left", "NTi-SD", "Degree_Centrality")
- R_SD_deg = get_vals_independent(centrality_nt_df, "Right", "NTi-SD", "Degree_Centrality")
- L_CD_deg = get_vals_independent(centrality_nt_df, "Left", "NTi-CD", "Degree_Centrality")
- R_CD_deg = get_vals_independent(centrality_nt_df, "Right", "NTi-CD", "Degree_Centrality")
- if len(xL_deg) > 0 and len(yL_deg) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xL_deg, yL_deg, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Degree_Left_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Degree_Left_NTi-SD_vs_NTi-CD.pdf"))
- if len(xR_deg) > 0 and len(yR_deg) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xR_deg, yR_deg, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Degree_Right_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Degree_Right_NTi-SD_vs_NTi-CD.pdf"))
- if len(L_SD_deg) > 0 and len(R_SD_deg) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_SD_deg, R_SD_deg, "Left", "Right", layer_a="SD", layer_b="SD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Degree_Left_vs_Right_NTi-SD.png"),
- os.path.join(output_path, "Raincloud_Degree_Left_vs_Right_NTi-SD.pdf"))
- if len(L_CD_deg) > 0 and len(R_CD_deg) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_CD_deg, R_CD_deg, "Left", "Right", layer_a="CD", layer_b="CD", y_min=0.0, y_max=1.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Degree_Left_vs_Right_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Degree_Left_vs_Right_NTi-CD.pdf"))
- print("Degree (unweighted) raincloud plots saved to:", output_path)
- # ----- Weighted closeness (0–1.4) -----
- xL_cw, yL_cw = get_vals_paired(centrality_nt_df, "Left", "NTi-SD", "NTi-CD", "Closeness_Weighted")
- xR_cw, yR_cw = get_vals_paired(centrality_nt_df, "Right", "NTi-SD", "NTi-CD", "Closeness_Weighted")
- L_SD_cw = get_vals_independent(centrality_nt_df, "Left", "NTi-SD", "Closeness_Weighted")
- R_SD_cw = get_vals_independent(centrality_nt_df, "Right", "NTi-SD", "Closeness_Weighted")
- L_CD_cw = get_vals_independent(centrality_nt_df, "Left", "NTi-CD", "Closeness_Weighted")
- R_CD_cw = get_vals_independent(centrality_nt_df, "Right", "NTi-CD", "Closeness_Weighted")
- if len(xL_cw) > 0 and len(yL_cw) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xL_cw, yL_cw, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=1.4)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Left_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Left_NTi-SD_vs_NTi-CD.pdf"))
- if len(xR_cw) > 0 and len(yR_cw) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xR_cw, yR_cw, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=1.4)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Right_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Right_NTi-SD_vs_NTi-CD.pdf"))
- if len(L_SD_cw) > 0 and len(R_SD_cw) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_SD_cw, R_SD_cw, "Left", "Right", layer_a="SD", layer_b="SD", y_min=0.0, y_max=1.4)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Left_vs_Right_NTi-SD.png"),
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Left_vs_Right_NTi-SD.pdf"))
- if len(L_CD_cw) > 0 and len(R_CD_cw) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_CD_cw, R_CD_cw, "Left", "Right", layer_a="CD", layer_b="CD", y_min=0.0, y_max=1.4)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Left_vs_Right_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_ClosenessWeighted_Left_vs_Right_NTi-CD.pdf"))
- print("Closeness (weighted) raincloud plots saved to:", output_path)
- # ----- Strength (0–4) -----
- xL_s, yL_s = get_vals_paired(centrality_nt_df, "Left", "NTi-SD", "NTi-CD", "Strength")
- xR_s, yR_s = get_vals_paired(centrality_nt_df, "Right", "NTi-SD", "NTi-CD", "Strength")
- L_SD_s = get_vals_independent(centrality_nt_df, "Left", "NTi-SD", "Strength")
- R_SD_s = get_vals_independent(centrality_nt_df, "Right", "NTi-SD", "Strength")
- L_CD_s = get_vals_independent(centrality_nt_df, "Left", "NTi-CD", "Strength")
- R_CD_s = get_vals_independent(centrality_nt_df, "Right", "NTi-CD", "Strength")
- if len(xL_s) > 0 and len(yL_s) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xL_s, yL_s, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=4.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Strength_Left_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Strength_Left_NTi-SD_vs_NTi-CD.pdf"))
- if len(xR_s) > 0 and len(yR_s) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, xR_s, yR_s, "NTi-SD", "NTi-CD", layer_a="SD", layer_b="CD", y_min=0.0, y_max=4.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Strength_Right_NTi-SD_vs_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Strength_Right_NTi-SD_vs_NTi-CD.pdf"))
- if len(L_SD_s) > 0 and len(R_SD_s) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_SD_s, R_SD_s, "Left", "Right", layer_a="SD", layer_b="SD", y_min=0.0, y_max=4.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Strength_Left_vs_Right_NTi-SD.png"),
- os.path.join(output_path, "Raincloud_Strength_Left_vs_Right_NTi-SD.pdf"))
- if len(L_CD_s) > 0 and len(R_CD_s) > 0:
- fig, ax = plt.subplots(figsize=(6, 5))
- raincloud_two_groups(ax, L_CD_s, R_CD_s, "Left", "Right", layer_a="CD", layer_b="CD", y_min=0.0, y_max=4.0)
- save_raincloud(fig,
- os.path.join(output_path, "Raincloud_Strength_Left_vs_Right_NTi-CD.png"),
- os.path.join(output_path, "Raincloud_Strength_Left_vs_Right_NTi-CD.pdf"))
- print("Strength raincloud plots saved to:", output_path)
- # -------------------------------------------------------------------------
- # 7. Save results
- # -------------------------------------------------------------------------
- centrality_per_nt_file = os.path.join(output_path, 'NT_centrality_per_node_unweighted_and_weighted.xlsx')
- degree_summary_file = os.path.join(output_path, 'NT_degree_summary_sup14_style.xlsx')
- closeness_summary_file = os.path.join(output_path, 'NT_closeness_summary_sup15_style.xlsx')
- strength_summary_file = os.path.join(output_path, 'NT_strength_summary.xlsx')
- closeness_w_summary_file = os.path.join(output_path, 'NT_closeness_weighted_summary.xlsx')
- perm_degree_file = os.path.join(output_path, 'NT_permutation_stats_degree_mean_median.xlsx')
- perm_closeness_file = os.path.join(output_path, 'NT_permutation_stats_closeness_mean_median.xlsx')
- perm_strength_file = os.path.join(output_path, 'NT_permutation_stats_strength_mean_median.xlsx')
- perm_closeness_w_file = os.path.join(output_path, 'NT_permutation_stats_closeness_weighted_mean_median.xlsx')
- centrality_nt_df.to_excel(centrality_per_nt_file, index=False)
- degree_summary_df.to_excel(degree_summary_file, index=False)
- closeness_summary_df.to_excel(closeness_summary_file, index=False)
- strength_summary_df.to_excel(strength_summary_file, index=False)
- closeness_w_summary_df.to_excel(closeness_w_summary_file, index=False)
- # Degree/Closeness stats unchanged
- stats_degree_df.to_excel(perm_degree_file, index=False)
- stats_closeness_df.to_excel(perm_closeness_file, index=False)
- # Strength + Weighted Closeness stats now include p_perm_mean_FDR
- stats_strength_df.to_excel(perm_strength_file, index=False)
- stats_closeness_w_df.to_excel(perm_closeness_w_file, index=False)
- print("\nPer-NT centrality values saved to:", centrality_per_nt_file)
- print("\nAll results saved to:", output_path)
- print("Stats files:")
- print(perm_degree_file)
- print(perm_closeness_file)
- print(perm_strength_file)
- print(perm_closeness_w_file)
Compute_Weighted_centralities.py at commit 90d3dfe, no license · at the source
Overview
- Institute of Functional Genomics, University of Montpellier, INSERM, CNRS, 141 rue de la Cardonille, 34091 Montpellier, France
- Department of Neurosurgery, Gui de Chauliac Hospital, Montpellier University Medical Center, 80 Av Augustin Fliche, 34295 Montpellier, France
- Praxiling laboratory, UMR 5267, CNRS, Paul Valéry – Montpellier 3 University, rue de Mende, 34090 Montpellier, France
- Department of neurosurgery, Lariboisière Hospital, Paris, France
- Frontlab, Paris Brain Institute, CNRS UMR 7225, INSERM U1127, Paris, France
- Université de Paris Cité, Paris, France
- University of Montpellier, Department of Medicine, Campus ADV, 641, avenue du Doyen Gaston Guiraud, 34090 Montpellier, France
- Institut Universitaire de France, Paris, France
Abstract
Lesion–symptom mapping is widely used to identify causal relationships between brain structures and behaviour, and has played a central role in neuropsychologically informed network models of cognition. However, even recent approaches remain constrained by a one-to-one mapping framework, which oversimplifies the complex relationships between network-level damage and cognitive deficits. In addition, the non-orthogonality of cortical and white matter damage makes it difficult to disentangle their distinct contributions. Here, we used graph-based multilayer network analysis to address these limitations and evaluate clinical relevance. Using neuroanatomical and longitudinal neuropsychological data from 252 patients who underwent awake neurosurgery for low-grade glioma, we constructed interactive, three-layer networks for each hemisphere. Layer 1 comprised neuropsychological tasks (NT), layer 2 structural disconnections (SD), and layer 3 cortical damage (CD). Nodes represented tasks, white matter tracts, and cortical parcels, respectively, whereas within-layer edges captured correlations in performance or co-occurring damage patterns. Multilayer community detection identified domain- and hemisphere-specific brain–behaviour motifs linking executive, language, and spatial functions to distinct combinations of cortical and white matter disruption, a pattern confirmed by two spatial embedding approaches. Centrality analyses revealed a continuum of mapping relationships, ranging from one-to-one to one-to-many associations, indicating that tasks such as verbal fluency are better explained by multiple disconnection mechanisms. Additional analyses uncovered many-to-one and many-to-many relationships and highlighted tracts and cortical regions with domain-general relevance. Together, these findings support a neurobiologically grounded, network-oriented account of how structural brain damage gives rise to cognitive deficits, with implications for clinical care.
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 8 matches between paragraphs and lines of code.
jdax34/scripts_article
90d3dfebce8d4a2b5d80026f09c1f5c80e6188f8, 15 July 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
11 files
- Article/
Compute_Weighted_central , Python, 765 lines, 3 matchesities.py - Article/
Correlation_Matrix_Creat , Python, 105 lines, 1 matchion.py - Article/
Interactive_Weighted_cen , Python, 166 lines, 1 matchtralities_NT_driven.py - Article/
Louvain.py , Python, 603 lines, 1 match - Article/
Multilayers_Plots.py , Python, 259 lines - Article/
Preprocessing_data/ , R, 180 lines, 1 match1_Imputations.R - Article/
Preprocessing_data/ , Python, 52 lines2_Grouping_Pre_Post.py - Article/
Preprocessing_data/ , Python, 115 lines3_Compute_deficit_percen tage_data.py - Article/
Preprocessing_data/ , Python, 66 lines, 1 match4_Reg_Lin_Multiple.py - Article/
Weighted_centralities_NT , Python, 120 lines_driven_Barplots.py - README.md, Text, 4 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 10 scripts, each with its path and the digest of its content;
- 8 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 availability
The authors do not have permission to share data.
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, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 7 authors, 5 keywords, 14 MeSH terms, 45 references.
Cite
This paper
Nave, R., Ng, S., Moritz-Gasser, S., Berger, L., Mandonnet, E., Duffau, H., & Herbet, G. (2026). Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks. NeuroImage. Clinical, 51, 104052. https://
BibTeX
@article{nave2026beyond,
author = {Nave, Roxane and Ng, Sam and Moritz-Gasser, Sylvie and Berger, Lorelei and Mandonnet, Emmanuel and Duffau, Hugues and Herbet, Guillaume},
title = {{Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks}},
journal = {NeuroImage. Clinical},
year = {2026},
month = aug,
volume = {51},
pages = {104052},
publisher = {Elsevier},
issn = {2213-1582},
doi = {10.1016/
url = {https://
pmid = {42669223},
pmcid = {PMC13551937}
}
RIS
TY - JOUR
AU - Nave, Roxane
AU - Ng, Sam
AU - Moritz-Gasser, Sylvie
AU - Berger, Lorelei
AU - Mandonnet, Emmanuel
AU - Duffau, Hugues
AU - Herbet, Guillaume
TI - Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks
T2 - NeuroImage. Clinical
J2 - Neuroimage Clin
PY - 2026
DA - 2026/
VL - 51
SP - 104052
SN - 2213-1582
PB - Elsevier
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Beyond one-to-one mappings: Modelling distributed lesion-symptom relationships with multilayer networks",
"container-title": "NeuroImage. Clinical",
"author": [
{
"family": "Nave",
"given": "Roxane"
},
{
"family": "Ng",
"given": "Sam"
},
{
"family": "Moritz-Gasser",
"given": "Sylvie"
},
{
"family": "Berger",
"given": "Lorelei"
},
{
"family": "Mandonnet",
"given": "Emmanuel"
},
{
"family": "Duffau",
"given": "Hugues"
},
{
"family": "Herbet",
"given": "Guillaume"
}
],
"container-title-short":
"volume": "51",
"page": "104052",
"DOI": "10.1016/
"PMID": "42669223",
"PMCID": "PMC13551937",
"ISSN": "2213-1582",
"publisher": "Elsevier",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
8,
26
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-022-28030-3 [code]
- Contribution of the medial eye field network to the voluntary deployment of visuospatial attention.Journal: Nature communicationsIn common: other condition, 6 references, author Guillaume Herbet
- [2] doi:10.1002/hbm.70115 [code]
- Iowa Brain-Behavior Modeling Toolkit: An Open-Source MATLAB Tool for Inferential and Predictive Modeling of Imaging-Behavior and Lesion-Deficit Relationships.Journal: Human brain mappingIn common: 10 references
- [3] doi:10.1093/braincomms/fcae254 [code]
- Data-driven biomarkers better associate with stroke motor outcomes than theory-based biomarkers.Journal: Brain communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, structural MRI / diffusion, clinical / translational, 5 references
- [4] doi:10.1002/hbm.26279 [code]
- The central role of the left inferior longitudinal fasciculus in the face-name retrieval network.Journal: Human brain mappingIn common: other condition, 4 references, author Guillaume Herbet
- [5] doi:10.1007/s00429-025-03015-2 [code]
- A probabilistic map of motor and cognitive functions: a meta-analysis of 4325 stimulation sites.Journal: Brain structure & functionIn common: pandas, Matplotlib, NumPy, 6 references
- [6] doi:10.3389/fnins.2025.1409107 [code]
- Analysis of clinical anatomical correlates of motor deficits in stroke by multivariate lesion inference based on game theory.Journal: Frontiers in neuroscienceIn common: scikit-learn, pandas, SciPy, 2 other tools, 5 references
- [7] doi:10.1093/braincomms/fcaf218 [code]
- Determinants of brain network resilience after stroke.Journal: Brain communicationsIn common: NetworkX, seaborn, tidyverse, 5 other tools, 3 references
- [8] doi:10.1093/braincomms/fcaf477 [code]
- From acute neglect to chronic constructional deficits: parietotemporal contributions to long-term post-stroke impairments.Journal: Brain communicationsIn common: seaborn, scikit-learn, pandas, 3 other tools, clinical / translational, 4 references
- [9] doi:10.1038/s42003-023-04733-1 [code]
- Bayesian stroke modeling details sex biases in the white matter substrates of aphasia.Journal: Communications biologyIn common: seaborn, scikit-learn, pandas, 3 other tools, clinical / translational, 4 references
- [10] doi:10.1093/neuonc/noaf234 [code]
- A non-local diffusion magnetic resonance imaging tract density biomarker to stratify, predict, and interpret survival rates in human glioblastoma.Journal: Neuro-oncologyIn common: NetworkX, seaborn, scikit-learn, 4 other tools, structural MRI / diffusion, clinical / translational, other condition, 2 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: 1 repository of the authors' code, each at its verified commit and with its license, 10 scripts, and 8 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:f4cde9465b2ac425…
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.1016/j.nicl.2026.104052)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1016/j.nicl.2026.104052.svg
:target: https://openscicode.org/badge/doi/10.1016/j.nicl.2026.104052
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.nicl.2026.104052"><img src="https://openscicode.org/badge/doi/10.1016/j.nicl.2026.104052.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.
