OSCR

Shotgun metagenomic analysis reveals taxonomic and functional alterations in the gut microbiome across prodromal and symptomatic Lewy body disease.

Code ↔ Paper

9 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 9 matches
  1. [1] § Results › Microbial features characterizing the disease continuum of Lewy body disease ↔ 2-microbial_taxa_analysis/2-different_prevalence_analysis_final_version.R, lines 192 to 281 · score 0.98 · Oscillospiraceae bacterium CLA, Actinomyces oris, GGB3730 SGB5060, GGB9627 SGB15081, GGB9719 SGB15272, Akkermansia muciniphila · Report a mismatch
  2. [2] § Materials and methods › Gut microbiome diversity analysis ↔ 1-alpha_beta_diversity/alpha_beta_diversity_final_version.R, lines 86 to 124 · score 0.73 · PCoA, species richness, arcsine square root, diversity, household ID, lmer · Report a mismatch
  3. [3] § Materials and methods › Correlations between clinical characteristics and microbial features ↔ 5-correlation_analysis/partial_correlation_analysis.R, lines 424 to 489 · score 0.73 · MoCA, CDR SB, partial correlation, clinical measurements, UPDRS, STMS · Report a mismatch
  4. [4] § Results › Differentially abundant and prevalent gut microbiome features between LBD patients and their cohabitant controls ↔ 2-microbial_taxa_analysis/2-different_prevalence_analysis_final_version.R, lines 192 to 281 · score 0.71 · Oscillospiraceae bacterium CLA, Longicatena caecimuris, AA H250, prevalent, taxa, species · Report a mismatch
  5. [5] § Materials and methods › Differential abundance and prevalence analysis ↔ 2-microbial_taxa_analysis/1-differential_abundance_analysis_final_version.R, lines 1 to 66 · score 0.69 · low abundance, noise, preprocessed, zero, microbial species, downstream · Report a mismatch
  6. [6] § Materials and methods › Correlations between clinical characteristics and microbial features ↔ 5-correlation_analysis/partial_correlation_analysis.R, lines 81 to 172 · score 0.65 · pcor.test, partial correlation, clinical measurement, Spearman, age, BMI · Report a mismatch
  7. [7] § Results › Correlation between clinical measures and microbial features ↔ 5-correlation_analysis/partial_correlation_analysis.R, lines 424 to 489 · score 0.63 · MoCA, CDR SB, partial correlation, resampling, UPDRS, STMS · Report a mismatch
  8. [8] § Materials and methods › Correlations between clinical characteristics and microbial features ↔ 5-correlation_analysis/partial_correlation_analysis.R, lines 81 to 172 · score 0.60 · partial correlation, clinical measurement, resampling, validation, Spearman, 80 % · Report a mismatch
  9. [9] § Materials and methods › Differential abundance and prevalence analysis ↔ 3-microbial_functional_pathway_analysis/pathway_analysis_final_version.R, lines 539 to 561 · score 0.59 · arcsine square root, prevalence cutoff, household ID, variables, linear, relative abundance · 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

