OSCR

Mapping the GDF15 arm of the integrated stress response in human cells and tissues.

Code ↔ Paper

23 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.

19 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 23 matches · 1 of them tie a paragraph to a whole file without given lines: a weak match, whose lines are not tinted
  1. [1] § Methods › Tissue groups ↔ ISRGDF15_index/Data Processing Scripts/Tissue_proliferation_index.R, lines 169 to 231 · score 0.87 · skin lower leg, skeletal muscle, breast mammary, salivary gland, suprapubic, brain · block oscr:b:78MS9YM9RPBPM-K · Report a mismatch
  2. [2] § Methods › Tissue groups ↔ ISRGDF15_index/Main Figure Scripts/Figure_4D_4E.R, lines 126 to 180 · score 0.86 · heart atrial appendage, skin lower leg, heart left ventricle, colon, suprapubic, esophageal · block oscr:b:13YP28DY451J6-0 · Report a mismatch
  3. [3] § Methods › The Gene Tissue Expression (GTEx) dataset ↔ ISRGDF15_index/Main Figure Scripts/Helper Scripts/gtex/Attibutes_Phenos_Merged_plus_COD.R, lines 167 to 236 · score 0.86 · heart disease, aortic dissection, probable mi, acute mi, DTHFUCOD, DTHCOD · block oscr:b:DM4PZ5VGAS9EA-F · Report a mismatch
  4. [4] § Methods › The Gene Tissue Expression (GTEx) dataset ↔ ISRGDF15_index/Main Figure Scripts/Helper Scripts/Figure_4D_Base.R, lines 134 to 179 · score 0.79 · small intestines, kidney cortex, ileum, pancreas, spleen, uterus · block oscr:b:690K5V6Y9GJRT-Z · Report a mismatch
  5. [5] § Methods › Senescence and Proliferation Index Scores ↔ ISRGDF15_index/Data/gtex/Age_comparisons/Tissue_Expression_Processing.R, lines 2 to 43 · score 0.77 · CDKN1A, CDKN2A, TOP2A, proliferative genes, CCND2, senescence · block oscr:b:54CACJQKWBZGV-M · Report a mismatch
  6. [6] § Results › Linking cause of death and tissue-specific ISR activation ↔ ISRGDF15_index/Main Figure Scripts/Figure_4B.R, lines 1 to 50 · score 0.76 · brain frontal cortex, heart left ventricle, Emergency Room, hospital inpatient, GDF15 expression, death · block oscr:b:RFEB1RGK6F1DY-2 · Report a mismatch
  7. [7] § Results › Applying the ISRGDF15 index in human tissues ↔ ISRGDF15_index/Data/gtex/Age_comparisons/Tissue_Expression_Processing.R, lines 2 to 43 · score 0.76 · CDKN1A, CDKN2A, TOP2A, tissue expressions, CCND2, MKI67 · block oscr:b:54CACJQKWBZGV-M · Report a mismatch
  8. [8] § Results › Applying the ISRGDF15 index in human tissues ↔ ISRGDF15_index/Data/gtex/Age_comparisons/Age_vs_Chose_Comparison.R, lines 2 to 74 · score 0.75 · CDKN1A, CDKN2A, TOP2A, tissue expressions, CCND2, MKI67 · block oscr:b:91A3JJ04XZ0VJ-G · Report a mismatch
  9. [9] § Methods › Senescence and Proliferation Index Scores ↔ ISRGDF15_index/Data/gtex/Age_comparisons/Age_vs_Chose_Comparison.R, lines 2 to 74 · score 0.70 · CDKN1A, CDKN2A, TOP2A, CCND2, senescence, MKI67 · block oscr:b:91A3JJ04XZ0VJ-G · Report a mismatch
  10. [10] § Results › Linking cause of death and tissue-specific ISR activation ↔ ISRGDF15_index/Main Figure Scripts/Helper Scripts/Figure_3B_4A_Base.R, lines 814 to 889 · score 0.70 · brain frontal cortex, heart left ventricle, Emergency Room, hospital inpatient, Spearman, tissue · block oscr:b:B0SEV5QXZSNJ8-1 · Report a mismatch
  11. [11] § Results › Generating the ISRGDF15 index ↔ ISRGDF15_index/Main Figure Scripts/Figure_1G.R, lines 1 to 73 · score 0.69 · ascending median score, Kruskal Wallis, contact inhibition, Dunn, DEX, Oligo · block oscr:b:3Z87536Z6T57Y-F · Report a mismatch
  12. [12] § Methods › Statistics ↔ ISRGDF15_index/Main Figure Scripts/Figure_1G_HedgesG.R, lines 41 to 114 · score 0.68 · Wilcoxon rank sum, cohen.d, Kruskal, Hedge, BH, Bonferroni · block oscr:b:1TVWW7T5XNA04-P · Report a mismatch
  13. [13] § Methods › ISR gene list compilation ↔ ISRGDF15_index/Main Figure Scripts/Helper Scripts/Fibroblast_lifespan/GO_vs_AnyGenes_vs_JacksonLabs_ListsofGenes.R, the whole file · a weak match · score 0.66 · GO Consortium, Jackson, IRGM, Igtp, ISR gene, NARS · block oscr:b:22EEY0T6D640M-L · Report a mismatch
  14. [14] § Results › Linking cause of death and tissue-specific ISR activation ↔ ISRGDF15_index/Main Figure Scripts/Figure_4D_4E.R, lines 126 to 180 · score 0.66 · atrial appendage, left ventricle, transverse, colon, esophageal, skin · block oscr:b:13YP28DY451J6-0 · Report a mismatch
  15. [15] § Methods › ISR gene list compilation ↔ ISRGDF15_index/Data Processing Scripts/Figure_1A_Process_Data.R, lines 1 to 34 · score 0.63 · GO Consortium, IRGM, Igtp, Jackson, ISR gene, NARS · block oscr:b:ZV01VBCSRSMH2-B · Report a mismatch
  16. [16] § Methods › Statistics ↔ ISRGDF15_index/Main Figure Scripts/Helper Scripts/Figure_4E_Base.R, lines 135 to 220 · score 0.62 · Wilcoxon rank sum, cohen.d, Prism, Hedge · block oscr:b:15ZZG29CWSKQC-I · Report a mismatch
  17. [17] § Results › Generating the ISRGDF15 index ↔ ISRGDF15_index/Main Figure Scripts/Figure_3D.R, lines 242 to 305 · score 0.60 · mitoNUITs, contact inhibition, mutations, oligomycin, DEX, SURF1 · block oscr:b:NRX1F7ZZAJF06-Y · Report a mismatch
  18. [18] § Results › Generating the ISRGDF15 index ↔ ISRGDF15_index/Data Processing Scripts/Figure_1G_Process_Data.R, lines 42 to 88 · score 0.60 · mitoNUITs, contact inhibition, mutations, oligomycin, DEX, SURF1 · block oscr:b:FQ3705PWWAMF9-1 · Report a mismatch
  19. [19] § Results › Generating the ISRGDF15 index ↔ ISRGDF15_index/Main Figure Scripts/Figure_3D.R, lines 242 to 305 · score 0.55 · mitoNUITs, contact inhibition, DG, mutations, oligomycin, DEX · block oscr:b:NRX1F7ZZAJF06-Y · Report a mismatch
  20. [20] § Results › Experimental validation of the ISRGDF15 index ↔ ISRGDF15_index/Main Figure Scripts/Helper Scripts/Figure_2F_Base.R, lines 425 to 476 · score 0.55 · dimerizable PERK, arsenite, thapsigargin, untreated, parental, UT · block oscr:b:NJAMDY7Z9QFKF-E · Report a mismatch
  21. [21] § Results › Experimental validation of the ISRGDF15 index ↔ ISRGDF15_index/Main Figure Scripts/Figure_2F.R, lines 54 to 116 · score 0.53 · dimerizable PERK, arsenite, thapsigargin, untreated, parental, UT · block oscr:b:6082SNYGQ9ES8-H · Report a mismatch
  22. [22] § Results › Linking cause of death and tissue-specific ISR activation ↔ ISRGDF15_index/Main Figure Scripts/Helper Scripts/Figure_4D_Base.R, lines 1 to 48 · score 0.52 · median proliferation score, Proliferative tissues, deathplace, split, ISR · block oscr:b:QAD24HAP5HYK0-R · Report a mismatch
  23. [23] § Results › Linking cause of death and tissue-specific ISR activation ↔ ISRGDF15_index/Main Figure Scripts/Figure_4B.R, lines 139 to 234 · score 0.51 · emergency room, hospital inpatient, HI, death, tissue, score · block oscr:b:V55M59HXHZ4P2-L · 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 · 519 lines · 22 KB · no license · 2 matches

  1. # ============================================================================
  2. # Figures 4D & 4E: Journal-Compliant Dot Plots with Individual Donor Points
  3. # Journal requirement: show individual data points behind tissue-level summaries
  4. # ============================================================================
  5. # Generates FOUR plots (two tissue sets × two analytes):
  6. # [ISR] Figure_4D_4E_ISR_all_tissues.png
  7. # [ISR sig] Figure_4D_4E_ISR_significant_tissues.png
  8. # [Proliferation] Figure_4D_4E_Proliferation_all_tissues.png
  9. # [Prolif sig] Figure_4D_4E_Proliferation_significant_tissues.png
  10. #
  11. # ISR (Factor1) scores come from All_Tissue_data_DTHPLCE.csv (per-donor).
  12. # Proliferation scores (sum of MKI67 + RRM2 + TOP2A TPM per donor) are
  13. # computed on first run from the GTEx TPM file, then cached to:
  14. # Data/gtex/Processed/proliferation_per_donor.csv
  15. #
  16. # X-axis: tissues, ordered by descending mean score (each plot uses its own metric)
  17. # Dots: individual donors, translucent and jittered
  18. # Line: crossbar at tissue mean, opaque
  19. # ============================================================================
  20. library(here)
  21. library(tidyverse)
  22. library(ggplot2)
  23. library(purrr)
  24. # ============================================================================
  25. # SOURCE FIGURE 4D SCRIPT TO GET data_sig (significant tissues)
  26. # ============================================================================
  27. message("\n=== Sourcing Figure 4D script to get data_sig ===")
  28. source(here("Main Figure Scripts", "Helper Scripts", "Figure_4D_Base.R"), local = TRUE)
  29. # Re-define output directory AFTER sourcing (source script clears environment)
  30. out_dir <- here("Results", "Figures", "Figure_4D_4E")
  31. if (!dir.exists(out_dir)) dir.create(out_dir, recursive = TRUE)
  32. # data_sig: tissue-level summary with Tissue, Avg_Factor1, proliferation_score,
  33. # Significant, deathplace_comparison, Proliferative_Group
  34. # Standardise tissue names to lowercase
  35. data_sig <- data_sig %>% mutate(Tissue = tolower(Tissue))
  36. sig_tissues <- unique(data_sig$Tissue)
  37. message("Significant tissues in data_sig: ", length(sig_tissues))
  38. # ============================================================================
  39. # LOAD PER-DONOR ISR (FACTOR1) SCORES
  40. # ============================================================================
  41. # Build the per-donor / per-tissue long-format dataframe by reading the
  42. # per-tissue Plot_Data_<tissue>.csv files written by
  43. # Figure_3B_4A_Tissue_Scatter.R. Helper applies NO DTHPLCE filtering; this
  44. # script's main donor_isr below uses every donor (no DTHPLCE restriction),
  45. # while the supplemental Figure 4E DTHPLCE breakdown filters internally.
  46. message("\n=== Loading per-donor ISR scores ===")
  47. source(here("Main Figure Scripts", "Helper Scripts",
  48. "Load_All_Tissue_DTHPLCE.R"))
  49. all_tissue_data <- load_all_tissue_dthplce()
  50. donor_isr <- all_tissue_data %>%
  51. filter(fa_vs_gdf15 == "Factor1") %>%
  52. select(SAMPID, Tissue, value) %>%
  53. rename(score = value) %>%
  54. mutate(Tissue = tolower(Tissue))
  55. message("Per-donor ISR rows loaded: ", nrow(donor_isr))
  56. message("Unique tissues in ISR data: ", n_distinct(donor_isr$Tissue))
  57. # ============================================================================
  58. # LOAD OR COMPUTE PER-DONOR PROLIFERATION SCORES
  59. # Cached after first run to avoid re-reading the 2.5 GB GTEx TPM file.
  60. # ============================================================================
  61. per_donor_prolif_file <- here("Data", "gtex", "Processed", "proliferation_per_donor.csv")
  62. if (file.exists(per_donor_prolif_file)) {
  63. message("\n=== Loading cached per-donor proliferation scores ===")
  64. donor_prolif <- read.csv(per_donor_prolif_file)
  65. message("Rows loaded: ", nrow(donor_prolif))
  66. # Info: raw sums of 0 will become -Inf after log2 at plot time.
  67. n_zero <- sum(donor_prolif$avg_prolif == 0, na.rm = TRUE)
  68. if (n_zero > 0) {
  69. message(" Note: ", n_zero, " samples have raw sum = 0 (all 3 genes = 0 TPM)")
  70. }
  71. } else {
  72. message("\n=== Computing per-donor proliferation scores from GTEx TPM ===")
  73. message(" (This only runs once; results are cached for future use)")
  74. gtex_tpm_file <- here("Data", "gtex", "GTEx_Analysis_2017-06-05_v8_RNASeQCv1.1.9_gene_tpm.gct.gz")
  75. annotations_file <- here("Data", "gtex", "Insert_GTEx_SampleAttributes_and_SubjectPhenotypes_Here",
  76. "GTEx_Analysis_2017-06-05_v8_Annotations_GTEx_Analysis_2017-06-05_v8_Annotations_SampleAttributesDS.tsv")
  77. if (!file.exists(gtex_tpm_file)) {
  78. stop(paste0(
  79. "\n============================================================\n",
  80. "ERROR: GTEx TPM file not found.\n",
  81. "Expected: ", gtex_tpm_file, "\n",
  82. "Per-donor proliferation scores cannot be computed without it.\n",
  83. "============================================================\n"
  84. ))
  85. }
  86. if (!file.exists(annotations_file)) {
  87. stop(paste0(
  88. "\n============================================================\n",
  89. "ERROR: GTEx sample annotations file not found.\n",
  90. "Expected: ", annotations_file, "\n",
  91. "============================================================\n"
  92. ))
  93. }
  94. message(" Reading GTEx TPM file (may take several minutes)...")
  95. gtex <- read.delim(gtex_tpm_file, skip = 2)
  96. exprs <- gtex %>%
  97. dplyr::select(-Name) %>%
  98. rename(Gene = Description)
  99. message(" Filtering to proliferation genes: MKI67, RRM2, TOP2A ...")
  100. exprs_prolif_genes <- exprs %>%
  101. as.data.frame() %>%
  102. filter(Gene %in% c("MKI67", "RRM2", "TOP2A"))
  103. if (nrow(exprs_prolif_genes) < 3) {
  104. stop("ERROR: Fewer than 3 proliferation genes found in GTEx TPM file.")
  105. }
  106. # Transpose: samples as rows, genes as columns
  107. exprs_prolif_t <- exprs_prolif_genes %>%
  108. column_to_rownames("Gene") %>%
  109. t() %>%
  110. as.data.frame() %>%
  111. rownames_to_column("X")
  112. # Sum raw TPM of 3 genes per sample (NO log2 — raw sums cached; log2 at plot time)
  113. exprs_prolif_summed <- exprs_prolif_t %>%
  114. pivot_longer(cols = c("MKI67", "RRM2", "TOP2A"), names_to = "Gene", values_to = "TPM") %>%
  115. group_by(X) %>%
  116. summarise(sum_TPM = sum(TPM, na.rm = TRUE), .groups = "drop") %>%
  117. mutate(avg_prolif = sum_TPM)
  118. # Load sample annotations
  119. message(" Reading sample annotations...")
  120. ann <- read_tsv(annotations_file, show_col_types = FALSE) %>%
  121. filter(SMAFRZE == "RNASEQ") %>%
  122. mutate(SUBJID = substring(SAMPID, 1, 10)) %>%
  123. mutate(SUBJID = case_when(
  124. substr(SUBJID, nchar(SUBJID), nchar(SUBJID)) == "-" ~ substr(SUBJID, 1, nchar(SUBJID) - 1),
  125. TRUE ~ SUBJID
  126. ))
  127. # Normalise SAMPID format to match TPM column names
  128. ann <- ann %>%
  129. mutate(X = gsub("\\-", ".", SAMPID)) %>%
  130. select(X, SMTSD, SUBJID, SMRIN)
  131. # Join and apply RIN filter (matching Tissue_proliferation_index.R)
  132. donor_prolif_long <- exprs_prolif_summed %>%
  133. inner_join(ann, by = "X") %>%
  134. filter(SMRIN >= 5.5) %>%
  135. select(SAMPID = X, SUBJID, Tissue_raw = SMTSD, avg_prolif) %>%
  136. distinct()
  137. # Standardise tissue names (same transformations as Tissue_proliferation_index.R)
  138. donor_prolif_long <- donor_prolif_long %>%
  139. mutate(Tissue = gsub(" - ", "_", Tissue_raw)) %>%
  140. mutate(Tissue = gsub(" ", "_", Tissue)) %>%
  141. mutate(Tissue = gsub("-", "_", Tissue)) %>%
  142. mutate(Tissue = gsub("\\(", "", Tissue)) %>%
  143. mutate(Tissue = gsub("\\)", "", Tissue)) %>%
  144. mutate(Tissue = tolower(Tissue)) %>%
  145. mutate(Tissue = case_when(
  146. Tissue == "brain_frontal_cortex_ba9" ~ "brain_frontal_cortex",
  147. Tissue == "skin_sun_exposed_lower_leg" ~ "skin_lower_leg",
  148. Tissue == "skin_not_sun_exposed_suprapubic" ~ "skin_suprapubic",
  149. Tissue == "colon_sigmoid" ~ "colon_sigmoid",
  150. Tissue == "colon_transverse" ~ "colon_transverse",
  151. Tissue == "esophagus_gastroesophageal_junction" ~ "esophagus_gej",
  152. Tissue == "heart_left_ventricle" ~ "heart_left_ventricle",
  153. Tissue == "heart_atrial_appendage" ~ "heart_atrial_appendage",
  154. TRUE ~ Tissue
  155. ))
  156. # Cache per-donor proliferation scores (RAW sums, not log2).
  157. # log2 is applied at plot time.
  158. donor_prolif <- donor_prolif_long %>%
  159. select(SAMPID, Tissue, avg_prolif)
  160. # Cache for future runs
  161. write.csv(donor_prolif, per_donor_prolif_file, row.names = FALSE)
  162. message(" Cached per-donor proliferation scores to: ", per_donor_prolif_file)
  163. message(" Rows cached: ", nrow(donor_prolif))
  164. }
  165. # ============================================================================
  166. # HARMONISE PROLIFERATION TISSUE NAMES TO MATCH data_sig
  167. # The cached proliferation_per_donor.csv uses GTEx annotation names which
  168. # differ from the ISR analysis names for several tissues.
  169. # ============================================================================
  170. donor_prolif <- donor_prolif %>%
  171. mutate(Tissue = tolower(Tissue)) %>%
  172. mutate(Tissue = case_when(
  173. Tissue == "brain_nucleus_accumbens_basal_ganglia" ~ "brain_nucelus_accumbens_basal_ganglia",
  174. Tissue == "brain_spinal_cord_cervical_c_1" ~ "brain_spinal_cord_cervical_c1",
  175. Tissue == "breast_mammary_tissue" ~ "breast_mammary",
  176. Tissue == "esophagus_gej" ~ "esophagus_gastroesophageal_junction",
  177. Tissue == "esophagus_gastroesophageal_junction" ~ "esophagus_gastroesophageal_junction",
  178. Tissue == "minor_salivary_gland" ~ "salivary_gland",
  179. Tissue == "muscle_skeletal" ~ "skeletal_muscle",
  180. TRUE ~ Tissue
  181. ))
  182. # Verify matching
  183. prolif_tissues_available <- unique(donor_prolif$Tissue)
  184. missing_from_prolif <- setdiff(sig_tissues, prolif_tissues_available)
  185. if (length(missing_from_prolif) > 0) {
  186. message("WARNING: ", length(missing_from_prolif), " significant tissues still missing from proliferation data:")
  187. message(paste(" -", missing_from_prolif, collapse = "\n"))
  188. } else {
  189. message("All ", length(sig_tissues), " significant tissues found in proliferation data.")
  190. }
  191. # ============================================================================
  192. # BUILD TISSUE-LEVEL SUMMARY TABLES (mean per tissue)
  193. # For ordering and crossbar reference
  194. # ============================================================================
  195. tissue_means_isr <- donor_isr %>%
  196. group_by(Tissue) %>%
  197. summarise(mean_score = mean(score, na.rm = TRUE), .groups = "drop")
  198. # Tissue mean for proliferation: avg_prolif contains RAW sums.
  199. # Average raw sums across donors, then apply log2.
  200. tissue_means_prolif <- donor_prolif %>%
  201. group_by(Tissue) %>%
  202. summarise(mean_score = log2(mean(avg_prolif, na.rm = TRUE)), .groups = "drop")
  203. # Per-donor display scores: apply log2 to raw sums for plotting.
  204. # Filter out zero-sum samples (log2(0) = -Inf) to avoid axis issues.
  205. donor_prolif_plot <- donor_prolif %>%
  206. filter(avg_prolif > 0) %>%
  207. mutate(score = log2(avg_prolif))
  208. # ============================================================================
  209. # PLOTTING HELPER
  210. # ============================================================================
  211. make_dot_plot <- function(donor_data, # data.frame: SAMPID, Tissue, score
  212. tissue_means, # data.frame: Tissue, mean_score
  213. title,
  214. ylab_text,
  215. dot_color,
  216. mean_color,
  217. tissues_to_include, # character vector of tissue names (lowercase)
  218. order_by = "desc",
  219. show_mean = TRUE) {
  220. # Restrict to requested tissues
  221. donor_sub <- donor_data %>% filter(Tissue %in% tissues_to_include)
  222. means_sub <- tissue_means %>% filter(Tissue %in% tissues_to_include)
  223. if (nrow(donor_sub) == 0 || nrow(means_sub) == 0) {
  224. warning("No data found for the requested tissues in: ", title)
  225. return(NULL)
  226. }
  227. # Compute y-axis limits from data with 10% padding
  228. y_range <- range(donor_sub$score, na.rm = TRUE)
  229. y_pad <- diff(y_range) * 0.1
  230. y_lim <- c(y_range[1] - y_pad, y_range[2] + y_pad)
  231. # Order tissues by descending mean score
  232. tissue_order <- means_sub %>%
  233. arrange(desc(mean_score)) %>%
  234. pull(Tissue)
  235. donor_sub <- donor_sub %>%
  236. mutate(Tissue = factor(Tissue, levels = tissue_order))
  237. means_sub <- means_sub %>%
  238. mutate(Tissue = factor(Tissue, levels = tissue_order))
  239. p <- ggplot() +
  240. # Individual donor dots — translucent, jittered
  241. geom_jitter(
  242. data = donor_sub,
  243. aes(x = Tissue, y = score),
  244. color = dot_color, alpha = 0.25, size = 1.8,
  245. width = 0.22, height = 0
  246. )
  247. # Optionally add tissue mean crossbar
  248. if (show_mean) {
  249. p <- p +
  250. geom_crossbar(
  251. data = means_sub,
  252. aes(x = Tissue, y = mean_score, ymin = mean_score, ymax = mean_score),
  253. color = mean_color, width = 0.55, linewidth = 0.7
  254. )
  255. }
  256. p <- p +
  257. scale_y_continuous(limits = y_lim, expand = c(0, 0)) +
  258. scale_x_discrete(expand = expansion(add = 0.6)) +
  259. labs(title = title, x = "Tissue", y = ylab_text) +
  260. theme_minimal(base_size = 14) +
  261. theme(
  262. plot.title = element_text(face = "bold"),
  263. axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1, colour = "black"),
  264. axis.text.y = element_text(colour = "black"),
  265. axis.title = element_text(colour = "black"),
  266. panel.grid.major.x = element_blank(),
  267. panel.grid.minor = element_blank(),
  268. panel.grid.major.y = element_line(colour = "grey92"),
  269. plot.margin = margin(t = 10, r = 20, b = 5.5, l = 15)
  270. )
  271. return(p)
  272. }
  273. # ============================================================================
  274. # FIGURE 4E + SUPPLEMENTAL FIGURE 8
  275. # ============================================================================
  276. # Both plots are computed on `data_sig` (significant tissues only — built by
  277. # Figure_4D_Base.R after the median-proliferation split). Each is a
  278. # two-group dot plot of Avg_Factor1 (per-tissue ISR^GDF15 score):
  279. #
  280. # Figure 4E — split by deathplace_comparison
  281. # (which side of the H/E comparison the tissue fell on)
  282. # Supplemental Fig 8 — split by Proliferative_Group
  283. # (above vs below median proliferation_score)
  284. #
  285. # Two CSVs (Prism wide format, no tissue labels) and two PNGs are written
  286. # to Results/Figures/Figure_4D_4E/. Figure_4E.png is also copied to the
  287. # shared Results/Figures/ folder; Supplemental_Fig8.png is not.
  288. # ============================================================================
  289. message("\n=== Generating Figure 4E + Supplemental Figure 8 ===")
  290. # --- Helper: build a Prism-style wide CSV (one column per group, no labels) ---
  291. prism_wide <- function(df, group_col, value_col, group_levels, col_names) {
  292. out <- lapply(group_levels, function(g) df[[value_col]][df[[group_col]] == g])
  293. n <- max(lengths(out))
  294. out <- lapply(out, function(x) c(x, rep(NA_real_, n - length(x))))
  295. result <- as.data.frame(out, stringsAsFactors = FALSE)
  296. colnames(result) <- col_names
  297. result
  298. }
  299. # --- Helper: two-group dot plot in the reference-image style ---
  300. two_group_dot_plot <- function(df, group_col, value_col,
  301. group_levels, group_labels, group_colors,
  302. title_text, y_lab) {
  303. df_local <- df %>%
  304. filter(.data[[group_col]] %in% group_levels) %>%
  305. mutate(.grp = factor(.data[[group_col]],
  306. levels = group_levels,
  307. labels = group_labels))
  308. # Wilcoxon p + Hedges g
  309. # Sign convention: cohen.d returns positive when level-1's mean exceeds
  310. # level-2's. We display |g| on the plot (direction is visually obvious),
  311. # and print the full-precision signed value to the console so the
  312. # caller can sanity-check the magnitude.
  313. vals <- split(df_local[[value_col]], df_local[[group_col]])
  314. v1 <- vals[[group_levels[1]]]
  315. v2 <- vals[[group_levels[2]]]
  316. wilcox_p <- tryCatch(
  317. wilcox.test(v1, v2)$p.value,
  318. error = function(e) NA_real_
  319. )
  320. hedges <- tryCatch(
  321. effsize::cohen.d(df_local[[value_col]],
  322. factor(df_local[[group_col]], levels = group_levels),
  323. hedges.correction = TRUE)$estimate,
  324. error = function(e) NA_real_
  325. )
  326. hedges_g <- unname(hedges)
  327. # ---- Console diagnostics: full-precision summary so 1.00 displayed on
  328. # ---- the plot can be checked against the underlying value.
  329. message(" -- ", group_col, " --")
  330. message(" n(", group_levels[1], ") = ", length(v1),
  331. ", mean = ", signif(mean(v1, na.rm = TRUE), 5),
  332. ", median = ", signif(median(v1, na.rm = TRUE), 5))
  333. message(" n(", group_levels[2], ") = ", length(v2),
  334. ", mean = ", signif(mean(v2, na.rm = TRUE), 5),
  335. ", median = ", signif(median(v2, na.rm = TRUE), 5))
  336. message(" Wilcoxon p (raw) = ", signif(wilcox_p, 6))
  337. message(" Hedges g (signed, level1 - level2) = ",
  338. signif(hedges_g, 6))
  339. message(" |Hedges g| (plot label) = ", signif(abs(hedges_g), 6))
  340. p_label <- ifelse(is.na(wilcox_p), "ns",
  341. ifelse(wilcox_p < 0.0001, "****",
  342. ifelse(wilcox_p < 0.001, "***",
  343. ifelse(wilcox_p < 0.01, "**",
  344. ifelse(wilcox_p < 0.05, "*", "ns")))))
  345. # Display with 3 decimals so a true 0.987 / 1.013 isn't masked as "1.00".
  346. g_label <- if (!is.na(hedges_g)) {
  347. paste0("g = ", format(round(abs(hedges_g), 3), nsmall = 3))
  348. } else "g = NA"
  349. y_max <- max(df_local[[value_col]], na.rm = TRUE)
  350. y_min <- min(df_local[[value_col]], na.rm = TRUE)
  351. y_pad <- (y_max - y_min) * 0.18
  352. ggplot(df_local, aes(x = .grp, y = .data[[value_col]], color = .grp)) +
  353. geom_jitter(width = 0.15, height = 0, size = 4, alpha = 0.85) +
  354. stat_summary(fun = median, geom = "crossbar",
  355. width = 0.55, linewidth = 0.6, fatten = 1.5) +
  356. # Significance bracket + stars + g annotation, stacked above data
  357. annotate("segment",
  358. x = 1, xend = 2,
  359. y = y_max + y_pad * 0.7, yend = y_max + y_pad * 0.7,
  360. color = "black", linewidth = 0.5) +
  361. annotate("text",
  362. x = 1.5, y = y_max + y_pad * 1.1,
  363. label = p_label,
  364. size = 8, fontface = "bold") +
  365. annotate("text",
  366. x = 1.5, y = y_max + y_pad * 0.4,
  367. label = g_label,
  368. size = 5) +
  369. scale_color_manual(values = setNames(group_colors, group_labels),
  370. guide = "none") +
  371. scale_y_continuous(expand = expansion(mult = c(0.05, 0.18))) +
  372. labs(title = title_text, x = NULL, y = y_lab) +
  373. theme_classic(base_size = 14) +
  374. theme(
  375. plot.title = element_text(face = "bold", hjust = 0.5,
  376. margin = margin(b = 10)),
  377. axis.text = element_text(color = "black"),
  378. axis.title = element_text(color = "black")
  379. )
  380. }
  381. # ---------------------------------------------------------------------------
  382. # Figure 4E: proliferation_score split by deathplace_comparison
  383. # (Matches the Prism reference image with g = 1.17.)
  384. # ---------------------------------------------------------------------------
  385. fig4e_levels <- c("ER>HI", "HI>ER")
  386. fig4e_labels <- c("ER > HI", "HI > ER")
  387. fig4e_colors <- c("#A04C7A", "#E89B3C") # magenta-pink, orange
  388. # CSV (Prism wide)
  389. fig4e_csv <- prism_wide(
  390. df = data_sig %>% filter(deathplace_comparison %in% fig4e_levels),
  391. group_col = "deathplace_comparison",
  392. value_col = "proliferation_score",
  393. group_levels = fig4e_levels,
  394. col_names = c("ER_greater_than_HI", "HI_greater_than_ER")
  395. )
  396. fig4e_csv_path <- file.path(out_dir, "4E_for_prism.csv")
  397. write.csv(fig4e_csv, fig4e_csv_path, row.names = FALSE, na = "")
  398. message(" Saved: ", fig4e_csv_path)
  399. # Plot
  400. fig4e_plot <- two_group_dot_plot(
  401. df = data_sig,
  402. group_col = "deathplace_comparison",
  403. value_col = "proliferation_score",
  404. group_levels = fig4e_levels,
  405. group_labels = fig4e_labels,
  406. group_colors = fig4e_colors,
  407. title_text = "Proliferation scores by place of death",
  408. y_lab = "Proliferation score (log2)"
  409. )
  410. fig4e_png <- file.path(shared_out_dir, "Figure_4E.png")
  411. ggsave(fig4e_png, plot = fig4e_plot, width = 5, height = 6, dpi = 300)
  412. message(" Saved: ", fig4e_png)
  413. # ---------------------------------------------------------------------------
  414. # Supplemental Figure 8: Avg_Factor1 split by Proliferative_Group
  415. # ---------------------------------------------------------------------------
  416. suppfig8_levels <- c("Proliferative", "Non-Proliferative")
  417. suppfig8_labels <- c("Proliferative", "Non-\nproliferative")
  418. suppfig8_colors <- c("#A878B7", "#4D7BB7") # purple, blue
  419. suppfig8_csv <- prism_wide(
  420. df = data_sig %>% filter(Proliferative_Group %in% suppfig8_levels),
  421. group_col = "Proliferative_Group",
  422. value_col = "Avg_Factor1",
  423. group_levels = suppfig8_levels,
  424. col_names = c("Proliferative", "Non_proliferative")
  425. )
  426. suppfig8_csv_path <- file.path(out_dir, "Supplemental_Fig8.csv")
  427. write.csv(suppfig8_csv, suppfig8_csv_path, row.names = FALSE, na = "")
  428. message(" Saved: ", suppfig8_csv_path)
  429. suppfig8_plot <- two_group_dot_plot(
  430. df = data_sig,
  431. group_col = "Proliferative_Group",
  432. value_col = "Avg_Factor1",
  433. group_levels = suppfig8_levels,
  434. group_labels = suppfig8_labels,
  435. group_colors = suppfig8_colors,
  436. title_text = expression(bold("ISR"^"GDF15" ~
  437. "scores based on proliferation score")),
  438. y_lab = expression("ISR"^"GDF15" ~ "Score")
  439. )
  440. suppfig8_png <- file.path(out_dir, "Supplemental_Fig8.png")
  441. ggsave(suppfig8_png, plot = suppfig8_plot, width = 5, height = 6, dpi = 300)
  442. message(" Saved: ", suppfig8_png)
  443. # (Supplemental_Fig8.png is intentionally NOT copied to Results/Figures/.)
  444. # ============================================================================
  445. # SUMMARY
  446. # ============================================================================
  447. message(paste0("\n", strrep("=", 65)))
  448. message("FIGURES 4D & 4E — JOURNAL-COMPLIANT DOT PLOTS COMPLETE")
  449. message(strrep("=", 65))
  450. message("\nOutput folder: ", out_dir)
  451. message(" ", per_donor_prolif_file)
  452. message("\nFigure 4E + Supplemental Figure 8 outputs:")
  453. message(" ", fig4e_csv_path)
  454. message(" ", fig4e_png)
  455. message(" ", suppfig8_csv_path)
  456. message(" ", suppfig8_png)
  457. message(strrep("=", 65))

