OSCR

Ischemic stroke triggers brain-wide synaptic remodeling within four hours.

Code ↔ Paper

1 match 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 1 match
  1. [1] § Methods › Quantification and statistical analysis › Statistic analysis of proteomic and transcriptomic data. ↔ Dream_Synaptosome_DE_code.R, lines 43–91 · score 0.76 · linear mixed models, Rattus norvegicus, Salmon, Dream, variancePartition, gene

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 · 1,237 lines · 53 KB · CC-BY-4.0 · 1 match

  1. library(tximeta)
  2. library(DESeq2)
  3. library(tidyverse)
  4. library(readr)
  5. library(apeglm)
  6. library(ashr)
  7. library (EnhancedVolcano)
  8. library(gprofiler2)
  9. library(dplyr)
  10. library(IHW)
  11. library("variancePartition")
  12. library(edgeR)
  13. library(tximport)
  14. library(patchwork)
  15. library(cowplot)
  16. ################################################################################
  17. #################################################################### Synaptosome
  18. pathSyn <- "/BMK_DATA_20230515093157_1_synaptosome/transcripts_quant"
  19. directoryIDSyn <- c("BE096-02T0001_good_quant", "BE096-02T0002_good_quant", "BE096-02T0003_good_quant",
  20. "BE096-02T0004_good_quant", "BE096-02T0005_good_quant", "BE096-02T0006_good_quant",
  21. "BE096-02T0007_good_quant", "BE096-02T0008_good_quant", "BE096-02T0009_good_quant",
  22. "BE096-02T0010_good_quant", "BE096-02T0011_good_quant", "BE096-02T0012_good_quant")
  23. filesSyn <- file.path(pathSyn, directoryIDSyn, "quant.sf")
  24. files <- c(filesSyn)
  25. file.exists(files)
  26. rep <- c("CA1", "CA2", "CA3", "4z1", "4z2", "4z3", "4c1", "4c2", "4c3", "4p1", "4p2", "4p3")
  27. region <- c("CA", "CA", "CA", "4z", "4z", "4z", "4c", "4c", "4c", "4p", "4p", "4p")
  28. data <- c("synaptosome","synaptosome","synaptosome","synaptosome","synaptosome","synaptosome","synaptosome","synaptosome","synaptosome","synaptosome","synaptosome","synaptosome")
  29. rat <- c("1", "2", "3", "4", "5", "6", "4", "5", "6", "4", "5", "6")
  30. condition <- c("control", "control", "control", "stroke", "stroke","stroke","stroke", "stroke", "stroke","stroke","stroke", "stroke")
  31. coldata_syn <- data.frame(files, data=rep, names=rep, region=region,rat = rat, condition=condition, stringsAsFactors=FALSE)
  32. coldata_syn$region <- as.factor(coldata_syn$region)
  33. coldata_syn$data <- as.factor(coldata_syn$data)
  34. coldata_syn$names <- as.factor(coldata_syn$names)
  35. coldata_syn$rat <- as.factor(coldata_syn$rat)
  36. coldata_syn$condition <- as.factor(coldata_syn$condition)
  37. # Build taxome file
  38. indexDir <- file.path("/Resources/Salmon_indexes/Rattus_norvegicus/salmon_index")
  39. fastaFTP <- c("/Resources/Salmon_indexes/Rattus_norvegicus")
  40. gtfPath <- file.path("/Resources/Rattus_norvegicus.mRatBN7.2.111.gtf.gz")
  41. makeLinkedTxome(indexDir=indexDir,
  42. source="LocalEnsembl",
  43. organism="Rattus norvegicus",
  44. release="111",
  45. genome="mRatBN7.2",
  46. fasta=fastaFTP,
  47. gtf=gtfPath,
  48. write=FALSE)
  49. # Syn
  50. se_syn <- tximeta(coldata_syn)
  51. edb <- retrieveDb(se_syn)
  52. k <- keys(edb, keytype = "TXNAME")
  53. tx2gene <- AnnotationDbi::select(edb, k, "GENEID", "TXNAME")
  54. txi <- tximport(files, type = "salmon", tx2gene = tx2gene, countsFromAbundance = "lengthScaledTPM", ignoreTxVersion = T)
  55. y <- DGEList(txi$counts)
  56. design <- model.matrix(~region, data = coldata_syn)
  57. isexpr <- filterByExpr(y, design)
  58. y <- y[isexpr, ]
  59. y <- calcNormFactors(y)
  60. param <- SnowParam(4, "SOCK", progressbar = TRUE)
  61. form <- ~ region
  62. # estimate weights using linear mixed model of dream
  63. vobjDream <- voomWithDreamWeights(y, form, coldata_syn, BPPARAM = param)
  64. write_tsv(as.data.frame(vobjDream$E) %>%
  65. mutate(gene = rownames(vobjDream$E)) %>%
  66. rename( CA1 = Sample1, CA2 = Sample2, CA3 = Sample3, "4z1" = Sample4,
  67. "4z2" = Sample5, "4z3" = Sample6, "4c1" = Sample7, "4c2" = Sample8,
  68. "4c3" = Sample9, "4p1" = Sample10, "4p2" = Sample11, "4p3" = Sample12),
  69. file = "q/VariancePartitioning/Syn_voomWithDreamWeights-normalised.txt")
  70. fitmm <- dream(vobjDream, form, coldata_syn, ddf = "Kenward-Roger")
  71. fitmm <- eBayes(fitmm)
  72. L <- makeContrastsDream(form, coldata_syn,
  73. contrasts = c(
  74. compare4c_4z = "region4c - region4z",
  75. compare4c_4p = "region4c - region4p",
  76. compare4z_4p = "region4z - region4p"))
  77. # fit dream model with contrasts
  78. fit <- dream(vobjDream, form, coldata_syn, L)
  79. fit <- eBayes(fit)
  80. compare4c_4z = topTable(fit, coef = "compare4c_4z", number = 47000)
  81. compare4c_4z$input = rownames(compare4c_4z)
  82. compare4c_4zGenes = gprofiler2::gconvert(rownames(compare4c_4z), organism = "rnorvegicus")
  83. compare4c_4z = left_join(compare4c_4z, compare4c_4zGenes, by = "input")
  84. compare4c_4p = topTable(fit, coef = "compare4c_4p", number = 47000)
  85. compare4c_4p$input = rownames(compare4c_4p)
  86. compare4c_4pGenes = gprofiler2::gconvert(rownames(compare4c_4p), organism = "rnorvegicus")
  87. compare4c_4p = left_join(compare4c_4p, compare4c_4pGenes, by = "input")
  88. compare4z_4p = topTable(fit, coef = "compare4z_4p", number = 47000)
  89. compare4z_4p$input = rownames(compare4z_4p)
  90. compare4z_4pGenes = gprofiler2::gconvert(rownames(compare4z_4p), organism = "rnorvegicus")
  91. compare4z_4p = left_join(compare4z_4p, compare4z_4pGenes, by = "input")
  92. volcano_res1 = EnhancedVolcano(compare4z_4p,
  93. lab = compare4z_4p$name,
  94. x = 'logFC',
  95. y = 'adj.P.Val',
  96. pCutoff = 0.05,
  97. FCcutoff = 1,
  98. xlim = c(-11, 11),
  99. ylim = c(0, 6),
  100. pointSize = 1.5,
  101. labSize = 3,
  102. title = '4z vs 4p in Syn',
  103. # subtitle = 'Differential expression',
  104. # caption = 'FC cutoff, 1; p-value cutoff, 10e-4',
  105. legendPosition = "right",
  106. legendLabSize = 14,
  107. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  108. colAlpha = 0.5,
  109. #drawConnectors = TRUE,
  110. hline = c(10e-8),
  111. widthConnectors = 0.5)
  112. volcano_res2 = EnhancedVolcano(compare4c_4z,
  113. lab = compare4c_4z$name,
  114. x = 'logFC',
  115. y = 'adj.P.Val',
  116. pCutoff = 0.05,
  117. FCcutoff = 1,
  118. xlim = c(-11, 11),
  119. ylim = c(0, 6),
  120. pointSize = 1.5,
  121. labSize = 3,
  122. title = '4c vs 4z in Syn',
  123. # subtitle = 'Differential expression',
  124. # caption = 'FC cutoff, 1; p-value cutoff, 10e-4',
  125. legendPosition = "right",
  126. legendLabSize = 14,
  127. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  128. colAlpha = 0.5,
  129. #drawConnectors = TRUE,
  130. hline = c(10e-8),
  131. widthConnectors = 0.5)
  132. volcano_res3 = EnhancedVolcano(compare4c_4p,
  133. lab = compare4c_4p$name,
  134. x = 'logFC',
  135. y = 'adj.P.Val',
  136. pCutoff = 0.05,
  137. FCcutoff = 1,
  138. xlim = c(-11, 11),
  139. ylim = c(0, 6),
  140. pointSize = 1.5,
  141. labSize = 3,
  142. title = '4c vs 4p in Syn',
  143. # subtitle = 'Differential expression',
  144. # caption = 'FC cutoff, 1; p-value cutoff, 10e-4',
  145. legendPosition = "right",
  146. legendLabSize = 14,
  147. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  148. colAlpha = 0.5,
  149. #drawConnectors = TRUE,
  150. hline = c(10e-8),
  151. widthConnectors = 0.5)
  152. down_genes_compare4z_4p <- compare4z_4p %>% filter(adj.P.Val <= 0.05 & (logFC < (-1)))
  153. up_genes_compare4z_4p <- compare4z_4p %>% filter(adj.P.Val <= 0.05 & (logFC > 1))
  154. gost_down_genes_compare4z_4p = gprofiler2::gost(down_genes_compare4z_4p$name, organism = "rnorvegicus")
  155. gost_up_genes_compare4z_4p = gprofiler2::gost(up_genes_compare4z_4p$name, organism = "rnorvegicus")
  156. down_genes_compare4c_4z <- compare4c_4z %>% filter(adj.P.Val <= 0.05 & (logFC < (-1)))
  157. up_genes_compare4c_4z <- compare4c_4z %>% filter(adj.P.Val <= 0.05 & (logFC > 1))
  158. gost_down_genes_compare4c_4z = gprofiler2::gost(down_genes_compare4c_4z$name, organism = "rnorvegicus")
  159. gost_up_genes_compare4c_4z = gprofiler2::gost(up_genes_compare4c_4z$name, organism = "rnorvegicus")
  160. down_genes_compare4c_4p <- compare4c_4p %>% filter(adj.P.Val <= 0.05 & (logFC < (-1)))
  161. up_genes_compare4c_4p <- compare4c_4p %>% filter(adj.P.Val <= 0.05 & (logFC > 1))
  162. gost_down_genes_compare4c_4p = gprofiler2::gost(down_genes_compare4c_4p$name, organism = "rnorvegicus")
  163. gost_up_genes_compare4c_4p = gprofiler2::gost(up_genes_compare4c_4p$name, organism = "rnorvegicus")
  164. ############ Each versus CA
  165. compare4c_CA = topTable(fit, coef = "region4c", number = 47000)
  166. compare4c_CA$input = rownames(compare4c_CA)
  167. compare4c_CAGenes = gprofiler2::gconvert(rownames(compare4c_CA), organism = "rnorvegicus")
  168. compare4c_CA = left_join(compare4c_CA, compare4c_CAGenes, by = "input")
  169. compare4p_CA = topTable(fit, coef = "region4p", number = 47000)
  170. compare4p_CA$input = rownames(compare4p_CA)
  171. compare4p_CAGenes <- gprofiler2::gconvert(rownames(compare4p_CA), organism = "rnorvegicus")
  172. compare4p_CA = left_join(compare4p_CA, compare4p_CAGenes, by = "input")
  173. compare4z_CA = topTable(fit, coef = "region4z", number = 47000)
  174. compare4z_CA$input = rownames(compare4z_CA)
  175. compare4z_CAGenes = gprofiler2::gconvert(rownames(compare4z_CA), organism = "rnorvegicus")
  176. compare4z_CA = left_join(compare4z_CA, compare4z_CAGenes, by = "input")
  177. volcano_res4 = EnhancedVolcano(compare4z_CA,
  178. lab = compare4z_CA$name,
  179. x = 'logFC',
  180. y = 'adj.P.Val',
  181. pCutoff = 0.05,
  182. FCcutoff = 1,
  183. xlim = c(-11, 11),
  184. ylim = c(0, 6),
  185. pointSize = 1.5,
  186. labSize = 3,
  187. title = '4z vs CA in Synaptosome',
  188. # subtitle = 'Differential expression',
  189. # caption = 'FC cutoff, 1; p-value cutoff, 10e-4',
  190. legendPosition = "right",
  191. legendLabSize = 14,
  192. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  193. colAlpha = 0.5,
  194. #drawConnectors = TRUE,
  195. hline = c(10e-8),
  196. widthConnectors = 0.5)
  197. volcano_res5 = EnhancedVolcano(compare4c_CA,
  198. lab = compare4c_CA$name,
  199. x = 'logFC',
  200. y = 'adj.P.Val',
  201. pCutoff = 0.05,
  202. FCcutoff = 1,
  203. xlim = c(-11, 11),
  204. ylim = c(0, 6),
  205. pointSize = 1.5,
  206. labSize = 3,
  207. title = '4c vs CA in Synaptosome',
  208. # subtitle = 'Differential expression',
  209. # caption = 'FC cutoff, 1; p-value cutoff, 10e-4',
  210. legendPosition = "right",
  211. legendLabSize = 14,
  212. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  213. colAlpha = 0.5,
  214. #drawConnectors = TRUE,
  215. hline = c(10e-8),
  216. widthConnectors = 0.5)
  217. volcano_res6 = EnhancedVolcano(compare4p_CA,
  218. lab = compare4p_CA$name,
  219. x = 'logFC',
  220. y = 'adj.P.Val',
  221. pCutoff = 0.05,
  222. FCcutoff = 1,
  223. xlim = c(-11, 11),
  224. ylim = c(0, 6),
  225. pointSize = 1.5,
  226. labSize = 3,
  227. title = '4p vs CA in Synaptosome',
  228. # subtitle = 'Differential expression',
  229. # caption = 'FC cutoff, 1; p-value cutoff, 10e-4',
  230. legendPosition = "right",
  231. legendLabSize = 14,
  232. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  233. colAlpha = 0.5,
  234. #drawConnectors = TRUE,
  235. hline = c(10e-8),
  236. widthConnectors = 0.5)
  237. # Filter significant genes in 4z vs CA
  238. up_genes_compare4z_CA <- compare4z_CA %>% filter(adj.P.Val <= 0.05 & (logFC > 1))
  239. down_genes_compare4z_CA <- compare4z_CA %>% filter(adj.P.Val <= 0.05 & (logFC < (-1)))
  240. gost_up_genes_compare4z_CA = gprofiler2::gost(up_genes_compare4z_CA$name, organism = "rnorvegicus", evcodes = T)
  241. gost_down_genes_compare4z_CA = gprofiler2::gost(down_genes_compare4z_CA$name, organism = "rnorvegicus", evcodes = T)
  242. gost_up_genes_compare4z_CA = gprofiler2::gost(up_genes_compare4z_CA$name, organism = "rnorvegicus")
  243. # Filter significant genes in 4c vs CA
  244. up_genes_compare4c_CA <- compare4c_CA %>% filter(adj.P.Val <= 0.05 & (logFC > 1))
  245. down_genes_compare4c_CA <- compare4c_CA %>% filter(adj.P.Val <= 0.05 & (logFC < (-1)))
  246. gost_up_genes_compare4c_CA = gprofiler2::gost(up_genes_compare4c_CA$name, organism = "rnorvegicus")
  247. gost_down_genes_compare4c_CA = gprofiler2::gost(down_genes_compare4c_CA$name, organism = "rnorvegicus")
  248. x = as.data.frame(up_genes_compare4c_CA$name)
  249. compare4c_CA_gost = gostplot(gost_down_genes_compare4c_CA, interactive = F)
  250. compare4c_CA_publ = publish_gostplot(compare4c_CA_gost)
  251. compare4c_CA_table = publish_gosttable(gost_down_genes_compare4c_CA, highlight_terms = gost_down_genes_compare4c_CA$result[c(1:20),],
  252. use_colors = TRUE,
  253. show_columns = c("source", "term_name", "term_size", "intersection_size"),
  254. filename = NULL)
  255. gost_up_genes_compare4c_CA = gprofiler2::gost(up_genes_compare4c_CA$name, organism = "rnorvegicus")
  256. compare4c_CA_up_gost = gostplot(gost_up_genes_compare4c_CA, interactive = F)
  257. compare4c_CA_up_publ = publish_gostplot(compare4c_CA_up_gost)
  258. compare4c_CA_up_table = publish_gosttable(gost_up_genes_compare4c_CA, highlight_terms = gost_up_genes_compare4c_CA$result[c(1:20),],
  259. use_colors = TRUE,
  260. show_columns = c("source", "term_name", "term_size", "intersection_size"),
  261. filename = NULL) +
  262. labs(title = "Upregulated genes 4c versus CA")
  263. # Filter significant genes in 4p vs CA
  264. up_genes_compare4p_CA <- compare4p_CA %>% filter(adj.P.Val <= 0.05 & (logFC > 1))
  265. down_genes_compare4p_CA <- compare4p_CA %>% filter(adj.P.Val <= 0.05 & (logFC < (-1)))
  266. gost_up_genes_compare4p_CA = gprofiler2::gost(up_genes_compare4p_CA$name, organism = "rnorvegicus", evcodes = T)
  267. gost_down_genes_compare4p_CA = gprofiler2::gost(down_genes_compare4p_CA$name, organism = "rnorvegicus", evcodes = T)
  268. x = as.data.frame(up_genes_compare4p_CA$name)
  269. compare4p_CA_gost = gostplot(gost_down_genes_compare4p_CA, interactive = F)
  270. compare4p_CA_publ = publish_gostplot(compare4p_CA_gost)
  271. compare4p_CA_table = publish_gosttable(gost_down_genes_compare4p_CA, highlight_terms = gost_down_genes_compare4p_CA$result[c(1:20),],
  272. use_colors = TRUE,
  273. show_columns = c("source", "term_name", "term_size", "intersection_size"),
  274. filename = NULL)
  275. gost_up_genes_compare4p_CA = gprofiler2::gost(up_genes_compare4p_CA$name, organism = "rnorvegicus")
  276. compare4p_CA_up_gost = gostplot(gost_up_genes_compare4p_CA, interactive = F)
  277. compare4p_CA_up_publ = publish_gostplot(compare4p_CA_up_gost)
  278. compare4p_CA_up_table = publish_gosttable(gost_up_genes_compare4p_CA, highlight_terms = gost_up_genes_compare4p_CA$result[c(1:20),],
  279. use_colors = TRUE,
  280. show_columns = c("source", "term_name", "term_size", "intersection_size"),
  281. filename = NULL) +
  282. labs(title = "Upregulated genes 4p versus CA")
  283. ################################################################################
  284. ########## Plot to file
  285. #file_path <- "/VariancePartitioning/VariancePartition_Syn.pdf"
  286. pdf(file_path, width = 14, height = 12)
  287. plot(pca$x, cex = 4.0, col = c("#2f4f4f",
  288. "#228b22",
  289. "#7f0000",
  290. "#00008b"), pch = 18)
  291. legend(
  292. "topright",
  293. bty = "n",
  294. c("CA", "4z", "4c","4p"),
  295. fill = c("#2f4f4f",
  296. "#228b22",
  297. "#7f0000",
  298. "#00008b"),
  299. cex = 3.0)
  300. plot(tree)
  301. plotVarPart(vp)
  302. plotContrasts(L)
  303. plotPercentBars(vp[1:100, ])
  304. heatmap(syn_matrix)
  305. volcano_res1
  306. compare4z_4p_publ
  307. cat("Downreg in 4z versus 4p")
  308. compare4z_4p_table
  309. volcano_res2
  310. compare4c_4z_publ
  311. cat("Downreg in 4c versus 4z")
  312. compare4c_4z_table
  313. volcano_res3
  314. compare4c_4p_publ
  315. cat("Downreg in 4c versus 4p")
  316. compare4c_4p_table
  317. volcano_res4
  318. compare4z_CA_publ
  319. cat("Downreg in 4z versus CA")
  320. compare4z_CA_table
  321. cat("Upreg in 4z versus CA")
  322. compare4z_CA_up_publ
  323. compare4z_CA_up_table
  324. volcano_res5
  325. compare4c_CA_publ
  326. cat("Downreg in 4c versus CA")
  327. compare4c_CA_table
  328. cat("Upreg in 4c versus CA")
  329. compare4c_CA_up_publ
  330. compare4c_CA_up_table
  331. volcano_res6
  332. compare4p_CA_publ
  333. cat("Downreg in 4p versus CA")
  334. compare4p_CA_table
  335. cat("Upreg in 4p versus CA")
  336. compare4p_CA_up_publ
  337. compare4p_CA_up_table
  338. dev.off()
  339. ################################################################################
  340. ###################### Gene set enrichment analysis ############################
  341. library(GSVA)
  342. library(fgsea)
  343. library(GSEABase)
  344. library(readxl)
  345. library(dendextend)
  346. library(gplots)
  347. # Path to your Excel file with genes of interest
  348. xlsx_file <- "/Other_resources/mmc2.xlsx"
  349. # Add novel genes (Synapsed enriched novel)
  350. xlsx_file2 <- "/Other_resources/mmc2.xlsx"
  351. xlsx_file3 <- "/Other_resources/GeneSets_Synaptic_Presynaptic.xlsx"
  352. # Read the first/second sheet of the Excel file, and convert names
  353. # to match the expression matrix
  354. df = read_excel(xlsx_file, sheet = 1) %>% dplyr::select(GeneName, SynapseType)
  355. df2 = read_excel(xlsx_file, sheet = 2) %>% dplyr::select("hgnc symbol") %>%
  356. mutate(SynapseType = "Oostrum2023_novel") %>% rename(GeneName = "hgnc symbol")
  357. df3 = read_excel(xlsx_file3, sheet = 1) %>% pivot_longer(cols = c(Presynaptic, Postsynaptic),
  358. names_to = "SynapseType", values_to = "GeneName")
  359. df = rbind(df, df2, df3)
  360. df_ens = gprofiler2::gconvert(df$GeneName, organism = "rnorvegicus")
  361. df = left_join(df, df_ens, by = c("GeneName"="input")) %>% dplyr::select(target, SynapseType) %>% unique()
  362. # Define gene sets
  363. gene_set <- list()
  364. # Loop through unique entries in SynapseType
  365. unique_entries <- unique(df$SynapseType)
  366. for(entry in unique_entries) {
  367. # Extract values from GeneName corresponding to current SynapseType
  368. values <- df$target[df$SynapseType == entry]
  369. # Assign values to the list with name as current SynapseType
  370. gene_set[[entry]] <- values
  371. }
  372. # Convert to GeneSetCollection
  373. gene_set_list <- lapply(names(gene_set), function(x) GeneSet(setName = x, geneIds = gene_set[[x]]))
  374. ################################################################################
  375. gsc <- GeneSetCollection(gene_set_list)
  376. ################################################################################
  377. # Perform GSVA on voomWithDream normaalized counts (log2-counts per million (logCPM))
  378. colnames(vobjDream$E) = rep
  379. vobjDream_E = as.data.frame(vobjDream$E)
  380. vobjDream_E$genes = rownames(vobjDream_E)
  381. converted = gprofiler2::gconvert(rownames(vobjDream_E), organism = "rnorvegicus")
  382. vobjDream_E = left_join(vobjDream_E, converted, by = c("genes" = "input"))
  383. vobjDream_E = vobjDream_E[,c("name","CA1","CA2","CA3","4z1","4z2","4z3","4c1",
  384. "4c2","4c3","4p1","4p2","4p3")]
  385. vobjDream_E2 = as.matrix(vobjDream_E[,2:13])
  386. rownames(vobjDream_E2) = vobjDream_E$name
  387. vobjDream_E = as.data.frame(vobjDream$E)
  388. ################################################################################
  389. unique_genes_Oostrum23 <- unique(unlist(gene_set))
  390. unique_genes_Oostrum23_symbols = gprofiler2::gconvert(unique_genes_Oostrum23, organism = "rnorvegicus")
  391. Oostrum23_geneExpr = vobjDream_E2[rownames(vobjDream_E2) %in% unique_genes_Oostrum23_symbols$name,]
  392. ################################################################################
  393. gsva_res <- gsva(vobjDream$E, gsc, method = "gsva", kcdf = "Poisson", mx.diff = TRUE, verbose = FALSE)
  394. # Create design matrix
  395. design <- model.matrix(~ region, data = coldata_syn)
  396. # fit dream model with contrasts
  397. fit2 <- dream(gsva_res, form, coldata_syn, L)
  398. fit2 <- eBayes(fit2)
  399. # Get differential analysis results
  400. results4p_CA <- topTable(fit2, coef="region4p", adjust.method="BH", number=Inf)
  401. results4c_CA <- topTable(fit2, coef="region4c", adjust.method="BH", number=Inf)
  402. results4z_CA <- topTable(fit2, coef="region4z", adjust.method="BH", number=Inf)
  403. pca2 = prcomp(gsva_res)
  404. pca3 = prcomp(t(gsva_res))
  405. pca4 = prcomp(t(Oostrum23_geneExpr))
  406. ################################################################################
  407. ########## Correlation between terms
  408. # Filter gene sets to include only genes present in the gene expression matrix
  409. gene_sets <- lapply(gene_set, function(genes) {
  410. genes[genes %in% rownames(vobjDream_E)]
  411. })
  412. # Aggregate expression values for each gene set
  413. aggregate_expression <- sapply(gene_sets, function(genes) {
  414. if (length(genes) > 0) {
  415. colMeans(vobjDream_E[genes, , drop = FALSE])
  416. } else {
  417. rep(NA, ncol(vobjDream_E)) # Handle gene sets with no genes present in the data
  418. }
  419. })
  420. # Remove any columns with NA values (gene sets with no genes present in the data)
  421. aggregate_expression <- aggregate_expression[, colSums(is.na(aggregate_expression)) == 0]
  422. # Compute the correlation matrix for the aggregated expression values of the gene sets
  423. correlation_matrix <- cor(aggregate_expression)
  424. # Print the correlation matrix
  425. print(correlation_matrix)
  426. ################################################################################
  427. ########## Plot to file
  428. file_path <- "/GeneSet_Enrichments/Heaatmap_GeneSetOostrum2023_and_fromOleg_Syn.pdf"
  429. pdf(file_path, width = 18, height = 12)
  430. library(RColorBrewer)
  431. # Define color palette for heatmap
  432. colorLegend <- c("#0072B2", "#D55E00", "#CC79A7","#F0E442")
  433. #0072B2 (blue)
  434. #CC79A7 (pinky purple)
  435. #D55E00 (orange)
  436. #F0E442 (yellow)
  437. names(colorLegend) <- c("CA", "4z", "4c", "4p")
  438. sample.color.map <- colorLegend[coldata_syn$region]
  439. coldata_syn$rep <- rep
  440. names(sample.color.map) <- coldata_syn$rep
  441. sample.color.map["4z1"] = "#D55E00"
  442. sample.color.map["4z2"] = "#D55E00"
  443. sample.color.map["4z3"] = "#D55E00"
  444. sample.color.map["4p1"] = "#F0E442"
  445. sample.color.map["4p2"] = "#F0E442"
  446. sample.color.map["4p3"] = "#F0E442"
  447. sample.color.map["4c1"] = "#CC79A7"
  448. sample.color.map["4c2"] = "#CC79A7"
  449. sample.color.map["4c3"] = "#CC79A7"
  450. heatmap_colors <- colorRampPalette(c("lightblue", "white", "#FF457D"))(n = 1000)
  451. # Cluster the samples and gene terms
  452. geneSetClustering <- hclust(dist(gsva_res, method = "euclidean"), method = "complete")
  453. sampleClustering <- hclust(dist(t(gsva_res), method = "euclidean"), method = "complete")
  454. # Convert hclust objects to dendrograms
  455. geneSetDendrogram <- as.dendrogram(geneSetClustering)
  456. sampleDendrogram <- as.dendrogram(sampleClustering)
  457. sampleDendrogram <- rotate(sampleDendrogram, order = c("4p3", "4p1", "4p2",
  458. "4c2", "4c1", "4c3",
  459. "CA1", "CA2", "CA3",
  460. "4z2", "4z3", "4z1"))
  461. # Function to rotate a specific branch of a dendrogram given a path
  462. rotate_branch <- function(dend, path) {
  463. if (length(path) == 0) return(rev(dend))
  464. if (is.leaf(dend)) return(dend)
  465. branch_index <- path[1]
  466. dend[[branch_index]] <- rotate_branch(dend[[branch_index]], path[-1])
  467. dend
  468. }
  469. # Path to the [[2]][[2]][[1]] branch
  470. branch_path <- c(2, 2, 1)
  471. # Sample dendrogram (for demonstration purposes)
  472. # Create a sample dendrogram if needed
  473. # sampleDendrogram <- as.dendrogram(hclust(dist(USArrests), "ave"))
  474. # Rotate the specified branch
  475. sampleDendrogram <- rotate_branch(sampleDendrogram, branch_path)
  476. # Create heatmap with adjusted parameters
  477. heatmap(as.matrix(gsva_res),
  478. ColSideColors = sample.color.map,
  479. xlab = " ",
  480. ylab = " ",
  481. margins = c(5, 5),
  482. labRow = gsub("_", " ", rownames(gsva_res)), # Remove only "_"
  483. labCol = colnames(gsva_res),
  484. scale = "row",
  485. Colv = sampleDendrogram,
  486. Rowv = geneSetDendrogram,
  487. col = heatmap_colors,
  488. cexRow = 0.8, # 2 for gene set enrichment but 0.8 for cell type enrichment
  489. cexCol = 2,
  490. cex.lab = 2)
  491. # Add legend for heatmap colors
  492. min_value <- as.numeric(min(gsva_res))
  493. max_value <- as.numeric(max(gsva_res))
  494. mid_value <- (min_value + max_value) / 2
  495. min_value <- round(min_value, 3)
  496. max_value <- round(max_value, 3)
  497. mid_value <- round(mid_value, 3)
  498. # Create legend labels
  499. legend_labels <- c(min_value, mid_value, max_value)
  500. # Add legend for regions/reps
  501. legend("topleft", legend = names(colorLegend), fill = colorLegend, title = "Sections", cex = 1.5, bty = "n", inset = 0.05)
  502. # Legend plot for values
  503. legend("left", legend = legend_labels, fill = colorRampPalette(c("lightblue", "white", "#FF457D"))(n = 3), title = "Enrichment values", cex = 1.5, bty = "n", inset = 0.05)
  504. ################################################################################
  505. ########################## Samples PCA based on gene set/term enrichment scoring
  506. pca_data <- as.data.frame(pca3$x)
  507. pca_data$sample <- rownames(pca_data)
  508. # Assign colors to samples
  509. pca_data$color <- c("#0072B2","#0072B2","#0072B2", # blue
  510. "#D55E00","#D55E00","#D55E00", #orange
  511. "#CC79A7","#CC79A7","#CC79A7", #pinky purple
  512. "#F0E442","#F0E442","#F0E442") #yellow
  513. custom_colors <- c("#0072B2", "#CC79A7","#D55E00", "#F0E442")
  514. # Plot the PCA
  515. ggplot(pca_data, aes(x = PC1, y = PC2, label = sample, color = color)) +
  516. geom_point(size = 5) + # Adjust point size
  517. geom_text(vjust = 1.5, hjust = 1.5, size = 5) + # Adjust font size
  518. labs(title = "PCA of Gene Set Enrichment Scores (Samples)",
  519. x = "Principal Component 1",
  520. y = "Principal Component 2") +
  521. scale_color_manual(values = custom_colors) +
  522. theme_minimal() +
  523. theme(aspect.ratio = 1, # Make the plot square
  524. plot.title = element_text(size = 16), # Adjust title font size
  525. axis.title = element_text(size = 14), # Adjust axis titles font size
  526. axis.text = element_text(size = 12), # Adjust axis text font size
  527. legend.position = "none") # Remove legend
  528. ################################################################################
  529. ##################### Terms
  530. pca_data2 <- as.data.frame(pca2$x)
  531. pca_data2$sample <- rownames(pca_data2)
  532. base_colors <- brewer.pal(8, "Set1") # Use "Set1" for a vibrant color set
  533. custom_colors2 <- colorRampPalette(base_colors)(18)
  534. # Create a named vector for custom colors
  535. names(custom_colors2) <- rownames(pca_data2)
  536. # Plot the PCA
  537. ggplot(pca_data2, aes(x = PC1, y = PC2, label = sample, color = sample)) +
  538. geom_point(size = 5) + # Adjust point size
  539. geom_text_repel(aes(label = sample), size = 5, nudge_x = 0.05, direction = "y", hjust = 0) + # Adjust text label position
  540. labs(title = "PCA of Gene Set Enrichment Scores",
  541. x = "Principal Component 1",
  542. y = "Principal Component 2") +
  543. scale_color_manual(values = custom_colors2) +
  544. theme_minimal() +
  545. theme(aspect.ratio = 1, # Make the plot square
  546. plot.title = element_text(size = 16), # Adjust title font size
  547. axis.title = element_text(size = 14), # Adjust axis titles font size
  548. axis.text = element_text(size = 12), # Adjust axis text font size
  549. legend.position = "none") # Remove legend
  550. ################################################################################
  551. ############################ Gene expression fo teh genes in the terms/gene sets
  552. pca_data4 <- as.data.frame(pca4$x)
  553. pca_data4$sample <- rownames(pca_data4)
  554. # Assign colors to samples
  555. pca_data4$color <- c("#0072B2","#0072B2","#0072B2", # blue
  556. "#D55E00","#D55E00","#D55E00", #orange
  557. "#CC79A7","#CC79A7","#CC79A7", #pinky purple
  558. "#F0E442","#F0E442","#F0E442") #yellow
  559. custom_colors4 <- c("#0072B2","#0072B2","#0072B2", # blue
  560. "#D55E00","#D55E00","#D55E00", #orange
  561. "#CC79A7","#CC79A7","#CC79A7", #pinky purple
  562. "#F0E442","#F0E442","#F0E442") #yellow
  563. names(custom_colors4) <- pca_data4$sample
  564. # Plot the PCA
  565. ggplot(pca_data4, aes(x = PC1, y = PC2, label = sample, color = sample)) +
  566. geom_point(size = 5) + # Adjust point size
  567. geom_text_repel(aes(label = sample), size = 5, nudge_x = 0.05, direction = "y", hjust = 0) + # Adjust text label position
  568. labs(title = "PCA of Gene Set Expression",
  569. x = "Principal Component 1",
  570. y = "Principal Component 2") +
  571. scale_color_manual(values = custom_colors4) +
  572. theme_minimal() +
  573. theme(aspect.ratio = 1, # Make the plot square
  574. plot.title = element_text(size = 16), # Adjust title font size
  575. axis.title = element_text(size = 14), # Adjust axis titles font size
  576. axis.text = element_text(size = 12), # Adjust axis text font size
  577. legend.position = "none") # Remove legend
  578. heatmap.2(Oostrum23_geneExpr,
  579. trace = "none",
  580. col = heatmap_colors,
  581. margins = c(10, 10),
  582. key = TRUE,
  583. keysize = 1,
  584. density.info = "none",
  585. dendrogram = "none",
  586. main = "Heatmap of Gene Sets Gene Expression",
  587. Colv = FALSE,
  588. Rowv = FALSE)
  589. # Same thing as above, different format:
  590. heatmap(Oostrum23_geneExpr,
  591. col = heatmap_colors, Colv = NULL, Rowv = NULL)
  592. # Add legend for heatmap colors
  593. min_value <- as.numeric(min(Oostrum23_geneExpr))
  594. max_value <- as.numeric(max(Oostrum23_geneExpr))
  595. mid_value <- (min_value + max_value) / 2
  596. min_value <- round(min_value, 3)
  597. max_value <- round(max_value, 3)
  598. mid_value <- round(mid_value, 3)
  599. # Create legend labels
  600. legend_labels <- c(min_value, mid_value, max_value)
  601. # Legend plot for values
  602. legend("left", legend = legend_labels,
  603. fill = colorRampPalette(c("lightblue", "white", "#FF457D"))(n = 3),
  604. title = expression("Log"[2]*"CPM values"),
  605. cex = 1.5, bty = "n", inset = 0.05)
  606. ################## Correlation of terms expression
  607. # Define your color palette
  608. colorLegend <- c("#0072B2", "#D55E00", "#CC79A7", "#F0E442")
  609. names(colorLegend) <- c("CA", "4z", "4c", "4p")
  610. # Generate heatmap colors
  611. heatmap_colors <- colorRampPalette(c("lightblue", "white", "#FF457D"))(n = 1000)
  612. # Define the color breaks for the heatmap
  613. breaks <- seq(min(correlation_matrix, na.rm = TRUE), max(correlation_matrix, na.rm = TRUE), length.out = length(heatmap_colors) + 1)
  614. # Create the heatmap
  615. heatmap.2(
  616. correlation_matrix,
  617. col = heatmap_colors,
  618. breaks = breaks,
  619. trace = "none",
  620. margins = c(20, 20),
  621. main = "Correlation Matrix of Gene Sets (expression aggregated across samples)",
  622. key = TRUE,
  623. keysize = 1.5,
  624. dendrogram = "none",
  625. Colv = FALSE,
  626. Rowv = FALSE
  627. )
  628. ###################
  629. correlation_matrix2 = cor(t(gsva_res))
  630. # Plot the correlation heatmap
  631. heatmap.2(correlation_matrix2,
  632. trace = "none",
  633. col = bluered(256),
  634. margins = c(8, 8),
  635. main = "Correlation Matrix of Gene Sets (enrichment scoring)",
  636. density.info = "none")
  637. ###################
  638. # Ensure your gene sets contain only genes present in the gene expression matrix
  639. gene_sets <- lapply(gene_set, function(genes) {
  640. genes[genes %in% rownames(vobjDream_E)]
  641. })
  642. # Initialize a matrix to store average expressions per gene set per sample
  643. avg_expression_matrix <- matrix(NA, nrow = length(gene_sets), ncol = ncol(vobjDream_E))
  644. rownames(avg_expression_matrix) <- names(gene_sets)
  645. colnames(avg_expression_matrix) <- colnames(vobjDream_E)
  646. # Calculate the average expression for each gene set per sample
  647. for (i in seq_along(gene_sets)) {
  648. genes <- gene_sets[[i]]
  649. if (length(genes) > 0) {
  650. avg_expression_matrix[i, ] <- colMeans(vobjDream_E[genes, , drop = FALSE])
  651. }
  652. }
  653. # Compute the correlation matrix for the averaged expression values per sample
  654. correlation_matrix <- cor(t(avg_expression_matrix), use = "complete.obs")
  655. # Print the correlation matrix
  656. print(correlation_matrix)
  657. # Plot the correlation matrix as a heatmap
  658. heatmap.2(correlation_matrix,
  659. trace = "none",
  660. col = colorRampPalette(brewer.pal(9, "Blues"))(256),
  661. margins = c(8, 8),
  662. main = "Correlation Matrix of Gene Sets (gene expression average per sample)",
  663. density.info = "none",
  664. key.title = "Correlation",
  665. key.xlab = "Correlation",
  666. cexRow = 0.7,
  667. cexCol = 0.7)
  668. dev.off()
  669. ############## Plotting main figure 4p vs CA
  670. # Define colorblind-friendly colors manually
  671. PCA_colors <- c("#000000", # Black (for CA)
  672. "#000000", # Black (for CA)
  673. "#000000", # Black (for CA)
  674. "#D55E00", # Orange (for 4z)
  675. "#D55E00", # Orange (for 4z)
  676. "#D55E00", # Orange (for 4z)
  677. "#0072B2", # Sky Blue (for 4c)
  678. "#0072B2", # Sky Blue (for 4c)
  679. "#0072B2", # Sky Blue (for 4c)
  680. "#CC79A7", # Magenta (for 4p)
  681. "#CC79A7", # Magenta (for 4p)
  682. "#CC79A7") # Magenta (for 4p)
  683. pca_all = prcomp(t(syn_matrix))
  684. pca_data_all <- as.data.frame(pca_all$x)
  685. pca_data_all$sample <- rownames(pca_data_all)
  686. names(PCA_colors) <- pca_data_all$sample
  687. # Plot the PCA
  688. PCA_4p_CA_1 = ggplot(pca_data_all, aes(x = PC1, y = PC2, label = sample, color = sample)) +
  689. geom_point(size = 10) + # Adjust point size
  690. geom_text_repel(aes(label = sample), size = 15, nudge_x = 0.05, direction = "y", hjust = 0) + # Adjust text label position
  691. labs(x = "Principal Component 1",
  692. y = "Principal Component 2") +
  693. scale_color_manual(values = PCA_colors) +
  694. theme_minimal() +
  695. theme(
  696. aspect.ratio = 1, # Make the plot square
  697. plot.title = element_text(size = 35), # Adjust title font size
  698. axis.title = element_text(size = 40), # Adjust axis titles font size
  699. axis.text = element_text(size = 35), # Adjust axis text font size
  700. legend.position = "none", # Remove legend
  701. panel.grid.major = element_line(color = "grey90"), # Adjust major grid lines
  702. panel.grid.minor = element_line(color = "grey60"), # Adjust minor grid lines
  703. panel.border = element_rect(color = "black", fill = NA, size = 1) # Add a black border around the plot
  704. )
  705. pdf("/VariancePartitioning/4p_vs_CA_PCA_VariancePartition_Syn.pdf",
  706. width = 13.5, height = 12.5, bg = "transparent")
  707. print(PCA_4p_CA_1)
  708. dev.off() # Close the device
  709. volcano_syn_4p_CA = EnhancedVolcano(compare4p_CA,
  710. lab = compare4p_CA$name,
  711. subtitle = NULL,
  712. x = 'logFC',
  713. y = 'adj.P.Val',
  714. pCutoff = 0.05,
  715. FCcutoff = 1,
  716. xlim = c(-9, 11),
  717. ylim = c(0, 6),
  718. pointSize = 1.5,
  719. axisLabSize = 35,
  720. labSize = 10,
  721. title = NULL,
  722. legendPosition = "top",
  723. legendLabSize = 35,
  724. legendLabels = c("NS", expression(Log[2] ~ FC), "p-value", expression("p-value" ~ and
  725. ~ log[2] ~ FC)),
  726. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  727. colAlpha = 0.7,
  728. #drawConnectors = TRUE,
  729. widthConnectors = 0.5)
  730. pdf("/VariancePartitioning/4p_vs_CA_Volcano_VariancePartition_Syn.pdf",
  731. width = 17.5, height = 13.5, bg = "transparent")
  732. print(volcano_syn_4p_CA)
  733. dev.off() # Close the device
  734. #Prepare the data frame for up genes
  735. Syn_4p_CA_up_genes <- gost_up_genes_compare4p_CA$result %>%
  736. filter(source %in% c("GO:BP", "GO:CC", "GO:MF", "KEGG")) %>%
  737. mutate(Ratio = intersection_size / term_size) %>%
  738. group_by(source) %>%
  739. slice_min(p_value, n = 7) %>%
  740. ungroup() %>%
  741. mutate(term_name = factor(term_name, levels = unique(term_name))) # Maintain original order
  742. # Plot for down genes GO
  743. Bubble_4p_CA_1 <- ggplot(Syn_4p_CA_up_genes, aes(x = Ratio, y = term_name)) +
  744. geom_point(aes(size = intersection_size, color = -log10(p_value)), alpha = 0.7) +
  745. scale_color_gradient(
  746. low = "#0072B2",
  747. high = "#D55E00",
  748. breaks = c(min(-log10(Syn_4p_CA_up_genes$p_value)),
  749. max(-log10(Syn_4p_CA_up_genes$p_value))),
  750. labels = c(
  751. paste0(round(min(-log10(Syn_4p_CA_up_genes$p_value)), 2)),
  752. paste0(round(max(-log10(Syn_4p_CA_up_genes$p_value)), 2))
  753. )
  754. ) + # Color based on p-value with custom breaks
  755. scale_size(range = c(5, 10)) + # Adjust bubble sizes
  756. labs(size = "Intersection Size\n", color = "-log10(p-value)\n", y = NULL) + # Axis and legend labels
  757. theme_minimal() + # Clean theme
  758. theme(
  759. axis.text.y = element_text(size = 35), # Adjust y-axis text size
  760. axis.text.x = element_text(size = 30, hjust = 1), # Adjust x-axis text size and angle
  761. axis.title.x = element_text(size = 35), # Adjust x-axis title size
  762. legend.title = element_text(size = 30), # Font size of legend title
  763. legend.text = element_text(size = 25),
  764. legend.spacing.y = unit(2, "cm") # Increase spacing between legend title and text
  765. )
  766. pdf("/VariancePartitioning/4p_vs_CA_BubbleUp_VariancePartition_Syn.pdf",
  767. width = 22.5, height = 13.5, bg = "transparent")
  768. print(Bubble_4p_CA_1)
  769. dev.off() # Close the device
  770. # Apply the updated code for down genes without text wrapping < sorta better
  771. Syn_4p_CA_down_genes <- gost_down_genes_compare4p_CA$result %>%
  772. filter(source %in% c("GO:BP", "GO:CC", "GO:MF", "KEGG")) %>%
  773. mutate(Ratio = intersection_size / term_size) %>%
  774. group_by(source) %>%
  775. slice_min(p_value, n = 7) %>%
  776. ungroup() %>%
  777. mutate(term_name = factor(term_name, levels = unique(term_name))) # Maintain original order
  778. # Plot for down genes GO
  779. Bubble_4p_CA_2 <- ggplot(Syn_4p_CA_down_genes, aes(x = Ratio, y = term_name)) +
  780. geom_point(aes(size = intersection_size, color = -log10(p_value)), alpha = 0.7) +
  781. scale_color_gradient(
  782. low = "#0072B2",
  783. high = "#D55E00",
  784. breaks = c(min(-log10(Syn_4p_CA_down_genes$p_value)),
  785. max(-log10(Syn_4p_CA_down_genes$p_value))),
  786. labels = c(
  787. paste0(round(min(-log10(Syn_4p_CA_down_genes$p_value)), 2)),
  788. paste0(round(max(-log10(Syn_4p_CA_down_genes$p_value)), 2))
  789. )
  790. ) + # Color based on p-value with custom breaks
  791. scale_size(range = c(5, 10)) + # Adjust bubble sizes
  792. labs(size = "Intersection Size\n", color = "-log10(p-value)\n", y = NULL) + # Axis and legend labels
  793. theme_minimal() + # Clean theme
  794. theme(
  795. axis.text.y = element_text(size = 35), # Adjust y-axis text size
  796. axis.text.x = element_text(size = 30, hjust = 1), # Adjust x-axis text size and angle
  797. axis.title.x = element_text(size = 35), # Adjust x-axis title size
  798. legend.title = element_text(size = 30), # Font size of legend title
  799. legend.text = element_text(size = 25),
  800. legend.spacing.y = unit(2, "cm") # Increase spacing between legend title and text
  801. )
  802. pdf("/VariancePartitioning/4p_vs_CA_BubbleDown_VariancePartition_Syn.pdf",
  803. width = 22.5, height = 13.5, bg = "transparent")
  804. print(Bubble_4p_CA_2)
  805. dev.off() # Close the device
  806. # Create bubble plot of gene set enrichments
  807. gsva_res2 <- as.data.frame(gsva_res)
  808. # Convert row names to a column
  809. gsva_res2 <- gsva_res2 %>%
  810. tibble::rownames_to_column(var = "geneset")
  811. # Convert matrix to long format and add value column
  812. long_data <- gsva_res2 %>%
  813. pivot_longer(
  814. cols = -geneset, # Exclude the geneset column from pivoting
  815. names_to = "replicate",
  816. values_to = "enrichment_score"
  817. ) %>%
  818. filter(!is.na(enrichment_score)) %>% # Remove NA values if any
  819. mutate(value = enrichment_score, # Example: scaling enrichment score
  820. label = sprintf("%.2f", value)) # Format values to 2 decimal places
  821. # Create heatmap of gene set enrichments
  822. Genesets_4p_CA_heatmap = ggplot(long_data, aes(x = replicate, y = geneset, fill = enrichment_score)) +
  823. geom_tile(color = "white") + # Create heatmap tiles with white borders between cells
  824. scale_fill_gradient2(low = "#0072B2", mid = "white", high = "#D55E00", midpoint = 0, limits = c(min(long_data$enrichment_score), max(long_data$enrichment_score))) + # Color gradient with white midpoint
  825. geom_text(aes(label = label), color = "white", size = 10, vjust = 0.5, fontface = "bold") + # Add text labels inside tiles
  826. labs(
  827. x = "Replicates",
  828. y = "Gene Sets",
  829. fill = "GSVA\nEnrichment Score" # Use newline character (\n) to split the legend title
  830. ) +
  831. theme_minimal() + # Use minimal theme for a clean look
  832. theme(
  833. axis.text.x = element_text(size = 25), # Increase x-axis text size
  834. axis.text.y = element_text(size = 35), # Increase y-axis text size
  835. axis.title.x = element_text(size = 35), # Increase x-axis title size
  836. axis.title.y = element_text(size = 35), # Increase y-axis title size
  837. plot.title = element_text(size = 25, face = "bold"), # Increase plot title size and make it bold
  838. legend.title = element_text(size = 30), # Font size of legend title
  839. legend.text = element_text(size = 30),
  840. legend.position = "right" # Position the legend on the right
  841. )
  842. pdf("/VariancePartitioning/4p_vs_CA_GeneSetsGSVAHeatmap_VariancePartition_Syn.pdf",
  843. width = 24, height = 16, bg = "transparent")
  844. #print(Genesets_4p_CA)
  845. print(Genesets_4p_CA_heatmap)
  846. dev.off() # Close the device
  847. ################################################################################
  848. ############## Plotting supplementary figure 4z vs CA
  849. volcano_syn_4z_CA = EnhancedVolcano(compare4z_CA,
  850. lab = compare4z_CA$name,
  851. subtitle = NULL,
  852. x = 'logFC',
  853. y = 'adj.P.Val',
  854. pCutoff = 0.05,
  855. FCcutoff = 1,
  856. xlim = c(-9, 11),
  857. ylim = c(0, 6),
  858. pointSize = 1.5,
  859. axisLabSize = 35,
  860. labSize = 10,
  861. title = NULL,
  862. legendPosition = "top",
  863. legendLabSize = 35,
  864. legendLabels = c("NS", expression(Log[2] ~ FC), "p-value", expression("p-value" ~ and
  865. ~ log[2] ~ FC)),
  866. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  867. colAlpha = 0.7,
  868. drawConnectors = TRUE,
  869. arrowheads = FALSE,
  870. max.overlaps = 15,
  871. widthConnectors = 0.5)
  872. pdf("/VariancePartitioning/4z_vs_CA_Volcano_VariancePartition_Syn.pdf",
  873. width = 17.5, height = 13.5, bg = "transparent")
  874. print(volcano_syn_4z_CA)
  875. dev.off() # Close the device
  876. # Apply the updated code for up genes with additional filtering and calculations
  877. Syn_4z_CA_up_genes <- gost_up_genes_compare4z_CA$result %>%
  878. filter(source %in% c("GO:BP", "GO:CC", "GO:MF", "KEGG")) %>%
  879. mutate(Ratio = intersection_size / term_size) %>%
  880. group_by(source) %>%
  881. slice_min(p_value, n = 12) %>%
  882. ungroup() %>%
  883. mutate(term_name = factor(term_name, levels = unique(term_name))) # Maintain original order
  884. # Plot for down genes GO
  885. Bubble_4z_CA_1 <- ggplot(Syn_4z_CA_up_genes, aes(x = Ratio, y = term_name)) +
  886. geom_point(aes(size = intersection_size, color = -log10(p_value)), alpha = 0.7) +
  887. scale_color_gradient(
  888. low = "#0072B2",
  889. high = "#D55E00",
  890. breaks = c(min(-log10(Syn_4z_CA_up_genes$p_value)),
  891. max(-log10(Syn_4z_CA_up_genes$p_value))),
  892. labels = c(
  893. paste0(round(min(-log10(Syn_4z_CA_up_genes$p_value)), 2)),
  894. paste0(round(max(-log10(Syn_4z_CA_up_genes$p_value)), 2))
  895. )
  896. ) + # Color based on p-value with custom breaks
  897. scale_size(range = c(5, 10)) + # Adjust bubble sizes
  898. labs(size = "Intersection Size\n", color = "-log10(p-value)\n", y = NULL) + # Axis and legend labels
  899. theme_minimal() + # Clean theme
  900. theme(
  901. axis.text.y = element_text(size = 35), # Adjust y-axis text size
  902. axis.text.x = element_text(size = 30, hjust = 1), # Adjust x-axis text size and angle
  903. axis.title.x = element_text(size = 35), # Adjust x-axis title size
  904. legend.title = element_text(size = 30), # Font size of legend title
  905. legend.text = element_text(size = 25),
  906. legend.spacing.y = unit(2, "cm") # Increase spacing between legend title and text
  907. )
  908. pdf("/VariancePartitioning/4z_vs_CA_BubbleUp_VariancePartition_Syn.pdf",
  909. width = 22.5, height = 13.5, bg = "transparent")
  910. print(Bubble_4z_CA_1)
  911. dev.off() # Close the device
  912. # Apply the updated code for down genes without text wrapping
  913. Syn_4z_CA_down_genes <- gost_down_genes_compare4z_CA$result %>%
  914. filter(source %in% c("GO:BP", "GO:CC", "GO:MF", "KEGG")) %>%
  915. mutate(Ratio = intersection_size / term_size) %>%
  916. group_by(source) %>%
  917. slice_min(p_value, n = 7) %>%
  918. ungroup() %>%
  919. mutate(term_name = factor(term_name, levels = unique(term_name))) # Maintain original order
  920. # Plot for down genes GO
  921. Bubble_4z_CA_2 <- ggplot(Syn_4z_CA_down_genes, aes(x = Ratio, y = term_name)) +
  922. geom_point(aes(size = intersection_size, color = -log10(p_value)), alpha = 0.7) +
  923. scale_color_gradient(
  924. low = "#0072B2",
  925. high = "#D55E00",
  926. breaks = c(min(-log10(Syn_4z_CA_down_genes$p_value)),
  927. max(-log10(Syn_4z_CA_down_genes$p_value))),
  928. labels = c(
  929. paste0(round(min(-log10(Syn_4z_CA_down_genes$p_value)), 2)),
  930. paste0(round(max(-log10(Syn_4z_CA_down_genes$p_value)), 2))
  931. )
  932. ) + # Color based on p-value with custom breaks
  933. scale_size(range = c(5, 10)) + # Adjust bubble sizes
  934. labs(size = "Intersection Size\n", color = "-log10(p-value)\n", y = NULL) + # Axis and legend labels
  935. theme_minimal() + # Clean theme
  936. theme(
  937. axis.text.y = element_text(size = 35), # Adjust y-axis text size
  938. axis.text.x = element_text(size = 30, hjust = 1), # Adjust x-axis text size and angle
  939. axis.title.x = element_text(size = 35), # Adjust x-axis title size
  940. legend.title = element_text(size = 30), # Font size of legend title
  941. legend.text = element_text(size = 25),
  942. legend.spacing.y = unit(2, "cm") # Increase spacing between legend title and text
  943. )
  944. pdf("/VariancePartitioning/4z_vs_CA_BubbleDown_VariancePartition_Syn.pdf",
  945. width = 22.5, height = 10, bg = "transparent")
  946. print(Bubble_4z_CA_2) # Print the plot to the PNG device
  947. dev.off() # Close the device
  948. ################################################################################
  949. ############## Plotting supplementary figure 4c vs CA
  950. volcano_syn_4c_CA = EnhancedVolcano(compare4c_CA,
  951. lab = compare4c_CA$name,
  952. subtitle = NULL,
  953. x = 'logFC',
  954. y = 'adj.P.Val',
  955. pCutoff = 0.05,
  956. FCcutoff = 1,
  957. xlim = c(-9, 11),
  958. ylim = c(0, 6),
  959. pointSize = 1.5,
  960. axisLabSize = 35,
  961. labSize = 10,
  962. title = NULL,
  963. legendPosition = "top",
  964. legendLabSize = 35,
  965. legendLabels = c("NS", expression(Log[2] ~ FC), "p-value", expression("p-value" ~ and
  966. ~ log[2] ~ FC)),
  967. col = c('grey30', '#E9E9E9', "#0072B2", '#D55E00'),
  968. colAlpha = 0.7,
  969. #drawConnectors = TRUE,
  970. widthConnectors = 0.5)
  971. pdf("/VariancePartitioning/4c_vs_CA_Volcano_VariancePartition_Syn.pdf",
  972. width = 17.5, height = 13.5, bg = "transparent")
  973. print(volcano_syn_4c_CA) # Print the plot to the PNG device
  974. dev.off() # Close the device
  975. # Apply the updated code for up genes with additional filtering and calculations
  976. Syn_4c_CA_up_genes <- gost_up_genes_compare4c_CA$result %>%
  977. filter(source %in% c("GO:BP", "GO:CC", "GO:MF", "KEGG")) %>%
  978. mutate(Ratio = intersection_size / term_size) %>%
  979. group_by(source) %>%
  980. slice_min(p_value, n = 7) %>%
  981. ungroup() %>%
  982. mutate(term_name = factor(term_name, levels = unique(term_name))) # Maintain original order
  983. # Plot for down genes GO
  984. Bubble_4c_CA_1 <- ggplot(Syn_4c_CA_up_genes, aes(x = Ratio, y = term_name)) +
  985. geom_point(aes(size = intersection_size, color = -log10(p_value)), alpha = 0.7) +
  986. scale_color_gradient(
  987. low = "#0072B2",
  988. high = "#D55E00",
  989. breaks = c(min(-log10(Syn_4c_CA_up_genes$p_value)),
  990. max(-log10(Syn_4c_CA_up_genes$p_value))),
  991. labels = c(
  992. paste0(round(min(-log10(Syn_4c_CA_up_genes$p_value)), 2)),
  993. paste0(round(max(-log10(Syn_4c_CA_up_genes$p_value)), 2))
  994. )
  995. ) + # Color based on p-value with custom breaks
  996. scale_size(range = c(5, 10)) + # Adjust bubble sizes
  997. labs(size = "Intersection Size\n", color = "-log10(p-value)\n", y = NULL) + # Axis and legend labels
  998. theme_minimal() + # Clean theme
  999. theme(
  1000. axis.text.y = element_text(size = 35), # Adjust y-axis text size
  1001. axis.text.x = element_text(size = 30, hjust = 1), # Adjust x-axis text size and angle
  1002. axis.title.x = element_text(size = 35), # Adjust x-axis title size
  1003. legend.title = element_text(size = 30), # Font size of legend title
  1004. legend.text = element_text(size = 25),
  1005. legend.spacing.y = unit(2, "cm") # Increase spacing between legend title and text
  1006. )
  1007. pdf("/VariancePartitioning/4c_vs_CA_BubbleUp_VariancePartition_Syn.pdf",
  1008. width = 22.5, height = 13.5, bg = "transparent")
  1009. print(Bubble_4c_CA_1)
  1010. dev.off() # Close the device
  1011. # Apply the updated code for down genes without text wrapping
  1012. Syn_4c_CA_down_genes <- gost_down_genes_compare4c_CA$result %>%
  1013. filter(source %in% c("GO:BP", "GO:CC", "GO:MF", "KEGG")) %>%
  1014. mutate(Ratio = intersection_size / term_size) %>%
  1015. group_by(source) %>%
  1016. slice_min(p_value, n = 7) %>%
  1017. ungroup() %>%
  1018. mutate(term_name = factor(term_name, levels = unique(term_name))) # Maintain original order
  1019. # Plot for down genes GO
  1020. Bubble_4c_CA_2 <- ggplot(Syn_4c_CA_down_genes, aes(x = Ratio, y = term_name)) +
  1021. geom_point(aes(size = intersection_size, color = -log10(p_value)), alpha = 0.7) +
  1022. scale_color_gradient(
  1023. low = "#0072B2",
  1024. high = "#D55E00",
  1025. breaks = c(min(-log10(Syn_4c_CA_down_genes$p_value)),
  1026. max(-log10(Syn_4c_CA_down_genes$p_value))),
  1027. labels = c(
  1028. paste0(round(min(-log10(Syn_4c_CA_down_genes$p_value)), 2)),
  1029. paste0(round(max(-log10(Syn_4c_CA_down_genes$p_value)), 2))
  1030. )
  1031. ) + # Color based on p-value with custom breaks
  1032. scale_size(range = c(5, 10)) + # Adjust bubble sizes
  1033. labs(size = "Intersection Size\n", color = "-log10(p-value)\n", y = NULL) + # Axis and legend labels
  1034. theme_minimal() + # Clean theme
  1035. theme(
  1036. axis.text.y = element_text(size = 35), # Adjust y-axis text size
  1037. axis.text.x = element_text(size = 30, hjust = 1), # Adjust x-axis text size and angle
  1038. axis.title.x = element_text(size = 35), # Adjust x-axis title size
  1039. legend.title = element_text(size = 30), # Font size of legend title
  1040. legend.text = element_text(size = 25),
  1041. legend.spacing.y = unit(2, "cm") # Increase spacing between legend title and text
  1042. )
  1043. pdf("/VariancePartitioning/4c_vs_CA_BubbleDown_VariancePartition_Syn.pdf",
  1044. width = 22.5, height = 13.5, bg = "transparent")
  1045. print(Bubble_4c_CA_2)
  1046. dev.off() # Close the device

