A standardized framework resolves ambiguity in motor neuron loss across neurodegenerative diseases.
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
R · 681 lines · 20 KB · no license
- library(tidyverse)
- library(meta)
- library(metafor)
- library(dmetar)
- library(openxlsx)
- library(esc)
- library(data.table)
- library(weightr)
- library(car)
- library(clubSandwich)
- library(stringr)
- library(patchwork)
- library(brms)
- library(tidybayes)
- library(ggridges)
- library(posterior)
- library(bayesplot)
- library(dplyr)
- library(stringr)
- library(grid)
- library(ggplot2)
- # Extraction of data from excel spreadsheet and visualization
- sma_comp <- read.xlsx("D7_Raw.xlsx")
- glimpse(sma_comp)
- view(sma_comp)
- # Power Analysis conducted: 54 studies and an estimated 4 animals per group
- # Moderate heterogeneity suspected
- power.analysis(d = -2.0,
- k = 54,
- n1 = 4,
- n2 = 4,
- p = 0.05,
- heterogeneity = "moderate")
- # Ensuring data is read correctly from excel
- sma_comp$First.Author <- trimws(sma_comp$First.Author)
- sma_comp$Segment.Taken <- trimws(sma_comp$Segment.Taken)
- # Creating effect size with hedges g
- escalc_data <- escalc(
- measure = "SMD",
- m1i = sma_comp$mean.e,
- sd1i = sma_comp$sd.e,
- n1i = sma_comp$n.e,
- m2i = sma_comp$mean.c,
- sd2i = sma_comp$sd.c,
- n2i = sma_comp$n.c,
- data = sma_comp,
- vtype = "UB"
- )
- # Enable L1-L2 to appear appropriately in Multi-Subgroup results instead of intercept
- escalc_data$Segment.Taken <- factor(escalc_data$Segment.Taken)
- escalc_data$Segment.Taken <- relevel(escalc_data$Segment.Taken, ref = "L1-L2")
- # Multilevel analysis created
- m.ml.base <- rma.mv(
- yi = yi,
- V = vi,
- random = ~1 | First.Author/Segment.Taken,
- method = "REML",
- data = escalc_data
- )
- # Multilevel with Subgroup
- m.ml.mod <- rma.mv(
- yi = yi,
- V = vi,
- mods = ~ Segment.Taken,
- random = ~1 | First.Author/Segment.Taken,
- method = "REML",
- data = escalc_data
- )
- # --- I² Calculation Function for Multilevel rma.mv Models ---
- compute_I2_partitioned <- function(model, vi_vector) {
- k <- length(vi_vector)
- W <- 1 / vi_vector
- total_variance <- sum(model$sigma2) + (k / sum(W)) # between + within + sampling
- I2_components <- 100 * model$sigma2 / total_variance
- names(I2_components) <- names(model$sigma2)
- I2_total <- sum(I2_components)
- cat("I² Estimates by Level:\n")
- for (i in seq_along(I2_components)) {
- cat(" -", names(I2_components)[i], ": ", round(I2_components[i], 1), "%\n", sep = "")
- }
- cat("Total I²: ", round(I2_total, 1), "%\n\n", sep = "")
- }
- # I² BEFORE moderators
- cat("### I² for Base Model (no moderators) ###\n")
- compute_I2_partitioned(m.ml.base, escalc_data$vi)
- # I² AFTER moderators
- cat("### I² for Model with Moderators ###\n")
- compute_I2_partitioned(m.ml.mod, escalc_data$vi)
- # view multilevel
- summary(m.ml.base)
- # view multilevel with subgroup test of moderators
- summary(m.ml.mod)
- # Compare the heterogeneity of multilevel with and without moderators
- tau2_base <- sum(m.ml.base$sigma2)
- tau2_mod <- sum(m.ml.mod$sigma2)
- pseudo_R2 <- 100 * (tau2_base - tau2_mod) / tau2_base
- # Comparing the model fit of both models to excel data
- logLik(m.ml.base)
- logLik(m.ml.mod)
- AIC(m.ml.base)
- AIC(m.ml.mod)
- BIC(m.ml.base)
- BIC(m.ml.mod)
- # Testing residual heterogeneity
- m.ml.base$QE
- m.ml.mod$QE
- # Likelihood ratio test
- anova(m.ml.base, m.ml.mod, refit = TRUE)
- # Influence testing with leave-out-one analysis
- loo_results <- lapply(1:nrow(escalc_data), function(i) {
- dat_loo <- escalc_data[-i, ]
- model_loo <- tryCatch(
- rma.mv(yi, vi, random = ~1 | First.Author/Segment.Taken, method = "REML", data = dat_loo),
- error = function(e) NULL
- )
- if (!is.null(model_loo)) {
- return(c(logLik = as.numeric(logLik(model_loo)), tau2 = model_loo$sigma2[1]))
- } else {
- return(c(logLik = NA, tau2 = NA))
- }
- })
- loo_df <- as.data.frame(do.call(rbind, loo_results))
- loo_df$Study <- escalc_data$First.Author
- # Leave-out-one plotted with tau squared
- ggplot(loo_df, aes(x = reorder(Study, tau2), y = tau2)) +
- geom_point(size = 3, color = "#1f78b4") +
- coord_flip() +
- labs(
- title = "Influence of Studies on Heterogeneity (τ²)",
- x = "Study Removed",
- y = "Estimated τ² (leave-one-out)"
- ) +
- theme_minimal(base_size = 13)
- # Leave-out-one plotted per study
- ggplot(loo_df, aes(x = reorder(Study, logLik), y = logLik)) +
- geom_point(size = 3, color = "#e31a1c") +
- coord_flip() +
- labs(
- title = "Influence of Studies on Model Fit (log-likelihood)",
- x = "Study Removed",
- y = "Log-Likelihood"
- ) +
- theme_minimal(base_size = 13)
- # Running Egger's test with funnel plot
- escalc_data$sei <- sqrt(escalc_data$vi)
- egger_model <- rma(yi = yi, sei = sei, mods = ~ sei, method = "FE", data = escalc_data)
- summary(egger_model)
- metafor::funnel(
- x = escalc_data$yi,
- sei = sqrt(escalc_data$vi),
- main = "Funnel Plot (Multilevel Model)",
- xlab = "Effect Size (Hedges' g)",
- ylab = "Standard Error"
- )
- ###Comparison of spinal segments to each other###
- # Pairwise comparisons between L1-L2 and other segments
- linearHypothesis(m.ml.mod, "Segment.TakenL3-L6 = 0") # L1-L2 vs L3-L6
- linearHypothesis(m.ml.mod, "Segment.TakenL5 Med = 0") # L1-L2 vs L5 Med
- linearHypothesis(m.ml.mod, "Segment.TakenLumbar = 0") # L1-L2 vs Lumbar
- # Comparisons between other non-reference segments
- linearHypothesis(m.ml.mod, "Segment.TakenL3-L6 = Segment.TakenL5 Med") # L3-L6 vs L5 Med
- linearHypothesis(m.ml.mod, "Segment.TakenL3-L6 = Segment.TakenLumbar") # L3-L6 vs Lumbar
- linearHypothesis(m.ml.mod, "Segment.TakenL5 Med = Segment.TakenLumbar") # L5 Med vs Lumbar
- # Creating a plot for Linear Hypothesis comparison
- contrast_list <- list(
- "L1-L2 vs L3-L6" = "Segment.TakenL3-L6 = 0",
- "L1-L2 vs L5 Med" = "Segment.TakenL5 Med = 0",
- "L1-L2 vs Lumbar" = "Segment.TakenLumbar = 0",
- "L3-L6 vs L5 Med" = "Segment.TakenL3-L6 = Segment.TakenL5 Med",
- "L3-L6 vs Lumbar" = "Segment.TakenL3-L6 = Segment.TakenLumbar",
- "L5 Med vs Lumbar" = "Segment.TakenL5 Med = Segment.TakenLumbar"
- )
- # Extract p-values from each contrast
- contrast_df <- purrr::map_dfr(names(contrast_list), function(name) {
- res <- linearHypothesis(m.ml.mod, contrast_list[[name]])
- data.frame(
- Comparison = name,
- Chisq = res$Chisq[2],
- pval = res$`Pr(>Chisq)`[2]
- )
- })
- # Split into pairs for plotting
- contrast_df <- contrast_df %>%
- separate(Comparison, into = c("Segment1", "Segment2"), sep = " vs ") %>%
- mutate(Significant = ifelse(pval < 0.05, "*", ""))
- # Plot as heatmap
- ggplot(contrast_df, aes(x = Segment1, y = Segment2, fill = pval)) +
- geom_tile(color = "white") +
- geom_text(aes(label = paste0("p=", round(pval, 3), Significant)), size = 4) +
- scale_fill_gradient(low = "#f7fbff", high = "#08306b", name = "p-value") +
- theme_minimal(base_size = 14) +
- labs(title = "Pairwise Comparisons Between Spinal Segments",
- x = NULL, y = NULL)
- #### Printing the Forest Plot####
- # Load and prepare data
- sma_comp <- read.xlsx("D7_Raw.xlsx")
- sma_comp <- sma_comp[, !duplicated(names(sma_comp))]
- sma_comp$First.Author <- trimws(sma_comp$First.Author)
- sma_comp$Segment.Taken <- trimws(sma_comp$Segment.Taken)
- # Plain year (no superscript)
- sma_comp$AuthorName <- word(sma_comp$First.Author, 1)
- sma_comp$AuthorYear <- str_extract(sma_comp$First.Author, "\\d{4}")
- sma_comp$StudyLabel <- paste0(sma_comp$AuthorName, " ", sma_comp$AuthorYear)
- # Compute effect sizes
- escalc_data <- escalc(
- measure = "SMD",
- m1i = sma_comp$mean.e,
- sd1i = sma_comp$sd.e,
- n1i = sma_comp$n.e,
- m2i = sma_comp$mean.c,
- sd2i = sma_comp$sd.c,
- n2i = sma_comp$n.c,
- data = sma_comp,
- vtype = "UB"
- )
- sma_comp$yi <- escalc_data$yi
- sma_comp$vi <- escalc_data$vi
- sma_comp$se <- sqrt(sma_comp$vi)
- library(grid)
- plot_segment_forest <- function(segment_name) {
- segment_data <- sma_comp %>%
- filter(Segment.Taken == segment_name) %>%
- droplevels()
- # Run meta-analysis
- meta_obj <- metagen(
- TE = segment_data$yi,
- seTE = segment_data$se,
- studlab = segment_data$StudyLabel,
- sm = "SMD",
- method.tau = "REML",
- method.random.ci = "HK",
- common = FALSE,
- random = TRUE
- )
- # Create formatted SMD + CI string
- ci_labels <- sprintf("%.2f [%.2f, %.2f]",
- meta_obj$TE,
- meta_obj$lower,
- meta_obj$upper)
- meta_obj$SMD_CI <- ci_labels
- # Open new graphics device
- dev.new(width = 12, height = 10)
- # Suppress heterogeneity stats from forest() and print only study info
- forest(
- meta_obj,
- layout = "JAMA",
- common = FALSE,
- random = TRUE,
- print.byvar = FALSE,
- print.I2 = FALSE, # suppress default
- print.Q = FALSE,
- print.tau2 = FALSE,
- xlim = c(-20, 5),
- at = seq(-20, 5, by = 5),
- xlab = "Hedges' g (95% CI)",
- col.square = "black",
- col.diamond = "blue",
- col.diamond.lines = "black",
- fontsize = 9,
- leftcols = c("studlab", "SMD_CI"),
- leftlabs = c("Study", "SMD [95% CI]"),
- rightcols = FALSE
- )
- # Add main title
- grid::grid.text(
- label = paste("Segment:", segment_name),
- x = unit(0.5, "npc"),
- y = unit(0.98, "npc"),
- gp = grid::gpar(fontsize = 18, fontface = "bold")
- )
- # Add heterogeneity stats manually at consistent font size
- het_text <- sprintf(
- "Heterogeneity: I² = %.1f%%, τ² = %.2f, Q = %.2f (df = %d, p = %.3f)",
- meta_obj$I2, meta_obj$tau2, meta_obj$Q, meta_obj$df.Q, meta_obj$pval.Q
- )
- grid::grid.text(
- label = het_text,
- x = unit(0.02, "npc"),
- y = unit(0.02, "npc"),
- just = "left",
- gp = grid::gpar(fontsize = 9)
- )
- }
- # Run plots (one by one to view clearly)
- plot_segment_forest("Lumbar")
- plot_segment_forest("L1-L2")
- plot_segment_forest("L3-L6")
- plot_segment_forest("L5 Med")
- #### Summary Effect Graph (Formatted Like Forest Plots) ####
- library(meta)
- library(openxlsx)
- library(metafor)
- library(dplyr)
- library(ggplot2)
- library(grid)
- # Load and prepare data
- sma_comp <- read.xlsx("D7_Raw.xlsx")
- sma_comp <- sma_comp[, !duplicated(names(sma_comp))]
- sma_comp$Segment.Taken <- trimws(sma_comp$Segment.Taken)
- # Compute effect sizes
- escalc_data <- escalc(
- measure = "SMD",
- m1i = sma_comp$mean.e,
- sd1i = sma_comp$sd.e,
- n1i = sma_comp$n.e,
- m2i = sma_comp$mean.c,
- sd2i = sma_comp$sd.c,
- n2i = sma_comp$n.c,
- data = sma_comp,
- vtype = "UB"
- )
- sma_comp$yi <- escalc_data$yi
- sma_comp$vi <- escalc_data$vi
- sma_comp$se <- sqrt(escalc_data$vi)
- # Segment-wise meta-analysis
- segment_summaries <- sma_comp %>%
- group_by(Segment.Taken) %>%
- group_map(~ {
- meta_obj <- metagen(
- TE = .x$yi,
- seTE = .x$se,
- sm = "SMD",
- method.tau = "REML",
- method.random.ci = "HK",
- studlab = .x$First.Author
- )
- data.frame(
- Segment = unique(.x$Segment.Taken),
- TE = meta_obj$TE.random,
- lower = meta_obj$lower.random,
- upper = meta_obj$upper.random,
- I2 = meta_obj$I2,
- tau2 = meta_obj$tau2,
- Q = meta_obj$Q,
- df = meta_obj$df.Q,
- p = meta_obj$pval.Q
- )
- }, .keep = TRUE) %>%
- bind_rows()
- # Order and label segments
- segment_summaries$Segment <- factor(segment_summaries$Segment,
- levels = c("L1-L2", "L3-L6", "L5 Med", "Lumbar"))
- # Format heterogeneity stats
- segment_summaries$Heterogeneity <- sprintf(
- "I² = %.1f%%, τ² = %.2f\nQ = %.2f (df = %d, p = %.3f)",
- segment_summaries$I2,
- segment_summaries$tau2,
- segment_summaries$Q,
- segment_summaries$df,
- segment_summaries$p
- )
- # Start plot
- ggplot(segment_summaries, aes(x = Segment, y = TE)) +
- geom_point(size = 4, shape = 15) +
- geom_errorbar(aes(ymin = lower, ymax = upper), width = 0.15) +
- geom_hline(yintercept = 0, linetype = "dashed", color = "gray40") +
- geom_text(aes(y = lower - 0.6, label = Heterogeneity), hjust = 0.5, size = 3.6) +
- coord_flip(clip = "off") +
- labs(
- title = "Summary Effect Sizes by Spinal Segment",
- y = "Hedges' g (95% CI)",
- x = NULL
- ) +
- theme_minimal(base_size = 14) +
- theme(
- plot.margin = margin(10, 20, 30, 10),
- axis.text.y = element_text(size = 10)
- ) +
- ylim(min(segment_summaries$lower) - 1.8,
- max(segment_summaries$upper) + 0.6)
- ### Bayesian Analysis due to wide I² confidence Interval ###
- # Ensure factors are set appropriately
- # Ensure Segment.Taken is properly factored (should already be done)
- escalc_data$Segment.Taken <- factor(escalc_data$Segment.Taken)
- escalc_data$Segment.Taken <- relevel(escalc_data$Segment.Taken, ref = "L1-L2")
- # Fit Bayesian multilevel model
- brm_model <- brm(
- formula = yi | se(sqrt(vi)) ~ 0 + Segment.Taken + (1 | First.Author/Segment.Taken),
- data = escalc_data,
- prior = c(
- prior(normal(0, 2), class = "b"),
- prior(cauchy(0, 1), class = "sd")
- ),
- sample_prior = "yes",
- iter = 4000,
- warmup = 1000,
- chains = 4,
- cores = 4,
- control = list(adapt_delta = 0.99),
- backend = "rstan",
- file = "brm_model_fit"
- )
- # View summary of Bayesian model
- summary(brm_model)
- # Compute pairwise contrasts (posterior distributions)
- pairwise_contrasts <- hypothesis(brm_model, c(
- "Segment.TakenL3ML6 - Segment.TakenL1ML2 = 0",
- "Segment.TakenL5Med - Segment.TakenL1ML2 = 0",
- "Segment.TakenLumbar - Segment.TakenL1ML2 = 0",
- "Segment.TakenL3ML6 - Segment.TakenL5Med = 0",
- "Segment.TakenL3ML6 - Segment.TakenLumbar = 0",
- "Segment.TakenL5Med - Segment.TakenLumbar = 0"
- ))
- print(pairwise_contrasts, digits = 3)
- # Extract posterior draws for I² calculation and heterogeneity plots
- posterior_draws <- as_draws_df(brm_model)
- # Save posterior draws to file for later use in posterior probability step
- saveRDS(posterior_draws, file = "brms_bayesian_model_output.rds")
- # Compute posterior probabilities from draws
- post_probs <- posterior_draws %>%
- transmute(
- diff_L3_vs_L1 = b_Segment.TakenL3ML6 - b_Segment.TakenL1ML2,
- diff_L5_vs_L1 = b_Segment.TakenL5Med - b_Segment.TakenL1ML2,
- diff_Lumbar_vs_L1 = b_Segment.TakenLumbar - b_Segment.TakenL1ML2,
- diff_L3_vs_L5 = b_Segment.TakenL3ML6 - b_Segment.TakenL5Med,
- diff_L3_vs_Lumbar = b_Segment.TakenL3ML6 - b_Segment.TakenLumbar,
- diff_L5_vs_Lumbar = b_Segment.TakenL5Med - b_Segment.TakenLumbar
- ) %>%
- summarise(
- `P(L3-L6 > L1-L2)` = mean(diff_L3_vs_L1 > 0),
- `P(L5 Med > L1-L2)` = mean(diff_L5_vs_L1 > 0),
- `P(Lumbar > L1-L2)` = mean(diff_Lumbar_vs_L1 > 0),
- `P(L3-L6 > L5 Med)` = mean(diff_L3_vs_L5 > 0),
- `P(L3-L6 > Lumbar)` = mean(diff_L3_vs_Lumbar > 0),
- `P(L5 Med > Lumbar)` = mean(diff_L5_vs_Lumbar > 0)
- )
- # Print posterior probabilities
- print(post_probs, digits = 3)
- # Plot posterior means and 95% CrI per segment
- brm_model %>%
- spread_draws(b_Segment.TakenL1ML2, b_Segment.TakenL3ML6, b_Segment.TakenL5Med, b_Segment.TakenLumbar) %>%
- pivot_longer(cols = everything(), names_to = "Segment", values_to = "Estimate") %>%
- mutate(Segment = dplyr::recode(Segment,
- "b_Segment.TakenL1ML2" = "L1-L2",
- "b_Segment.TakenL3ML6" = "L3-L6",
- "b_Segment.TakenL5Med" = "L5 Med",
- "b_Segment.TakenLumbar" = "Lumbar"
- )) %>%
- group_by(Segment) %>%
- summarise(
- Mean = mean(Estimate),
- Lower = quantile(Estimate, 0.025),
- Upper = quantile(Estimate, 0.975),
- .groups = "drop"
- ) %>%
- ggplot(aes(x = Segment, y = Mean)) +
- geom_point(size = 4) +
- geom_errorbar(aes(ymin = Lower, ymax = Upper), width = 0.2) +
- geom_hline(yintercept = 0, linetype = "dashed", color = "gray40") +
- coord_flip() +
- labs(
- title = "Bayesian Posterior Estimates by Spinal Segment",
- y = "Posterior Mean (95% Credible Interval)",
- x = NULL
- ) +
- theme_minimal(base_size = 14)
- ###Figure for Segment Moderator###
- library(knitr)
- data <- data.frame(
- Segment = c("L1-L2", "L5 Med", "Lumbar", "L3-L6"),
- Effect_Size = c(-3.91, -2.83, -2.07, -1.91),
- CI = c("[-4.68, -3.13]", "[-4.05, -1.60]", "[-2.95, -1.20]", "[-2.70, -1.03]"),
- SE = c(0.39, 0.62, 0.44, 0.50),
- Comparison = c("–", "0.083", "<.0001", "<.0001")
- )
- kable(data, align = "c", col.names = c("Segment", "Effect Size", "95% CI", "SE", "Pairwise Comparison"))
- ###3PSM not used due to groupings having smaller study sizes###
- ##Test 3PSM with step adjustments##
- # Ensure p-values are calculated
- escalc_data$sei <- sqrt(escalc_data$vi)
- escalc_data$pval <- 2 * (1 - pnorm(abs(escalc_data$yi / escalc_data$sei)))
- steps = c(0.05, 1)
- segment_summaries <- sma_comp %>%
- group_by(Segment.Taken) %>%
- group_map(~ {
- meta_obj <- metagen(
- TE = .x$yi,
- seTE = .x$se,
- sm = "SMD",
- method.tau = "REML",
- method.random.ci = "HK",
- studlab = .x$First.Author
- )
- data.frame(
- Segment = unique(.x$Segment.Taken),
- g = meta_obj$TE.random,
- lower = meta_obj$lower.random,
- upper = meta_obj$upper.random,
- I2 = meta_obj$I2,
- Q = round(meta_obj$Q, 2),
- pval = format.pval(meta_obj$pval.Q, digits = 3, eps = .001),
- CI = paste0("[", round(meta_obj$lower.random, 2), ", ", round(meta_obj$upper.random, 2), "]")
- )
- }, .keep = TRUE) %>%
- bind_rows()
- # Order levels
- segment_summaries$Segment <- factor(segment_summaries$Segment, levels = c("L1-L2", "L3-L6", "L5 Med", "Lumbar"))
- # Create label for under-y-axis text
- segment_summaries$LabelText <- paste0("I² = ", round(segment_summaries$I2, 1), "%\nCI = ", segment_summaries$CI, "\nQ = ", segment_summaries$Q, ", p = ", segment_summaries$pval)
- # Plot
- library(ggplot2)
- grid::grid.newpage()
- ggplot(segment_summaries, aes(x = Segment, y = g)) +
- geom_point(size = 4, color = "#1f78b4") +
- geom_errorbar(aes(ymin = lower, ymax = upper), width = 0.15, color = "#1f78b4") +
- geom_hline(yintercept = 0, linetype = "dashed", color = "gray40") +
- coord_flip(clip = "off") +
- labs(
- title = "Summary Effect Sizes by Spinal Segment",
- x = NULL,
- y = "Hedges' g (95% CI)"
- ) +
- # Add text below segment label
- geom_text(aes(x = Segment, y = min(lower) - 0.5, label = LabelText),
- hjust = 0, vjust = 1, size = 4.2) +
- theme_minimal(base_size = 14) +
- theme(
- plot.margin = margin(10, 30, 40, 10),
- axis.text.y = element_text(margin = margin(r = 20))
- ) +
- ylim(min(segment_summaries$lower) - 1.2, max(segment_summaries$upper) + 0.5)
- # Get unique segment groups
- segments <- unique(escalc_data$Segment.Taken)
- # Define a function to run 3PSM on a single subgroup
- run_3psm <- function(data, segment_name) {
- model <- tryCatch({
- weightfunct(
- effect = data$yi,
- v = data$vi,
- steps = c(0.01, 0.05, 1),
- table = TRUE
- )
- }, error = function(e) return(NULL))
- if (!is.null(model)) {
- data.frame(
- Segment = segment_name,
- Unadj_Est = round(model$unadj_est[1], 3),
- Unadj_CI = paste0("[", round(model$ci.lb_unadj[1], 3), ", ", round(model$ci.ub_unadj[1], 3), "]"),
- Unadj_p = signif(model$p_unadj[1], 3),
- Adj_Est = round(model$adj_est[1], 3),
- Adj_CI = paste0("[", round(model$ci.lb_adj[1], 3), ", ", round(model$ci.ub_adj[1], 3), "]"),
- Adj_p = signif(model$p_adj[1], 3)
- )
- } else {
- data.frame(
- Segment = segment_name,
- Unadj_Est = NA, Unadj_CI = NA, Unadj_p = NA,
- Adj_Est = NA, Adj_CI = NA, Adj_p = NA
- )
- }
- }
- # Loop over segments and run 3PSM per group
- results_list <- lapply(segments, function(seg) {
- group_data <- subset(escalc_data, Segment.Taken == seg)
- run_3psm(group_data, seg)
- })
- # Combine all results into a data frame
- results_df <- do.call(rbind, results_list)
- # View results
- print(results_df)
D7_Final.R at commit 79120b4, no license · at the source
Overview
- Carl-Ludwig-Institute for Physiology, Leipzig University, 04103 Leipzig, Germany
- Center for Motor Neuron Biology and Disease, Columbia University, New York, NY 10032 USA
- Depts. of Pathology and Cell Biology and Neurology, Columbia University, New York, NY 10032 USA
- Biogen, Cambridge, MA 02142 USA
- Department of Neurology, Johns Hopkins University School of Medicine, Baltimore, MD 21205 USA
- Department of Neuroscience, Johns Hopkins University School of Medicine, Baltimore, MD 21205 USA
- Department of Genetic Medicine, Johns Hopkins University School of Medicine, Baltimore, MD 21218 USA
Abstract
Motor neuron (MN) loss is a hallmark of neurodegenerative disorders, yet its assessment remains variable, confounding mechanistic and therapeutic interpretation. To address this, we conducted a systematic review and meta-analysis of spinal muscular atrophy (SMA) mouse studies, revealing 60% variability in reported MN loss, for which spinal cord sampling emerged as a major contributor. Using a whole-segment approach with tissue clearing, MN tracing, and multimodal imaging, we confirmed segment-dependent differences in MN counts. Common MN markers (SMI-32, Nissl) lacked specificity, whereas choline acetyltransferase (ChAT) provided robust labeling in murine and human spinal cords. Deep learning–based whole-mount segmentation enabled unbiased MN quantification and validated manual counts. Integrating analysis with computational modeling established segment sampling as a key driver of variability and revealed degeneration patterns: widespread MN loss in amyotrophic lateral sclerosis (ALS), selective MN loss in severe SMA, and preservation in mild SMA models. These findings establish a framework for reproducible MN quantification.
Supplementary Information: The online version contains supplementary material available at https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above.
a-l-norman/SMN-delta-7-meta-analysis-R-code
79120b41bbcedcc82d5dfb239b7425463a4f8bbd, 10 July 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
2 files
- D7_Final.R, R, 681 lines
- README.md, Text, 2 lines
GerstnerF/Counting-Simulation
bd5b07a6bcc34bedda102d6283df2aa8594e9bce, 16 April 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
2 files
- Counting-Simulation.R, R, 313 lines
- README.md, Text, 183 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:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 2 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- figshare:33413234, at figshare; found in DataCite
Data availability
The authors confirm that the data supporting the findings of this study are available within the article and its Supplementary material. Some data are not publicly available owing to patient-related restrictions, because they contain information that could compromise the privacy of research participants. Additionally, certain derived data from mouse experiments are available from the corresponding authors upon reasonable request.
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, issue, pages, dates, 13 authors, 9 keywords, 8 MeSH terms, 1 funder, 83 references.
Cite
This paper
Sowoidnich, L., Norman, A. L., Gerstner, F., Siemund, J. K., Buettner, J. M., Pagiazitis, J. G., Dreilich, V., Pilz, K., Tian, D., Sumner, C. J., Paradis, A., Mentis, G. Z., & Simon, C. M. (2026). A standardized framework resolves ambiguity in motor neuron loss across neurodegenerative diseases. Acta neuropathologica communications, 14(1), 182. https://
BibTeX
@article{sowoidnich2026s
author = {Sowoidnich, Leonie and Norman, Aaron L and Gerstner, Florian and Siemund, Josiane K and Buettner, Jannik M and Pagiazitis, John G and Dreilich, Vanessa and Pilz, Konstantin and Tian, Dajun and Sumner, Charlotte J and Paradis, Angela and Mentis, George Z and Simon, Christian M},
title = {{A standardized framework resolves ambiguity in motor neuron loss across neurodegenerative diseases}},
journal = {Acta neuropathologica communications},
year = {2026},
month = sep,
volume = {14},
number = {1},
pages = {182},
publisher = {BMC},
issn = {2051-5960},
doi = {10.1186/
url = {https://
pmid = {42681667},
pmcid = {PMC13536862}
}
RIS
TY - JOUR
AU - Sowoidnich, Leonie
AU - Norman, Aaron L
AU - Gerstner, Florian
AU - Siemund, Josiane K
AU - Buettner, Jannik M
AU - Pagiazitis, John G
AU - Dreilich, Vanessa
AU - Pilz, Konstantin
AU - Tian, Dajun
AU - Sumner, Charlotte J
AU - Paradis, Angela
AU - Mentis, George Z
AU - Simon, Christian M
TI - A standardized framework resolves ambiguity in motor neuron loss across neurodegenerative diseases
T2 - Acta neuropathologica communications
J2 - Acta Neuropathol Commun
PY - 2026
DA - 2026/
VL - 14
IS - 1
SP - 182
SN - 2051-5960
PB - BMC
DO - 10.1186/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1186/
"type": "article-journal",
"title": "A standardized framework resolves ambiguity in motor neuron loss across neurodegenerative diseases",
"container-title": "Acta neuropathologica communications",
"author": [
{
"family": "Sowoidnich",
"given": "Leonie"
},
{
"family": "Norman",
"given": "Aaron L"
},
{
"family": "Gerstner",
"given": "Florian"
},
{
"family": "Siemund",
"given": "Josiane K"
},
{
"family": "Buettner",
"given": "Jannik M"
},
{
"family": "Pagiazitis",
"given": "John G"
},
{
"family": "Dreilich",
"given": "Vanessa"
},
{
"family": "Pilz",
"given": "Konstantin"
},
{
"family": "Tian",
"given": "Dajun"
},
{
"family": "Sumner",
"given": "Charlotte J"
},
{
"family": "Paradis",
"given": "Angela"
},
{
"family": "Mentis",
"given": "George Z"
},
{
"family": "Simon",
"given": "Christian M"
}
],
"container-title-short":
"volume": "14",
"issue": "1",
"page": "182",
"DOI": "10.1186/
"PMID": "42681667",
"PMCID": "PMC13536862",
"ISSN": "2051-5960",
"publisher": "BMC",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
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.1016/j.cell.2026.05.047 [code]
- An emergent disease-associated motor neuron state precedes cell death in ALS.Journal: CellIn common: ggplot2, tidyverse, other condition, mouse, 5 references
- [2] doi:10.1016/j.celrep.2026.117505 [code]
- Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.Journal: Cell reportsIn common: metafor, brms, car, 3 other tools, mouse
- [3] doi:10.1038/s41467-026-73865-9 [code]
- Histamine shapes the neurocomputational dynamics of human learning.Journal: Nature communicationsIn common: metafor, brms, car, 3 other tools
- [4] doi:10.1038/s41467-026-73545-8
- Long-term comparative analysis of AAV9-mediated gene replacement therapies for spinal muscular atrophy in mice.Journal: Nature communicationsIn common: other condition, mouse, 5 references
- [5] doi:10.1038/s12276-026-01689-0
- Haloperidol induces neuroprotection and enhances neuromuscular function in both murine and human models of spinal muscular atrophy.Journal: Experimental & molecular medicineIn common: other condition, mouse, 5 references
- [6] doi:10.1162/opmi.a.372 [code]
- Broadening the Agent Preference Hypothesis Through Experiencers: Eye-Tracking and EEG Evidence of Proto-Agents and Proto-Patients.Journal: Open mind : discoveries in cognitive scienceIn common: brms, car, data.table, 3 other tools
- [7] doi:10.1093/braincomms/fcag146 [code]
- Convergent structural brain alterations in chronic pain: a multi-metric individual participant data meta-analysis.Journal: Brain communicationsIn common: metafor, car, data.table, 2 other tools
- [8] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: brms, data.table, patchwork, 2 other tools, mouse
- [9] doi:10.1523/eneuro.0076-26.2026 [code]
- Exogenously Driven Neural Reactivation of Spatially Matching Visual Working-Memory Contents.Journal: eNeuroIn common: brms, car, data.table, 2 other tools
- [10] doi:10.1016/j.isci.2026.116747 [code]
- Age and loneliness relate to reduced trust learning and alterations in amygdala function.Journal: iScienceIn common: brms, car, patchwork, 2 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 2 scripts, and 0 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:dd85734d42b7a8e6…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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.