Figure_4D_4E.R at commit 0cb4c55, no license · at the source

Overview

Authors: Janell L. M. Smith1, Kamaryn T. Tanner2, Jack Devine1, Anna S. Monzel1, Taivan Batjargal3, Maxwell Z. Wilson3, Alan A. Cohen2,4, Martin Picard1,2,5,6
  1. Department of Psychiatry, Division of Behavioral Medicine, Columbia University Irving Medical Center,New York, NY USA
  2. Robert N Butler Columbia Aging Center, Mailman School of Public Health,New York, NY USA
  3. Biomolecular Science and Engineering Program, University of California Santa Barbara,Santa Barbara, CA USA
  4. Department of Environmental Health Sciences, Mailman School of Public Health,New York, NY USA
  5. Department of Neurology, H. Houston Merritt Center for Neurological and Mitochondrial Disorders, Columbia University Irving Medical Center,New York, NY USA
  6. New York State Psychiatric Institute,New York, NY USA
Journal: Communications biology, volume 9, issue 1, article 1126
Dates: received 21 July 2025; accepted 11 May 2026; published online 27 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s42003-026-10312-x · PMID 42203840 · PMCID PMC13493765 · OpenAlex W4407057049
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: genetics / omics (modality), human (organism), cellular / molecular (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, Connectivity
Keywords: Stress signalling, Gene expression profiling, Bioinformatics, Mitochondria
MeSH: Growth Differentiation Factor 15*, Integrated Stress Response*, Fibroblasts, Humans, Mitochondria (* major topic)
Topic: GDF15 and Related Biomarkers (Cardiology and Cardiovascular Medicine, Medicine), according to OpenAlex
Citations: cited by 4 papers (Europe PMC); 37 references in the paper

Abstract

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

Repositories

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

mitopsychobio/2025_ISR_GDF15_JS_v2

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 0cb4c5556dca7ae365f8608dcec76d7fa9df50e7, 6 May 2026
Languages: R (34)
Size: 55 files, 34 scripts
Software Heritage: not archived
Found in: “Code availability”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (30 files), ggplot2 (21 files), ggpubr (16 files), circlize (13 files), edgeR (13 files), ComplexHeatmap (11 files), Plotly (2 files), psych (2 files), broom (1 file), data.table (1 file), limma (1 file), pheatmap (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
35 files

Zenodo 20057240

License: CC-BY-4.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (30 files), ggplot2 (21 files), ggpubr (16 files), circlize (13 files), edgeR (13 files), ComplexHeatmap (11 files), Plotly (2 files), psych (2 files), broom (1 file), data.table (1 file), limma (1 file), pheatmap (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
35 files
At the source:

Code availability statement

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

Read it in the paper: doi.org/10.1038/s42003-026-10312-x.

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;
  • 68 scripts, each with its path and the digest of its content;
  • 23 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 statement

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

  • it says that the data are available on request

Read it in the paper: doi.org/10.1038/s42003-026-10312-x.

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, 28 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 4 keywords, 5 MeSH terms, 4 funders, 28 references.

Cite

This paper

Smith, J. L. M., Tanner, K. T., Devine, J., Monzel, A. S., Batjargal, T., Wilson, M. Z., Cohen, A. A., & Picard, M. (2026). Mapping the GDF15 arm of the integrated stress response in human cells and tissues. Communications biology, 9(1), 1126. https://doi.org/10.1038/s42003-026-10312-x

BibTeX

@article{smith2026mapping,
author = {Smith, Janell L. M. and Tanner, Kamaryn T. and Devine, Jack and Monzel, Anna S. and Batjargal, Taivan and Wilson, Maxwell Z. and Cohen, Alan A. and Picard, Martin},
title = {{Mapping the GDF15 arm of the integrated stress response in human cells and tissues}},
journal = {Communications biology},
year = {2026},
month = may,
volume = {9},
number = {1},
pages = {1126},
publisher = {Nature Publishing Group},
issn = {2399-3642},
doi = {10.1038/s42003-026-10312-x},
url = {https://doi.org/10.1038/s42003-026-10312-x},
pmid = {42203840},
pmcid = {PMC13493765}
}

RIS

TY - JOUR
AU - Smith, Janell L. M.
AU - Tanner, Kamaryn T.
AU - Devine, Jack
AU - Monzel, Anna S.
AU - Batjargal, Taivan
AU - Wilson, Maxwell Z.
AU - Cohen, Alan A.
AU - Picard, Martin
TI - Mapping the GDF15 arm of the integrated stress response in human cells and tissues
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/05/27
VL - 9
IS - 1
SP - 1126
SN - 2399-3642
PB - Nature Publishing Group
DO - 10.1038/s42003-026-10312-x
UR - https://doi.org/10.1038/s42003-026-10312-x
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s42003-026-10312-x",
"type": "article-journal",
"title": "Mapping the GDF15 arm of the integrated stress response in human cells and tissues",
"container-title": "Communications biology",
"author": [
{
"family": "Smith",
"given": "Janell L. M."
},
{
"family": "Tanner",
"given": "Kamaryn T."
},
{
"family": "Devine",
"given": "Jack"
},
{
"family": "Monzel",
"given": "Anna S."
},
{
"family": "Batjargal",
"given": "Taivan"
},
{
"family": "Wilson",
"given": "Maxwell Z."
},
{
"family": "Cohen",
"given": "Alan A."
},
{
"family": "Picard",
"given": "Martin"
}
],
"container-title-short": "Commun Biol",
"volume": "9",
"issue": "1",
"page": "1126",
"DOI": "10.1038/s42003-026-10312-x",
"PMID": "42203840",
"PMCID": "PMC13493765",
"ISSN": "2399-3642",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s42003-026-10312-x",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
27
]
]
}
}

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