Dream_Synaptosome_DE_code.R, under CC-BY-4.0 · at the source

Overview

Authors: Huanhuan Chen1, Ye Wei1, Luminiţa Ruje2,3, Fusheng Du1, Zhendong Feng4, Qi Wan5, Mikhail Spivakov2,3, Oleg O. Glebov1,6
  1. Institute of Neuroregeneration and Neurorehabilitation, Qingdao University, Qingdao, Shandong, China
  2. MRC Laboratory of Medical Sciences, London, United Kingdom
  3. Institute of Clinical Sciences, Imperial College, London, United Kingdom
  4. Department of Neurobiology, School of Basic Medical Sciences, National Institute on Drug Dependence, Peking University, Beijing, China
  5. Faculty of Life and Health, Shenzhen University of Advanced Technology, Shenzhen, Guangdong, China
  6. Department of Psychological Medicine, Institute of Psychiatry, Psychology & Neuroscience, King’s College London, London, United Kingdom
Journal: PLoS biology, volume 24, issue 3, article e3003608
Dates: received 26 August 2025; accepted 6 January 2026; published online 2 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pbio.3003608 · PMID 41770794 · PMCID PMC12981561 · OpenAlex W7133243098
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), histology / microscopy (modality), rat (organism), stroke (population), cellular / molecular (subfield)
Methods: Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Connectivity, Machine learning, fMRI & imaging
MeSH: Brain*, Brain Ischemia*, Ischemic Stroke*, Neuronal Plasticity*, Stroke*, Synapses*, Animals, Infarction, Middle Cerebral Artery, Male, Proteomics, Rats, Rats, Sprague-Dawley, Receptors, N-Methyl-D-Aspartate (* major topic)
Journal subjects: Medicine and Health Sciences, Medical Conditions, Cerebrovascular Diseases, Stroke, Ischemic Stroke, Neurology, Vascular Medicine, Biology and Life Sciences, Anatomy, Nervous System, Synapses, Synaptosomes, Physiology, Electrophysiology, Neurophysiology, Neuroscience, Genetics, Gene Expression, Research and Analysis Methods, Specimen Preparation and Treatment, Staining, Immunostaining, Cellular Neuroscience, Synaptic Plasticity, Developmental Neuroscience, Ischemia
Topic: Neuroscience and Neuropharmacology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Citations: cited by 2 papers (Europe PMC); 114 references in the paper