R · 527 lines · 18 KB · no license · 4 matches

  1. library(ggplot2)
  2. library(reshape)
  3. library(tidyr)
  4. library(reshape2)
  5. library(dplyr)
  6. library(tidyverse)
  7. library(ppcor)
  8. ###############################################################################
  9. setwd("../5-correlation_analysis")
  10. ###############################################################################
  11. # 1. Read the species and pathway relative abundance data and modify the sample names.
  12. species_data <- read.table(file = "./metaphlan_results_new.tsv", sep = "\t", header = T, row.names = 1)
  13. species <- species_data[grepl("s__", rownames(species_data)) & !grepl("t__", rownames(species_data)), ]
  14. rownames(species) <- gsub(".*s__", "", rownames(species))
  15. colnames(species) <- gsub("metaphlan_|_S.*", "", names(species))
  16. pathway_data <- read.csv(file = "./pathway_results.tsv", sep = "\t", header = T, row.names = 1)
  17. colnames(pathway_data) <- gsub("_S.*", "", colnames(pathway_data))
  18. pathway <- pathway_data
  19. # 2. Read the metadata
  20. metadata <- read.csv(file = "./0-raw_data/imputed_BMI_metadata.csv", sep = ",", header = T, row.names = 1)
  21. species_clean <- species[, c(rownames(metadata))]
  22. pathway_clean <- pathway[, c(rownames(metadata))]
  23. # 3. Change the taxonomic data from percentage into proportion
  24. colSums(species_clean)
  25. species_prop <- data.frame(apply(species_clean, 2, function(x) x/sum(x)))
  26. colSums(species_prop)
  27. colSums(pathway_clean)
  28. pathway_prop <- data.frame(apply(pathway_clean, 2, function(x) x/sum(x)))
  29. colSums(pathway_prop)
  30. # 4. Use prevalence cut-off (10^-4.5) to remove bacterial species and pathways that are present in very low abundance
  31. cut_off_s <- 10^-4.7
  32. species_cutoff <- species_prop
  33. species_cutoff[species_cutoff <= cut_off_s] <- 0
  34. cut_off_p <- 10^-4.5
  35. pathway_cutoff <- pathway_prop
  36. pathway_cutoff[pathway_cutoff < cut_off_p] <- 0
  37. # 5. Add metadata to the proportion data
  38. species_t <- as.data.frame(t(species_cutoff))
  39. species_all <- merge(species_t, metadata, by = "row.names", all = F)
  40. rownames(species_all) <- species_all$Row.names
  41. species_done <- species_all[, -1]
  42. pathway_t <- as.data.frame(t(pathway_cutoff))
  43. pathway_all <- merge(pathway_t, metadata, by = "row.names", all = F)
  44. rownames(pathway_all) <- pathway_all$Row.names
  45. pathway_done <- pathway_all[, -1]
  46. ###############################################################################
  47. # ── STAGE 1: fast screen via parametric pcor.test ─────────────────────────────
  48. run_partial_cor_screen <- function(df, feature, clinical_measurement) {
  49. df1 <- df[, c(feature, "age", "BMI", clinical_measurement)]
  50. df2 <- na.omit(df1)
  51. if (nrow(df2) < 4) return(c(rho = NA, pval = NA))
  52. Z_full <- tryCatch(
  53. model.matrix(~ age + BMI, data = df2)[, -1, drop = FALSE],
  54. error = function(e) NULL)
  55. if (is.null(Z_full)) return(c(rho = NA, pval = NA))
  56. res <- tryCatch(
  57. pcor.test(x = df2[[1]], y = df2[[clinical_measurement]],
  58. z = Z_full, method = "spearman"),
  59. error = function(e) NULL)
  60. if (is.null(res) || is.na(res$estimate)) return(c(rho = NA, pval = NA))
  61. return(c(rho = res$estimate, pval = res$p.value))
  62. }
  63. # ── STAGE 2: resampling null + LOO stability (only on Stage 1 hits) ────────────
  64. run_partial_cor_validate <- function(df, feature, clinical_measurement, n_perm = 1000) {
  65. df1 <- df[, c(feature, "age", "BMI", clinical_measurement)]
  66. df2 <- na.omit(df1)
  67. if (nrow(df2) < 4) return(c(pval_resample = NA, ci_lower = NA, ci_upper = NA, stability = NA))
  68. n_total <- nrow(df2)
  69. # real rho (recomputed cleanly on complete cases)
  70. Z_full <- tryCatch(
  71. model.matrix(~ age + BMI, data = df2)[, -1, drop = FALSE],
  72. error = function(e) NULL)
  73. if (is.null(Z_full)) return(c(pval_resample = NA, ci_lower = NA, ci_upper = NA, stability = NA))
  74. real_res <- tryCatch(
  75. pcor.test(x = df2[[1]], y = df2[[clinical_measurement]],
  76. z = Z_full, method = "spearman"),
  77. error = function(e) NULL)
  78. if (is.null(real_res) || is.na(real_res$estimate)) {
  79. return(c(pval_resample = NA, ci_lower = NA, ci_upper = NA, stability = NA))
  80. }
  81. real_rho <- real_res$estimate
  82. # resampling null distribution
  83. set.seed(2026)
  84. null_rho <- c()
  85. for (i in seq_len(n_perm)) {
  86. size <- sample(ceiling(0.8 * n_total):(n_total - 1), 1)
  87. idx <- sample(seq_len(n_total), size, replace = FALSE)
  88. df_sub <- df2[idx, ]
  89. if (var(df_sub[[1]], na.rm = TRUE) == 0) next
  90. df_sub[[clinical_measurement]] <- sample(df_sub[[clinical_measurement]])
  91. Z_sub <- tryCatch(
  92. model.matrix(~ age + BMI, data = df_sub)[, -1, drop = FALSE],
  93. error = function(e) NULL)
  94. if (is.null(Z_sub)) next
  95. res_null <- tryCatch(
  96. pcor.test(x = df_sub[[1]], y = df_sub[[clinical_measurement]],
  97. z = Z_sub, method = "spearman"),
  98. error = function(e) NULL)
  99. if (is.null(res_null) || is.na(res_null$estimate)) next
  100. null_rho <- c(null_rho, res_null$estimate)
  101. }
  102. pval_resample <- if (length(null_rho) > 0) mean(abs(null_rho) >= abs(real_rho)) else NA
  103. # LOO stability
  104. sig_count <- 0
  105. total_count <- 0
  106. all_rho <- c()
  107. for (iter in seq_len(n_total)) {
  108. df_sub <- df2[-iter, ]
  109. if (var(df_sub[[1]], na.rm = TRUE) == 0) next
  110. Z_sub <- tryCatch(
  111. model.matrix(~ age + BMI, data = df_sub)[, -1, drop = FALSE],
  112. error = function(e) NULL)
  113. if (is.null(Z_sub)) next
  114. res_loo <- tryCatch(
  115. pcor.test(x = df_sub[[1]], y = df_sub[[clinical_measurement]],
  116. z = Z_sub, method = "spearman"),
  117. error = function(e) NULL)
  118. if (is.null(res_loo) || is.na(res_loo$estimate)) next
  119. total_count <- total_count + 1
  120. all_rho <- c(all_rho, res_loo$estimate)
  121. if (sign(res_loo$estimate) == sign(real_rho) && abs(res_loo$estimate) >= 0.4) {
  122. sig_count <- sig_count + 1
  123. }
  124. cat(sprintf(" Feature: %-40s | LOO iter: %d/%d | rho: %.3f\n",
  125. feature, iter, n_total, res_loo$estimate))
  126. }
  127. stability <- if (total_count > 0) sig_count / total_count else NA
  128. ci_lower <- unname(quantile(all_rho, 0.025, na.rm = TRUE))
  129. ci_upper <- unname(quantile(all_rho, 0.975, na.rm = TRUE))
  130. return(c(pval_resample = pval_resample,
  131. ci_lower = ci_lower,
  132. ci_upper = ci_upper,
  133. stability = stability))
  134. }
  135. # ── WRAPPER: two-stage pipeline ────────────────────────────────────────────────
  136. partial_cor_subsample <- function(data, data_type, clinical_measurement, group, threshold, n_perm = 1000) {
  137. df <- data %>% filter(condition == group)
  138. filtered_df <- df[, c(1:(ncol(df) - 32))][, colSums(df[, c(1:(ncol(df) - 32))] > 0) >= threshold * nrow(df)]
  139. features <- colnames(filtered_df)
  140. n_feat <- length(features)
  141. # ── open log file ────────────────────────────────────────────────────────────
  142. log_file <- paste0("partial_cor_log_", clinical_measurement, "_", group, "_", data_type, ".txt")
  143. log_con <- file(log_file, open = "wt")
  144. log <- function(...) {
  145. msg <- paste0(...)
  146. cat(msg, "\n")
  147. cat(msg, "\n", file = log_con)
  148. }
  149. on.exit(close(log_con), add = TRUE)
  150. log("=== STAGE 1: parametric screen across ", n_feat, " features ===")
  151. log("clinical_measurement : ", clinical_measurement)
  152. log("group : ", group)
  153. log("data_type : ", data_type)
  154. log("prevalence threshold : ", threshold)
  155. log("n_perm (Stage 2) : ", n_perm)
  156. log("timestamp : ", format(Sys.time(), "%Y-%m-%d %H:%M:%S"))
  157. log(strrep("-", 60))
  158. # ── Stage 1: parametric screen ──────────────────────────────────────────────
  159. screen_rho <- numeric(n_feat)
  160. screen_pval <- numeric(n_feat)
  161. for (i in seq_len(n_feat)) {
  162. log(sprintf("[%d/%d] %s", i, n_feat, features[i]))
  163. res <- run_partial_cor_screen(df, features[i], clinical_measurement)
  164. screen_rho[i] <- res[["rho"]]
  165. screen_pval[i] <- res[["pval"]]
  166. }
  167. screen_result <- data.frame(
  168. feature = features,
  169. rho = screen_rho,
  170. pval = screen_pval,
  171. qval = p.adjust(screen_pval, method = "BH")
  172. )
  173. # save ALL screen results
  174. screen_result_order <- screen_result[order(screen_result$pval), ]
  175. write.csv(screen_result_order,
  176. file = paste0("partial_cor_screen_", clinical_measurement, "_", group, "_", data_type, ".csv"),
  177. row.names = FALSE)
  178. hits <- screen_result[!is.na(screen_result$pval) & screen_result$pval < 0.05, ]
  179. log(strrep("-", 60))
  180. log(sprintf("Stage 1 complete: %d / %d features pass (raw p < 0.05)", nrow(hits), n_feat))
  181. log(sprintf("Full screen results saved to: partial_cor_screen_%s_%s_%s.csv", clinical_measurement, group, data_type))
  182. log(strrep("-", 60))
  183. if (nrow(hits) == 0) {
  184. log("No features passed Stage 1. Returning screen results only.")
  185. return(screen_result_order)
  186. }
  187. # ── Stage 2: resampling + LOO on hits only ───────────────────────────────────
  188. log(sprintf("\n=== STAGE 2: resampling + LOO on %d hits ===", nrow(hits)))
  189. val_pval <- numeric(nrow(hits))
  190. val_ci_lower <- numeric(nrow(hits))
  191. val_ci_upper <- numeric(nrow(hits))
  192. val_stability <- numeric(nrow(hits))
  193. for (i in seq_len(nrow(hits))) {
  194. feat <- hits$feature[i]
  195. log(sprintf("\n[%d/%d] %s", i, nrow(hits), feat))
  196. res <- run_partial_cor_validate(df, feat, clinical_measurement, n_perm = n_perm)
  197. val_pval[i] <- res[["pval_resample"]]
  198. val_ci_lower[i] <- res[["ci_lower"]]
  199. val_ci_upper[i] <- res[["ci_upper"]]
  200. val_stability[i] <- res[["stability"]]
  201. }
  202. result <- data.frame(
  203. feature = hits$feature,
  204. rho = hits$rho,
  205. pval_parametric = hits$pval,
  206. qval_parametric = hits$qval,
  207. pval_resample = val_pval,
  208. qval_resample = p.adjust(val_pval, method = "BH"),
  209. ci_lower = val_ci_lower,
  210. ci_upper = val_ci_upper,
  211. stability = val_stability
  212. )
  213. result_order <- result[order(result$pval_resample), ]
  214. log(strrep("-", 60))
  215. log("Stage 2 complete. Results saved to:")
  216. log(sprintf(" Screen (all) : partial_cor_screen_%s_%s_%s.csv", clinical_measurement, group, data_type))
  217. log(sprintf(" Validated (hits) : partial_cor_res_%s_%s_%s.csv", clinical_measurement, group, data_type))
  218. log(sprintf(" Log : %s", log_file))
  219. log(sprintf(" Timestamp : %s", format(Sys.time(), "%Y-%m-%d %H:%M:%S")))
  220. write.csv(result_order,
  221. file = paste0("partial_cor_res_", clinical_measurement, "_", group, "_", data_type, ".csv"),
  222. row.names = FALSE)
  223. return(result_order)
  224. }
  225. ## LBD: species: CDR-SB
  226. res_PC_cdr_species_lbd_new <- partial_cor_subsample(
  227. data = species_done,
  228. data_type = "species",
  229. clinical_measurement = "CDR_SB",
  230. group = "lbd",
  231. threshold = 0.5,
  232. n_perm = 1000)
  233. ## LBD: species: MOCA
  234. res_PC_moca_species_lbd_new <- partial_cor_subsample(
  235. data = species_done,
  236. data_type = "species",
  237. clinical_measurement = "MOCA",
  238. group = "lbd",
  239. threshold = 0.5,
  240. n_perm = 1000)
  241. ## LBD: species: STMS
  242. res_PC_stms_species_lbd_new <- partial_cor_subsample(
  243. data = species_done,
  244. data_type = "species",
  245. clinical_measurement = "STMS",
  246. group = "lbd",
  247. threshold = 0.5,
  248. n_perm = 1000)
  249. ## LBD: species: UPDRS3
  250. res_PC_updrs_species_lbd_new <- partial_cor_subsample(
  251. data = species_done,
  252. data_type = "species",
  253. clinical_measurement = "UPDRS3",
  254. group = "lbd",
  255. threshold = 0.5,
  256. n_perm = 1000)
  257. ## LBD: pathway: CDR-SB
  258. res_PC_cdr_pathway_lbd_new <- partial_cor_subsample(
  259. data = pathway_done,
  260. data_type = "pathway",
  261. clinical_measurement = "CDR_SB",
  262. group = "lbd",
  263. threshold = 0.5,
  264. n_perm = 1000)
  265. ## LBD: pathway: MOCA
  266. res_PC_moca_pathway_lbd_new <- partial_cor_subsample(
  267. data = pathway_done,
  268. data_type = "pathway",
  269. clinical_measurement = "MOCA",
  270. group = "lbd",
  271. threshold = 0.5,
  272. n_perm = 1000)
  273. ## LBD: pathway: STMS
  274. res_PC_stms_pathway_lbd_new <- partial_cor_subsample(
  275. data = pathway_done,
  276. data_type = "pathway",
  277. clinical_measurement = "STMS",
  278. group = "lbd",
  279. threshold = 0.5,
  280. n_perm = 1000)
  281. ## LBD: pathway: UPDRS
  282. res_PC_updrs_pathway_lbd_new <- partial_cor_subsample(
  283. data = pathway_done,
  284. data_type = "pathway",
  285. clinical_measurement = "UPDRS3",
  286. group = "lbd",
  287. threshold = 0.5,
  288. n_perm = 1000)
  289. ## iRBD: species: CDR-SB
  290. res_PC_cdr_species_irbd_new <- partial_cor_subsample(
  291. data = species_done,
  292. data_type = "species",
  293. clinical_measurement = "CDR_SB",
  294. group = "irbd",
  295. threshold = 0.5,
  296. n_perm = 1000)
  297. ## iRBD: species: MOCA
  298. res_PC_moca_species_irbd_new <- partial_cor_subsample(
  299. data = species_done,
  300. data_type = "species",
  301. clinical_measurement = "MOCA",
  302. group = "irbd",
  303. threshold = 0.5,
  304. n_perm = 1000)
  305. ## iRBD: species: STMS
  306. res_PC_stms_species_irbd_new <- partial_cor_subsample(
  307. data = species_done,
  308. data_type = "species",
  309. clinical_measurement = "STMS",
  310. group = "irbd",
  311. threshold = 0.5,
  312. n_perm = 1000)
  313. ## iRBD: species: UPDRS3
  314. res_PC_updrs_species_irbd_new <- partial_cor_subsample(
  315. data = species_done,
  316. data_type = "species",
  317. clinical_measurement = "UPDRS3",
  318. group = "irbd",
  319. threshold = 0.5,
  320. n_perm = 1000)
  321. ## iRBD: pathway: CDR-SB
  322. res_PC_cdr_pathway_irbd_new <- partial_cor_subsample(
  323. data = pathway_done,
  324. data_type = "pathway",
  325. clinical_measurement = "CDR_SB",
  326. group = "irbd",
  327. threshold = 0.5,
  328. n_perm = 1000)
  329. ## iRBD: pathway: MOCA
  330. res_PC_moca_pathway_irbd_new <- partial_cor_subsample(
  331. data = pathway_done,
  332. data_type = "pathway",
  333. clinical_measurement = "MOCA",
  334. group = "irbd",
  335. threshold = 0.5,
  336. n_perm = 1000)
  337. ## iRBD: pathway: STMS
  338. res_PC_stms_pathway_irbd_new <- partial_cor_subsample(
  339. data = pathway_done,
  340. data_type = "pathway",
  341. clinical_measurement = "STMS",
  342. group = "irbd",
  343. threshold = 0.5,
  344. n_perm = 1000)
  345. ## iRBD: pathway: UPDRS3
  346. res_PC_updrs_pathway_irbd_new <- partial_cor_subsample(
  347. data = pathway_done,
  348. data_type = "pathway",
  349. clinical_measurement = "UPDRS3",
  350. group = "irbd",
  351. threshold = 0.5,
  352. n_perm = 1000)
  353. ## LBD group:
  354. sig_cdr_sp_lbd <- res_PC_cdr_species_lbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "CDR-SB")
  355. sig_moca_sp_lbd <- res_PC_moca_species_lbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "MoCA")
  356. sig_stms_sp_lbd <- res_PC_stms_species_lbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "STMS")
  357. lbd_species_all <- rbind(sig_cdr_sp_lbd, sig_moca_sp_lbd, sig_stms_sp_lbd)
  358. lbd_species_all$feature <- sub("_", " ", lbd_species_all$feature)
  359. lbd_species_all_ordered <- lbd_species_all[order(lbd_species_all$feature), ]
  360. sig_cdr_pwy_lbd <- res_PC_cdr_pathway_lbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "CDR-SB")
  361. sig_moca_pwy_lbd <- res_PC_moca_pathway_lbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "MoCA")
  362. sig_stms_pwy_lbd <- res_PC_stms_pathway_lbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "STMS")
  363. lbd_pathway_all <- rbind(sig_cdr_pwy_lbd, sig_moca_pwy_lbd, sig_stms_pwy_lbd)
  364. lbd_pathway_all$feature <- sub(".*: ", "", lbd_pathway_all$feature)
  365. lbd_pathway_all_ordered <- lbd_pathway_all[order(lbd_pathway_all$feature), ]
  366. lbd_all <- rbind(lbd_species_all_ordered, lbd_pathway_all_ordered)
  367. lbd_all$log10p <- -log10(lbd_all$pval_parametric)
  368. lbd_all$group <- factor(lbd_all$group, levels = c("CDR-SB", "MoCA", "STMS"))
  369. lbd_all$feature <- factor(lbd_all$feature, levels = rev(unique(lbd_all$feature)))
  370. lbd_all$overall <- "lbd"
  371. sig_cdr_sp_irbd <- res_PC_cdr_species_irbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "CDR-SB")
  372. sig_moca_sp_irbd <- res_PC_moca_species_irbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "MoCA")
  373. sig_stms_sp_irbd <- res_PC_stms_species_irbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "STMS")
  374. irbd_species_all <- rbind(sig_cdr_sp_irbd, sig_moca_sp_irbd, sig_stms_sp_irbd)
  375. irbd_species_all$feature <- sub("_", " ", irbd_species_all$feature)
  376. irbd_species_all_ordered <- irbd_species_all[order(irbd_species_all$feature), ]
  377. sig_cdr_pwy_irbd <- res_PC_cdr_pathway_irbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "CDR-SB")
  378. sig_moca_pwy_irbd <- res_PC_moca_pathway_irbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "MoCA")
  379. sig_stms_pwy_irbd <- res_PC_stms_pathway_irbd_new %>% filter(pval_resample < 0.05) %>% mutate(group = "STMS")
  380. irbd_pathway_all <- rbind(sig_cdr_pwy_irbd, sig_moca_pwy_irbd, sig_stms_pwy_irbd)
  381. irbd_pathway_all$feature <- sub(".*: ", "", irbd_pathway_all$feature)
  382. irbd_pathway_all_ordered <- irbd_pathway_all[order(irbd_pathway_all$feature), ]
  383. irbd_all <- rbind(irbd_species_all_ordered, irbd_pathway_all_ordered)
  384. irbd_all$log10p <- -log10(irbd_all$pval_parametric)
  385. irbd_all$group <- factor(irbd_all$group, levels = c("CDR-SB", "MoCA", "STMS"))
  386. irbd_all$feature <- factor(irbd_all$feature, levels = rev(unique(irbd_all$feature)))
  387. irbd_all$overall <- "irbd"
  388. lbd_irbd_all <- rbind(lbd_all, irbd_all)
  389. lbd_irbd_all$overall <- factor(lbd_irbd_all$overall, levels = c("lbd", "irbd"))
  390. #lbd_irbd_all$overall_label <- factor(lbd_irbd_all$overall_label, levels = unique(lbd_irbd_all$overall_label))
  391. summary(lbd_irbd_all$pval_parametric)
  392. pdf(file = "lbd_irbd_correlation_v13.pdf", height = 5, width = 11)
  393. ggplot(lbd_irbd_all, aes(x = group, y = feature)) +
  394. geom_point(aes(size = log10p, fill = rho),
  395. shape = 21, color = "black", stroke = 1) + # stroke controls border thickness
  396. scale_fill_gradient2(
  397. low = "#55b7e6", mid = "white", high = "#ff9274", midpoint = 0,
  398. name = "Spearman Rho",
  399. limits = c(-1, 1)
  400. ) +
  401. scale_size_continuous(
  402. name = "P-value",
  403. breaks = c(-log10(0.0348), -log10(0.01), -log10(0.005), -log10(0.00058)), # Define specific sizes to show in legend
  404. labels = c("P = 0.0348", "P = 0.01", "P = 0.005", "P = 0.00058")) +
  405. facet_wrap(~ overall, scales = "free_y") +
  406. theme_bw() +
  407. labs(x = NULL, y = NULL) +
  408. theme(
  409. axis.text.x = element_text(size = 10, angle = 45, hjust = 1),
  410. axis.text.y = element_text(size = 10),
  411. panel.grid.major = element_line(color = "gray90"),
  412. panel.grid.minor = element_blank(),
  413. legend.key.height = unit(0.6, "cm"),
  414. legend.key.width = unit(0.6, "cm")
  415. ) +
  416. scale_y_discrete(position = "right")
  417. dev.off()
  418. # Save current RNG state
  419. rng_state <- .Random.seed
  420. saveRDS(rng_state, "rng_state.rds")
  421. # Later, to restore it before re-running:
  422. .Random.seed <- readRDS("rng_state.rds")