Similar papers

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

[1] doi:10.1093/lifemeta/loaf012 [code]
Brain-body mitochondrial distribution patterns lack coherence and point to tissue-specific regulatory mechanisms.
Journal: Life metabolism
In common: genetics / omics, cellular / molecular, 5 references, 2 authors
[2] doi:10.1093/bioinformatics/btag592 [code]
Network-based stratification of allele-specific expression reveals patient subgroups in Huntington's disease.
Journal: Bioinformatics (Oxford, England)
In common: edgeR, broom, limma, 8 other tools, genetics / omics, 1 reference
[3] doi:10.1186/s13059-025-03552-3 [code]
Benchmark of cellular deconvolution methods using a multi-assay dataset from postmortem human prefrontal cortex.
Journal: Genome biology
In common: edgeR, broom, limma, 8 other tools, genetics / omics, 1 reference
[4] doi:10.1212/nxg.0000000000200343 [code]
Immune Cell Mitochondrial Phenotypes Are Largely Preserved in Mitochondrial Diseases and Do Not Reflect Disease Severity.
Journal: Neurology. Genetics
In common: Plotly, tidyverse, cellular / molecular, 1 reference, 2 authors
[5] doi:10.1371/journal.pbio.3002723 [code]
Somatic nuclear mitochondrial DNA insertions are prevalent in the human brain and accumulate over time in fibroblasts.
Journal: PLoS biology
In common: circlize, ComplexHeatmap, ggpubr, 2 other tools, cellular / molecular, 2 references, author Martin Picard
[6] doi:10.1038/s42003-025-09115-3 [code]
Characterizing and decoding ultraconserved regions uncovers their regulatory significance in human brain development and disorders.
Journal: Communications biology
In common: edgeR, limma, circlize, 6 other tools, cellular / molecular, 1 reference
[7] doi:10.3390/cancers17071239 [code]
Evaluating the Potential of PSMA Targeting in CNS Tumors: Insights from Large-Scale Transcriptome Profiling.
Journal: Cancers
In common: edgeR, broom, circlize, 6 other tools, genetics / omics, 1 reference
[8] doi:10.7554/elife.102578 [code]
Joint profiling of cell morphology and gene expression during in vitro neurodevelopment.
Journal: eLife
In common: edgeR, circlize, ComplexHeatmap, 6 other tools, genetics / omics, 1 reference
[9] doi:10.1186/s12967-026-08266-z [code]
Single-cell multi-omic integration analysis prioritizes druggable genes and reveals cell-type-specific causal effects in glioblastomagenesis.
Journal: Journal of translational medicine
In common: edgeR, limma, circlize, 5 other tools, genetics / omics, cellular / molecular, 1 reference
[10] doi:10.1172/jci.insight.207270 [code]
Progressive hypothalamic neuroinflammation in ovariectomized mice parallels aging-related transcriptomic changes in the female human hypothalamus.
Journal: JCI insight
In common: limma, circlize, ComplexHeatmap, 5 other tools, genetics / omics, cellular / molecular, 1 reference

Contribute

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

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

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.1038/s42003-026-10312-x.svg)](https://openscicode.org/badge/doi/10.1038/s42003-026-10312-x)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1038/s42003-026-10312-x.svg
   :target: https://openscicode.org/badge/doi/10.1038/s42003-026-10312-x
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s42003-026-10312-x"><img src="https://openscicode.org/badge/doi/10.1038/s42003-026-10312-x.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

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.