Abstract

Physiological mechanisms of the key hyperacute (0–24 hours) stage of stroke are poorly understood, hampering the development of new therapies. Synaptic plasticity has been strongly implicated in early stages of neurodegenerative and neurodevelopmental disorders, yet its relevance in early stroke remains unclear. Here, we describe the emergence of distinct region-specific forms of synaptic remodeling following middle cerebral artery occlusion in rats, arising within the critical 4-hour period. Synapses within the severely ischemic core region were rapidly lost, while those in the mildly ischemic penumbra, albeit largely structurally intact, were functionally diminished. In contrast, the contralateral cortex exhibited increased synaptic staining and synaptic vesicle cycling. Systemic pharmacological blockade of NMDA-type glutamate receptors abolished contralateral synaptic increase and exacerbated synaptic decline in the penumbra. Proteomic and transcriptomic analyses showed that cross-brain synaptic plasticity is independent of local gene expression and revealed metabolic rearrangement and synaptic downregulation in the penumbra. These findings identify brain-wide synaptic rebalancing as a potential mechanism for rapid functional compensation in hyperacute stroke, highlighting the extent of brain response to acute perturbation.

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 1 match between paragraphs and lines of code.

Zenodo 17987265

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Languages: R (1)
Size: 1 file, 1 script
Software Heritage: not checked
Found in: “Data Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: cowplot (1 file), DESeq2 (1 file), edgeR (1 file), patchwork (1 file), tidyverse (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
1 file

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;
  • 1 script, each with its path and the digest of its content;
  • 1 match 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

Data links

Data Availability

All relevant data are contained within the paper and its Supporting information files, or freely available online. Proteomics data were analyzed by Oe Biotech using a proprietary pipeline. Mass spectrometry proteomics data is available at ProteomeXchange (https://proteomecentral.proteomexchange.org, dataset identifier PXD058834). Custom code for gene expression analysis has been uploaded to Zenodo (https://zenodo.org/records/17987265). RNAseq data is available at GEO (https://www.ncbi.nlm.nih.gov/geo/, accession number GSE283465). Numerical data is presented in S1 Table.

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

Recorded: type, language, journal, volume, issue, pages, dates, 8 authors, 13 MeSH terms, 3 funders, 113 references.

Cite

This paper

Chen, H., Wei, Y., Ruje, L., Du, F., Feng, Z., Wan, Q., Spivakov, M., & Glebov, O. O. (2026). Ischemic stroke triggers brain-wide synaptic remodeling within four hours. PLoS biology, 24(3), e3003608. https://doi.org/10.1371/journal.pbio.3003608

BibTeX

@article{chen2026ischemic,
author = {Chen, Huanhuan and Wei, Ye and Ruje, Luminiţa and Du, Fusheng and Feng, Zhendong and Wan, Qi and Spivakov, Mikhail and Glebov, Oleg O.},
title = {{Ischemic stroke triggers brain-wide synaptic remodeling within four hours}},
journal = {PLoS biology},
year = {2026},
month = mar,
volume = {24},
number = {3},
pages = {e3003608},
publisher = {PLOS},
issn = {1544-9173},
doi = {10.1371/journal.pbio.3003608},
url = {https://doi.org/10.1371/journal.pbio.3003608},
pmid = {41770794},
pmcid = {PMC12981561}
}

RIS

TY - JOUR
AU - Chen, Huanhuan
AU - Wei, Ye
AU - Ruje, Luminiţa
AU - Du, Fusheng
AU - Feng, Zhendong
AU - Wan, Qi
AU - Spivakov, Mikhail
AU - Glebov, Oleg O.
TI - Ischemic stroke triggers brain-wide synaptic remodeling within four hours
T2 - PLoS biology
J2 - PLoS Biol
PY - 2026
DA - 2026/03/02
VL - 24
IS - 3
SP - e3003608
SN - 1544-9173
PB - PLOS
DO - 10.1371/journal.pbio.3003608
UR - https://doi.org/10.1371/journal.pbio.3003608
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pbio.3003608",
"type": "article-journal",
"title": "Ischemic stroke triggers brain-wide synaptic remodeling within four hours",
"container-title": "PLoS biology",
"author": [
{
"family": "Chen",
"given": "Huanhuan"
},
{
"family": "Wei",
"given": "Ye"
},
{
"family": "Ruje",
"given": "Luminiţa"
},
{
"family": "Du",
"given": "Fusheng"
},
{
"family": "Feng",
"given": "Zhendong"
},
{
"family": "Wan",
"given": "Qi"
},
{
"family": "Spivakov",
"given": "Mikhail"
},
{
"family": "Glebov",
"given": "Oleg O."
}
],
"container-title-short": "PLoS Biol",
"volume": "24",
"issue": "3",
"page": "e3003608",
"DOI": "10.1371/journal.pbio.3003608",
"PMID": "41770794",
"PMCID": "PMC12981561",
"ISSN": "1544-9173",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pbio.3003608",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
2
]
]
}
}

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.celrep.2026.117500 [code]
Spatio-molecular gene expression reflects dorsal anterior cingulate cortex structure and function in the human brain.
Journal: Cell reports
In common: edgeR, cowplot, patchwork, 1 other tool, histology / microscopy, genetics / omics, cellular / molecular, 2 references
[2] doi:10.1016/j.xcrm.2026.102766 [code]
A longitudinal single-cell and spatial multiomic atlas of pediatric high-grade glioma.
Journal: Cell reports. Medicine
In common: edgeR, DESeq2, cowplot, 2 other tools, genetics / omics, cellular / molecular, 1 reference
[3] doi:10.1002/advs.202521254 [code]
Persistently Increased Expression of PKMzeta and Unbiased Gene Expression Profiles Identify Hippocampal Molecular Traces of a Long-Term Active Place Avoidance Memory and "Shadow" Proteins.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: DESeq2, cowplot, tidyverse, rat, histology / microscopy, genetics / omics, 1 other category, 2 references
[4] doi:10.1186/s12974-026-03885-1 [code]
Shared transcriptomic signatures in perilesional and contralesional cortex after ischemic stroke.
Journal: Journal of neuroinflammation
In common: cowplot, tidyverse, stroke, genetics / omics, cellular / molecular, 3 references
[5] doi:10.1002/imt2.70163 [code]
Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.
Journal: iMeta
In common: edgeR, DESeq2, cowplot, 2 other tools, genetics / omics, cellular / molecular
[6] doi:10.3389/fnmol.2026.1844705 [code]
Risperidone regulates the expression of schizophrenia-related genes in the forebrain of adult male mice.
Journal: Frontiers in molecular neuroscience
In common: edgeR, DESeq2, cowplot, 2 other tools, genetics / omics, cellular / molecular
[7] doi:10.1038/s41467-026-73305-8 [code]
Comparative analysis of the cellular landscape in mammalian striatum.
Journal: Nature communications
In common: edgeR, DESeq2, cowplot, 2 other tools, genetics / omics, cellular / molecular
[8] doi:10.1038/s41593-026-02300-5 [code]
Integrated single-cell and spatial transcriptomic profiling in ALS uncovers peripheral-to-central immune infiltration and reprogramming.
Journal: Nature neuroscience
In common: edgeR, DESeq2, cowplot, 2 other tools, genetics / omics, cellular / molecular
[9] doi:10.1016/j.celrep.2026.117073 [code]
Single-cell epigenomics uncovers heterochromatin instability and transcription factor dysfunction during mouse brain aging.
Journal: Cell reports
In common: edgeR, DESeq2, cowplot, 2 other tools, genetics / omics, cellular / molecular
[10] doi:10.1038/s41467-026-70232-6 [code]
Gene expression dynamics of human and mouse craniofacial development at the single-cell level.
Journal: Nature communications
In common: edgeR, DESeq2, cowplot, 2 other tools, genetics / omics, cellular / molecular

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.

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.