partial_correlation_analysis.R at commit f63e83c, no license · at the source

Overview

Authors: Xiaowei Zhao1,2, Stuart J. McCarter3,4, Vinod K. Gupta2,5, Kiera M. Grant6, Erik K. St. Louis3,4, Kejal Kantarci7, Rodolfo Savica3, Max Hill1, Helen E. Vuong8, Christopher Staley9, Bradley F. Boeve3,4, Owen A. Ross10, Levi M. Teigen11, Jaeyun Sung2,5
ORCID iDs: Jaeyun Sung
  1. Bioinformatics and Computational Biology Program, University of Minnesota, Rochester, MN, United States
  2. Division of Computational Biology, Department of Quantitative Health Sciences, Mayo Clinic, Rochester, MN, United States
  3. Department of Neurology, Mayo Clinic, Rochester, MN, United States
  4. Center for Sleep Medicine, Mayo Clinic, Rochester, MN, United States
  5. Microbiomics Program, Center of Individualized Medicine, Mayo Clinic, Rochester, MN, United States
  6. Division of Clinical Trials and Biostatistics, Department of Quantitative Health Sciences, Mayo Clinic, Rochester, MN, United States
  7. Department of Radiology, Mayo Clinic, Rochester, MN, United States
  8. Division of Neonatology, Department of Pediatrics, University of Minnesota, Minneapolis, MN, United States
  9. Department of Surgery, School of Medicine, University of Minnesota, Minneapolis, MN, United States
  10. Department of Neuroscience, Mayo Clinic, Jacksonville, FL, United States
  11. Department of Food Science and Nutrition, University of Minnesota, St. Paul, MN, United States
Institutions: University of Minnesota (United States); Mayo Clinic (United States)
Journal: Frontiers in microbiomes, volume 5, article 1834726
Dates: received 19 March 2026; accepted 16 June 2026; published online 15 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3389/frmbi.2026.1834726 · PMID 42529077 · PMCID PMC13416100 · OpenAlex W7168408676
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: genetics / omics (modality), human (organism), Alzheimer's / dementia (population), Parkinson's (population), sleep disorders (population), cellular / molecular (subfield)
Methods: Connectivity, Statistics
Keywords: dementia, gut microbiome, gut-brain axis, isolated REM sleep behavior disorder (iRBD), Lewy body disease (LBD), mild cognitive impairment (MCI), shotgun metagenomic sequencing, α-synucleinopathy
Topic: Gut microbiota and health (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: NIA NIH HHS (R34 AG056639, U19 AG071754, P30 AG062677); NINDS NIH HHS (U01 NS100620)
Citations: not cited yet (Europe PMC); 92 references in the paper

Abstract

Background: Lewy body disease (LBD) is a progressive neurodegenerative a-synucleinopathy, whereas isolated REM sleep behavior disorder (iRBD) is recognized as a prodromal stage of LBD. Although growing evidence implicates the gut–brain axis in neurodegeneration, the taxonomic and functional roles of the gut microbiome across the prodromal-to-symptomatic LBD continuum remain poorly defined.

Methods: Here, we performed shotgun metagenomic sequencing on stool samples from 25 patients with LBD (10 mild cognitive impairment due to LBD [MCI-LB] and 15 dementia with Lewy bodies [DLB]), 10 individuals with iRBD, and their household matched cohabitant controls to characterize disease-associated microbial alterations while minimizing environmental confounding.

Results: Despite no significant differences in global microbial diversity, we identified convergent shifts in microbial taxa, metabolic pathways, and gene families across disease stages. Both LBD and iRBD showed increased abundance of microbial taxa potentially associated with gut barrier disruption, as well as higher abundance of functional pathways related to lipopolysaccharide biosynthesis. LBD showed lower abundance of pathways related to complex carbohydrate fermentation, and both groups showed lower abundance of pathways associated with neurotransmitter-related metabolism. In particular, pathways and gene families associated with starch degradation were reduced in LBD, and those associated with histidine-to-glutamate/ GABA metabolism were reduced in both groups.

Discussion: These exploratory findings represent the first high-resolution, shotgun metagenomic characterization of gut microbiome alterations across the LBD continuum, highlighting functional patterns that may serve as candidate markers of disease progression in future longitudinal and mechanistic studies.

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 9 matches between paragraphs and lines of code.

xiaowei-zhao-1111/LBD_Gut_Microbiome_2026

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: f63e83c4ee0af68f46830b2546beec93dcff8182, 16 July 2026
Languages: R (8)
Size: 47 files, 8 scripts
Software Heritage: not archived
Found in: “Data availability statement”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (8 files), ggplot2 (7 files), reshape2 (6 files), ggpubr (4 files), lmerTest (4 files), easystats (1 file), pheatmap (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
9 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;
  • 8 scripts, each with its path and the digest of its content;
  • 9 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

Datasets cited

Data availability statement

Sequencing data for stool metagenomes used in this study have been deposited at NCBI’s SRA data repository (PRJNA1393457) and can be downloaded without any restrictions at https://www.ncbi.nlm.nih.gov/bioproject/PRJNA1393457/. The deposited sequences include .fastq files for 70 stool metagenomes collected from 25 LBD patients, 10 iRBD patients, as well as their 35 cohabitant controls. Human reads were identified and removed prior to data upload. Code used for data analysis is available in the following GitHub repository: https://github.com/xiaowei-zhao-1111/LBD_Gut_Microbiome_2026.

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, 14 authors, 8 keywords, 2 funders, 89 references.

Cite

This paper

Zhao, X., McCarter, S. J., Gupta, V. K., Grant, K. M., St. Louis, E. K., Kantarci, K., Savica, R., Hill, M., Vuong, H. E., Staley, C., Boeve, B. F., Ross, O. A., Teigen, L. M., & Sung, J. (2026). Shotgun metagenomic analysis reveals taxonomic and functional alterations in the gut microbiome across prodromal and symptomatic Lewy body disease. Frontiers in microbiomes, 5, 1834726. https://doi.org/10.3389/frmbi.2026.1834726

BibTeX

@article{zhao2026shotgun,
author = {Zhao, Xiaowei and McCarter, Stuart J. and Gupta, Vinod K. and Grant, Kiera M. and St. Louis, Erik K. and Kantarci, Kejal and Savica, Rodolfo and Hill, Max and Vuong, Helen E. and Staley, Christopher and Boeve, Bradley F. and Ross, Owen A. and Teigen, Levi M. and Sung, Jaeyun},
title = {{Shotgun metagenomic analysis reveals taxonomic and functional alterations in the gut microbiome across prodromal and symptomatic Lewy body disease}},
journal = {Frontiers in microbiomes},
year = {2026},
month = jul,
volume = {5},
pages = {1834726},
publisher = {Frontiers Media SA},
issn = {2813-4338},
doi = {10.3389/frmbi.2026.1834726},
url = {https://doi.org/10.3389/frmbi.2026.1834726},
pmid = {42529077},
pmcid = {PMC13416100}
}

RIS

TY - JOUR
AU - Zhao, Xiaowei
AU - McCarter, Stuart J.
AU - Gupta, Vinod K.
AU - Grant, Kiera M.
AU - St. Louis, Erik K.
AU - Kantarci, Kejal
AU - Savica, Rodolfo
AU - Hill, Max
AU - Vuong, Helen E.
AU - Staley, Christopher
AU - Boeve, Bradley F.
AU - Ross, Owen A.
AU - Teigen, Levi M.
AU - Sung, Jaeyun
TI - Shotgun metagenomic analysis reveals taxonomic and functional alterations in the gut microbiome across prodromal and symptomatic Lewy body disease
T2 - Frontiers in microbiomes
J2 - Front Microbiomes
PY - 2026
DA - 2026/07/15
VL - 5
SP - 1834726
SN - 2813-4338
PB - Frontiers Media SA
DO - 10.3389/frmbi.2026.1834726
UR - https://doi.org/10.3389/frmbi.2026.1834726
LA - en
ER -

CSL-JSON

{
"id": "10.3389/frmbi.2026.1834726",
"type": "article-journal",
"title": "Shotgun metagenomic analysis reveals taxonomic and functional alterations in the gut microbiome across prodromal and symptomatic Lewy body disease",
"container-title": "Frontiers in microbiomes",
"author": [
{
"family": "Zhao",
"given": "Xiaowei"
},
{
"family": "McCarter",
"given": "Stuart J."
},
{
"family": "Gupta",
"given": "Vinod K."
},
{
"family": "Grant",
"given": "Kiera M."
},
{
"family": "St. Louis",
"given": "Erik K."
},
{
"family": "Kantarci",
"given": "Kejal"
},
{
"family": "Savica",
"given": "Rodolfo"
},
{
"family": "Hill",
"given": "Max"
},
{
"family": "Vuong",
"given": "Helen E."
},
{
"family": "Staley",
"given": "Christopher"
},
{
"family": "Boeve",
"given": "Bradley F."
},
{
"family": "Ross",
"given": "Owen A."
},
{
"family": "Teigen",
"given": "Levi M."
},
{
"family": "Sung",
"given": "Jaeyun"
}
],
"container-title-short": "Front Microbiomes",
"volume": "5",
"page": "1834726",
"DOI": "10.3389/frmbi.2026.1834726",
"PMID": "42529077",
"PMCID": "PMC13416100",
"ISSN": "2813-4338",
"publisher": "Frontiers Media SA",
"URL": "https://doi.org/10.3389/frmbi.2026.1834726",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
15
]
]
}
}

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

Similar papers

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

[1] doi:10.1186/s40168-025-02095-w [code]
Distinct gut microbiome characteristics and dynamics in patients with Parkinson's disease based on the presence of premotor rapid-eye movement sleep behavior disorders.
Journal: Microbiome
In common: pheatmap, reshape2, ggpubr, 2 other tools, sleep disorders, Parkinson's, 7 references
[2] doi:10.1038/s41467-025-56829-3 [code]
Machine learning-based meta-analysis reveals gut microbiome alterations associated with Parkinson's disease.
Journal: Nature communications
In common: easystats, reshape2, ggpubr, 2 other tools, Parkinson's, 4 references
[3] doi:10.1038/s41531-026-01287-x [code]
Faecalibacterium prausnitzii, depleted in the Parkinson's disease microbiome, improves motor deficits in α-synuclein overexpressing mice.
Journal: NPJ Parkinson's disease
In common: pheatmap, reshape2, ggpubr, 1 other tool, Parkinson's, cellular / molecular, 4 references
[4] doi:10.1038/s41531-025-00885-5 [code]
A prebiotic dietary pilot intervention restores faecal metabolites and may be neuroprotective in Parkinson's Disease.
Journal: NPJ Parkinson's disease
In common: pheatmap, reshape2, ggpubr, 2 other tools, Parkinson's, 4 references
[5] doi:10.1080/19490976.2023.2281360 [code]
Gut feelings: the relations between depression, anxiety, psychotropic drugs and the gut microbiome.
Journal: Gut microbes
In common: lmerTest, pheatmap, reshape2, 3 other tools, 3 references
[6] doi:10.1186/s40168-026-02342-8 [code]
Impacts of host genetics on gut microbiome composition in Alzheimer's disease.
Journal: Microbiome
In common: reshape2, ggpubr, ggplot2, 1 other tool, Alzheimer's / dementia, genetics / omics, 5 references
[7] doi:10.1038/s41531-023-00511-2
Gastrointestinal disorders in Parkinson's disease and other Lewy body diseases.
Journal: NPJ Parkinson's disease
In common: Parkinson's, Alzheimer's / dementia, 6 references
[8] doi:10.1093/brain/awae202 [code]
Distinct transcriptional alterations distinguish Lewy body disease from Alzheimer's disease.
Journal: Brain : a journal of neurology
In common: reshape2, ggpubr, ggplot2, 1 other tool, Parkinson's, Alzheimer's / dementia, genetics / omics, 1 other category, 3 references
[9] doi:10.1038/s41467-023-38248-4 [code]
Gut microbiome dysbiosis across early Parkinson's disease, REM sleep behavior disorder and their first-degree relatives.
Journal: Nature communications
In common: ggpubr, ggplot2, tidyverse, sleep disorders, Parkinson's, 3 references
[10] doi:10.1038/s41598-025-17665-z [code]
Gum Arabic modulates the microbiota-gut-brain axis and affects general fitness in zebrafish.
Journal: Scientific reports
In common: easystats, pheatmap, ggpubr, 2 other tools, genetics / omics, cellular / molecular, 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.

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.3389/frmbi.2026.1834726.svg)](https://openscicode.org/badge/doi/10.3389/frmbi.2026.1834726)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.3389/frmbi.2026.1834726.svg
   :target: https://openscicode.org/badge/doi/10.3389/frmbi.2026.1834726
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.3389/frmbi.2026.1834726"><img src="https://openscicode.org/badge/doi/10.3389/frmbi.2026.1834726.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.