OSCR

Diurnal choroid plexus function in mice depends on sex, age, and amyloid-β status.

Code ↔ Paper

9 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 9 matches
  1. [1] § Results › Diurnal regulation of Aqp1 and NKCC1 at the transcript level in the aged ChP ↔ deseq2 feb 2023.Rmd, lines 1088–1113 · score 1.00 · carbonic anhydrases, ATP synthase, Atp5b, Slc12a4, Slc12a7, Slc25a28
  2. [2] § Results › Comparison of gene expression across different datasets ↔ deseq2 feb 2023.Rmd, lines 1088–1113 · score 0.72 · Slc22a8, Nr1d2, Nr1d1, Bhlhe41, Ciart, Per3
  3. [3] § Methods › Transcriptomic analysis ↔ deseq2 feb 2023.Rmd, lines 49–163 · score 0.68 · AnnotationDbi, DESeq2, log2 fold change, pheatmap, threshold, dplyr
  4. [4] § Results › Aged mice exhibit altered diurnal transcriptional profile ↔ CP circadian gene validation.Rmd, lines 491–555 · score 0.67 · circadian related genes, nr1d2, nr1d1, Cry, amplitude, mesor
  5. [5] § Methods › Statistics and reproducibility ↔ CP circadian gene validation.Rmd, lines 84–215 · score 0.65 · Kruskall Wallis, Shapiro Wilk
  6. [6] § Results › Young mice exhibit diurnal, transcriptional regulation of the ChP, that is not significantly impacted by acute sleep disruption ↔ CP circadian gene validation.Rmd, lines 491–555 · score 0.60 · nr1d2, nr1d1, related genes, Cry, validated, Dbp
  7. [7] § Results › Comparison of gene expression across different datasets ↔ genecompare.R, lines 891–976 · score 0.54 · biological processes, Molecular function, downregulated, pseudotime, ZT, compartment
  8. [8] § Results › Diurnal regulation of Aqp1 and NKCC1 at the transcript level in the aged ChP ↔ deseq2 feb 2023.Rmd, lines 1190–1317 · score 0.54 · slc12a2, log2 fold change, related genes, junctional, amyloid, proteins
  9. [9] § Results › Comparison of gene expression across different datasets ↔ genecompare.R, lines 891–976 · score 0.53 · cellular compartment, biological processes, molecular function, Pathway, clusterProfiler, young

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 Markdown · 1,396 lines · 58 KB · CC-BY-4.0 · 4 matches

  1. ---
  2. title: "DESEQ CP circadian data"
  3. output: html_document
  4. date: "2023-02-22"
  5. editor_options:
  6. chunk_output_type: console
  7. ---
  8. #Analysis of RNAseq data from sleep/circadian choroid plexus
  9. ###There are several different ways to analyze this data as there are 3 conditions, awake, asleep and sleep disrupted. Previous analysis showed no significant difference between sleep and sleep disrupted although there was a difference in the sig genes that were changed compared to awake state. So will explore all these options.
  10. ###Note: Awake (AW) is Night, sleep (SL) and sleep disrupted (SD) are Day. comparison will be done Awake vs SL or SD, OR Night vs Day
  11. Install required packages
  12. if (!require("BiocManager", quietly = TRUE))
  13. install.packages("BiocManager")
  14. BiocManager::install("DESeq2")
  15. BiocManager::install("org.Mm.eg.db")
  16. install.packages()
  17. install.packages("Hmisc")
  18. BiocManager::install("ComplexHeatmap")
  19. if (!require("BiocManager", quietly = TRUE))
  20. install.packages("BiocManager")
  21. BiocManager::install("EnhancedVolcano")
  22. install.packages("vsn")
  23. setwd("~/Documents/Iliff lab /Experiments/Expt 13 sleep study mouse choroid plexus/Circadian R folder/deseq2 feb2023 r markdown file output")
  24. ```{r setup, include=FALSE}
  25. knitr::opts_chunk$set(echo = TRUE)
  26. library(ComplexHeatmap)
  27. library(pheatmap)
  28. library(tidyverse)
  29. library(dplyr)
  30. library(DESeq2)
  31. library(RColorBrewer)
  32. library(AnnotationDbi)
  33. library(org.Mm.eg.db)
  34. library(reshape)
  35. library(viridis)
  36. library(Hmisc)
  37. library(EnhancedVolcano)
  38. ```
  39. #QC of the samples
  40. ```{r }
  41. dds_raw<-read.csv("3mocounts.csv", row.names = 1)
  42. metadata<-read.csv("3mometadata.csv", row.names = 1)
  43. metadata$Condition<-factor(metadata$Condition, levels=c("AW", "SL", "SD"))
  44. metadata$TimeOfDay<-factor(metadata$TimeOfDay, levels=c("Night", "Day"))
  45. View(metadata)
  46. #explore
  47. rownames(metadata)
  48. colnames(dds_raw)
  49. #make sure the rows and columns match
  50. all(rownames(metadata) == colnames(dds_raw))
  51. #creating the DESeq2 object, using sleep/wake state
  52. dds_raw<-DESeqDataSetFromMatrix(countData = dds_raw, colData = metadata, design = ~ Condition )
  53. #pre-filtering
  54. #smallestGroupSize<-4
  55. #keep<-rowSums(counts(dds_raw) >= smallestGroupSize)
  56. #dds_raw<-dds_raw[keep,]
  57. #cuts from 29179 genes to 17701- this is too strict as circadian differences are subtle. if using this cutoff no sig DEGs
  58. #run DESeq2
  59. dds_raw<-DESeq(dds_raw)
  60. res_raw<-results(dds_raw)
  61. res_raw
  62. #determine size factors to use for normalization
  63. dds_raw <- estimateSizeFactors(dds_raw)
  64. dds_raw <- estimateDispersions(dds_raw)
  65. dds_raw <- nbinomWaldTest(dds_raw)
  66. sizeFactors(dds_raw)
  67. #extract the normalized counts
  68. normalized_counts <-counts(dds_raw, normalized = TRUE)
  69. ###Getting the ENTREZID as rownames for the damn dataframe.
  70. normalized_counts <- data.frame(ENTREZID=row.names(normalized_counts), normalized_counts)
  71. View(normalized_counts)
  72. write.csv(normalized_counts, file="normalized_counts_3mo_all.csv")
  73. #perform unsupervised clustering analysis:log transformation
  74. nrow(dds_raw)
  75. vsd_dds_raw <- vst(dds_raw, blind = TRUE)
  76. vsd_mat_dds_raw <- assay(vsd_dds_raw)
  77. vsd_cor_dds_raw <- cor(vsd_mat_dds_raw)
  78. View(vsd_cor_dds_raw)
  79. pheatmap(vsd_cor_dds_raw, cluster_rows = TRUE, cluster_cols = TRUE)
  80. pheatmap(vsd_cor_dds_raw, annotation = dplyr::select(metadata, TimeOfDay))
  81. pheatmap(vsd_cor_dds_raw, annotation = dplyr::select(metadata, Condition))
  82. plotPCA(vsd_dds_raw, intgroup = "Condition")
  83. plotPCA(vsd_dds_raw, intgroup=c("Condition", "TimeOfDay"))
  84. ###############################################################
  85. padj.cutoff <- 0.05
  86. log2FoldChange.cutoff <- 0.58
  87. dds_raw_AW_SL<-dds_raw
  88. design(dds_raw_AW_SL)<-formula(~Condition)
  89. dds_raw_AW_SL$Condition<-factor(dds_raw_AW_SL$Condition, levels=c("AW", "SL", "SD"))
  90. dds_raw_AW_SL<-DESeq(dds_raw_AW_SL)
  91. res_rawAWvsSL<-results(dds_raw_AW_SL, contrast = c("Condition", "SL", "AW"))
  92. res_rawAWvsSL_df <- as.data.frame(res_rawAWvsSL)
  93. res_rawAWvsSL_df<-tibble::rownames_to_column(res_rawAWvsSL_df, "ENTREZID")
  94. res_rawAWvsSL_df$ENTREZID<- as.character(res_rawAWvsSL_df$ENTREZID)
  95. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_rawAWvsSL_df$ENTREZID,
  96. columns=c("SYMBOL","GENENAME"),
  97. keytype="ENTREZID")
  98. res_rawAWvsSL_df <- left_join(res_rawAWvsSL_df,anno,by="ENTREZID")
  99. #for some reason the annotation put gene ID 11865 to Bmal instead of Arntl so need to replace this gene and make consistent with the old/AD datasets
  100. res_rawAWvsSL_df$SYMBOL[res_rawAWvsSL_df$ENTREZID == "11865"]<-"Arntl"
  101. res_rawAWvsSL_df$GENENAME[res_rawAWvsSL_df$ENTREZID == "11865"]<-"aryl hydrocarbon receptor nuclear translocator-like"
  102. save(res_rawAWvsSL_df, file="raw_AWvsSL_3mo.Rdata")
  103. threshold <- res_rawAWvsSL_df$padj < padj.cutoff & abs(res_rawAWvsSL_df$log2FoldChange) > log2FoldChange.cutoff
  104. length(which(threshold))
  105. res_rawAWvsSL_df$threshold <- threshold
  106. sig_res_rawAWvsSL <- data.frame(subset(res_rawAWvsSL_df, threshold==TRUE), row.names = 1)
  107. dim(sig_res_rawAWvsSL)
  108. sig_res_rawAWvsSL<-na.omit(sig_res_rawAWvsSL)
  109. dim(sig_res_rawAWvsSL)
  110. write.csv(sig_res_rawAWvsSL, file="sig_res_rawAWvsSL.csv")
  111. #save(sig_res_3moAWvsSL, file="sigrawAWvsSL_3mo.Rdata")
  112. par(mfrow=c(2,3))
  113. plotCounts(dds_raw_AW_SL, "217166", intgroup = "TimeOfDay", main = "Nr1d1")
  114. plotCounts(dds_raw_AW_SL, "11865", intgroup = "TimeOfDay", main = "Arntl")
  115. plotCounts(dds_raw_AW_SL, "12952", intgroup = "TimeOfDay", main = "Cry1")
  116. plotCounts(dds_raw_AW_SL, "233908", intgroup = "TimeOfDay", main = "Fus")
  117. plotCounts(dds_raw_AW_SL, "74840", intgroup = "TimeOfDay", main = "Manf")
  118. plotCounts(dds_raw_AW_SL, "18030", intgroup = "TimeOfDay", main = "Nfil3")
  119. plotCounts(dds_raw_AW_SL, "217166", intgroup = "Condition", main = "Nr1d1")
  120. plotCounts(dds_raw_AW_SL, "11865", intgroup = "Condition", main = "Arntl")
  121. plotCounts(dds_raw_AW_SL, "12952", intgroup = "Condition", main = "Cry1")
  122. plotCounts(dds_raw_AW_SL, "233908", intgroup = "Condition", main = "Fus")
  123. plotCounts(dds_raw_AW_SL, "74840", intgroup = "Condition", main = "Manf")
  124. plotCounts(dds_raw_AW_SL, "18030", intgroup = "Condition", main = "Nfil3")
  125. assays(dds_raw)[["cooks"]]
  126. summary(res_raw)
  127. par(mar=c(8,5,2,2))
  128. boxplot(log10(assays(dds_raw)[["cooks"]]), range=0, las=2)
  129. #removing sample #12 going forward as it is an outlier by PCA, and failed RNAseq QC
  130. ```
  131. ```{r running DESEQ2 on count data obtained from galaxy alignment}
  132. #make a dds file from galaxy generated normalized counts (rlog)
  133. #sample 12 is an outlier so remove from anlaysis (from previous analysis)
  134. dds_3mo<-read.csv("3mocounts.csv", row.names = 1)
  135. dds_3mo<-dds_3mo[ , c(-7)]
  136. View(dds_3mo)
  137. metadata<-read.csv("3mometadata.csv", row.names = 1)
  138. metadata<-metadata[c(-7), ]
  139. metadata$Condition<-factor(metadata$Condition, levels=c("AW", "SL", "SD"))
  140. metadata$TimeOfDay<-factor(metadata$TimeOfDay, levels=c("Night", "Day"))
  141. View(metadata)
  142. #explore
  143. rownames(metadata)
  144. colnames(dds_3mo)
  145. #make sure the rows and columns match
  146. all(rownames(metadata) == colnames(dds_3mo))
  147. ```
  148. #Comparing the AW vs SL or SD, including all 3 conditions for now
  149. ```{r}
  150. #creating the DESeq2 object, using *sleep condition as condition
  151. dds_3mo_cond<-DESeqDataSetFromMatrix(countData = dds_3mo, colData = metadata, design = ~ Condition)
  152. #determine size factors to use for normalization
  153. dds_3mo_cond <- estimateSizeFactors(dds_3mo_cond)
  154. sizeFactors(dds_3mo_cond)
  155. #extract the normalized counts
  156. normalized_counts_3mo_cond <-counts(dds_3mo_cond, normalized = TRUE)
  157. View(normalized_counts_3mo)
  158. write.csv(normalized_counts_3mo_cond, file="normalized_counts_3mo_cond_no12.csv")
  159. ###Getting the ENTREZID as rownames for the damn dataframe.
  160. normalized_counts_3mo_cond_df <- data.frame(ENTREZID=row.names(normalized_counts_3mo_cond), normalized_counts_3mo_cond)
  161. #perform unsupervised clustering analysis:log transformation
  162. nrow(dds_3mo_cond)
  163. vsd_3mo_cond <- vst(dds_3mo_cond, blind = TRUE)
  164. vsd_mat_3mo_cond <- assay(vsd_3mo_cond)
  165. vsd_cor_3mo_cond <- cor(vsd_mat_3mo_cond)
  166. View(vsd_cor_3mo_cond)
  167. ```
  168. ```{r}
  169. #DEG
  170. dds_3mo_cond<-DESeq(dds_3mo_cond)
  171. res<-results(dds_3mo_cond, contrast = c("Condition", "SD", "SL")) #this should give AW vs SL AW vs SD and SD vs SL
  172. ```
  173. Time of Day analysis comparing the AW animals to the grouped SL and SD animals together
  174. ```{r}
  175. #creating the DESeq2 object, using *TimeOfDay as condition
  176. dds_3mo<-DESeqDataSetFromMatrix(countData = dds_3mo, colData = metadata, design = ~ TimeOfDay)
  177. #determine size factors to use for normalization
  178. dds_3mo <- estimateSizeFactors(dds_3mo)
  179. sizeFactors(dds_3mo)
  180. #extract the normalized counts
  181. normalized_counts_3mo <-counts(dds_3mo, normalized = TRUE)
  182. View(normalized_counts_3mo)
  183. write.csv(normalized_counts_3mo, file="normalized_counts_3mo_ToD_no12.csv")
  184. ###Getting the ENTREZID as rownames for the damn dataframe.
  185. normalized_counts_3mo_df <- data.frame(ENTREZID=row.names(normalized_counts_3mo), normalized_counts_3mo)
  186. #perform unsupervised clustering analysis:log transformation
  187. nrow(dds_3mo)
  188. vsd_3mo <- vst(dds_3mo, blind = TRUE)
  189. vsd_mat_3mo <- assay(vsd_3mo)
  190. vsd_cor_3mo <- cor(vsd_mat_3mo)
  191. View(vsd_cor_3mo)
  192. ```
  193. #Running the DESEQ2 with multifactorial effect of timeofday with condition as covariate
  194. ```{r}
  195. #create a copy of the DESeqDataSet to run the multi-factor design
  196. ddsMFtime<-dds_3mo
  197. levels(ddsMFtime$Condition)
  198. #make SD to AW (as this is their sleep state) to be able to have both condition and time of day as factors (no samples can be have unique factors for each variable)
  199. levels(ddsMFtime$Condition)<-sub("SD", "AW", levels(ddsMFtime$Condition))
  200. design(ddsMFtime)<-formula(~ Condition + TimeOfDay)
  201. ddsMFtime<-DESeq(ddsMFtime)
  202. resMFtime<-results(ddsMFtime)
  203. head(ddsMFtime)
  204. par(mfrow=c(2,3))
  205. plotCounts(ddsMFtime, "217166", intgroup = "TimeOfDay", main = "Nr1d1")
  206. plotCounts(ddsMFtime, "11865", intgroup = "TimeOfDay", main = "Arntl")
  207. plotCounts(ddsMFtime, "12952", intgroup = "TimeOfDay", main = "Cry1")
  208. plotCounts(ddsMFtime, "233908", intgroup = "TimeOfDay", main = "Fus")
  209. plotCounts(ddsMFtime, "74840", intgroup = "TimeOfDay", main = "Manf")
  210. plotCounts(ddsMFtime, "18030", intgroup = "TimeOfDay", main = "Nfil3")
  211. ```
  212. #Running the DESEQ2 with multifactorial effect of condition with time of day as covariate
  213. ```{r}
  214. #create a copy of the DESeqDataSet to run the multi-factor design
  215. ddsMFcond<-dds_3mo
  216. levels(ddsMFcond$Condition)
  217. levels(ddsMFcond$Condition)<-sub("SD", "AW", levels(ddsMFcond$Condition))
  218. #this one is doing the comparison of timeofday taking into account the condition.
  219. #later we'll do the other way around
  220. design(ddsMFcond)<-formula(~TimeOfDay + Condition)
  221. ddsMFcond<-DESeq(ddsMFcond)
  222. resMFcond<-results(ddsMFcond)
  223. head(resMFcond)
  224. par(mfrow=c(2,3))
  225. plotCounts(ddsMFcond, "217166", intgroup = "Condition", main = "Nr1d1")
  226. plotCounts(ddsMFcond, "11865", intgroup = "Condition", main = "Arntl")
  227. plotCounts(ddsMFcond, "12952", intgroup = "Condition", main = "Cry1")
  228. plotCounts(ddsMFcond, "233908", intgroup = "Condition", main = "Fus")
  229. plotCounts(ddsMFcond, "74840", intgroup = "Condition", main = "Manf")
  230. plotCounts(ddsMFcond, "18030", intgroup = "Condition", main = "Nfil3")
  231. ```
  232. ## Visualizing sample distribution
  233. ```{r pressure, echo=FALSE}
  234. pheatmap(vsd_cor_3mo, cluster_rows = TRUE, cluster_cols = TRUE)
  235. pheatmap(vsd_cor_3mo, annotation = dplyr::select(metadata, TimeOfDay))
  236. plotPCA(vsd_3mo, intgroup = "Condition")
  237. plotPCA(vsd_3mo, intgroup=c("Condition", "TimeOfDay"))
  238. ```
  239. ###Visualizing the data with norm counts and heatmaps from top genes
  240. ```{r}
  241. ### Set thresholds
  242. padj.cutoff <- 0.05
  243. log2FoldChange.cutoff <- 0.58
  244. #need to make into data frame to get gene symbols
  245. library(tibble)
  246. resMF_df <- as.data.frame(resMFtime)
  247. resMF_df<-tibble::rownames_to_column(resMF_df, "ENTREZID")
  248. resMF_df$ENTREZID<- as.character(resMF_df$ENTREZID)
  249. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=resMF_df$ENTREZID,
  250. columns=c("SYMBOL","GENENAME"),
  251. keytype="ENTREZID")
  252. resMF_df <- left_join(resMF_df,anno,by="ENTREZID")
  253. threshold <- resMF_df$padj < padj.cutoff & abs(resMF_df$log2FoldChange) > log2FoldChange.cutoff
  254. length(which(threshold))
  255. resMF_df$threshold <- threshold
  256. sig_resMF <- data.frame(subset(resMF_df, threshold==TRUE), row.names = 1)
  257. dim(sig_resMF)
  258. write.csv(sig_resMF, file="sig_resMF.csv")
  259. save(sig_resMF, file="sigToDMF_3mo.Rdata")
  260. ###For condition accounting for ToD
  261. resMFcond_df <- as.data.frame(resMFcond)
  262. resMFcond_df<-tibble::rownames_to_column(resMFcond_df, "ENTREZID")
  263. resMFcond_df$ENTREZID<- as.character(resMFcond_df$ENTREZID)
  264. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=resMFcond_df$ENTREZID,
  265. columns=c("SYMBOL","GENENAME"),
  266. keytype="ENTREZID")
  267. resMFcond_df <- left_join(resMFcond_df,anno,by="ENTREZID")
  268. threshold <- resMFcond_df$padj < padj.cutoff & abs(resMFcond_df$log2FoldChange) > log2FoldChange.cutoff
  269. length(which(threshold))
  270. resMFcond_df$threshold <- threshold
  271. sig_resMFcond <- data.frame(subset(resMFcond_df, threshold==TRUE), row.names = 1)
  272. dim(sig_resMFcond)
  273. save(sig_resMFcond, file="sigcondMF_3mo.Rdata")
  274. #actually nothing is significant so it gives 0 results
  275. ```
  276. ```{r volcano plot}
  277. #looking at timeofday differences accounting for condition
  278. sig_resMF %>% drop_na("SYMBOL")
  279. EnhancedVolcano(resMF_df,
  280. lab = resMF_df$SYMBOL,
  281. x = 'log2FoldChange',
  282. y = 'padj',
  283. title="Night vs Day (accounting for sleep condition)",
  284. subtitle = NULL,
  285. xlim = c(-2.5,2.5),
  286. col=c('grey','black','purple' , 'orange1'),
  287. pCutoff = 10e-6,
  288. FCcutoff = 0.58,
  289. pointSize = 2.0,
  290. labSize = 3,
  291. axisLabSize=10)
  292. #saved as 7x7 pdf "Enhanced_volcano_young_timeofday_accounting_for_condition
  293. ```
  294. #This would be to run the samples ignoring the Condition, since when comparing condition accounting for time of day there are no significant differences
  295. ```{r}
  296. #DEG
  297. dds_3mo<-DESeq(dds_3mo)
  298. res<-results(dds_3mo, contrast = c("TimeOfDay", "Night", "Day"))
  299. ```
  300. ```{r}
  301. res_df <- as.data.frame(res)
  302. res_df<-tibble::rownames_to_column(res_df, "ENTREZID")
  303. res_df$ENTREZID<- as.character(res_df$ENTREZID)
  304. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_df$ENTREZID,
  305. columns=c("SYMBOL","GENENAME"),
  306. keytype="ENTREZID")
  307. res_df <- left_join(res_df,anno,by="ENTREZID")
  308. threshold <- res_df$padj < padj.cutoff & abs(res_df$log2FoldChange) > log2FoldChange.cutoff
  309. length(which(threshold))
  310. res_df$threshold <- threshold
  311. sig_res <- data.frame(subset(res_df, threshold==TRUE), row.names = 1)
  312. dim(sig_res)
  313. save(sig_res, file="sigToD_3mo.Rdata")
  314. ```
  315. ```{r volcano plot}
  316. #plot ignoring the condition variable and just comparing time of day effects
  317. EnhancedVolcano(res_df,
  318. lab = res_df$SYMBOL,
  319. x = 'log2FoldChange',
  320. y = 'padj',
  321. title="Night vs Day (ignoring sleep condition)",
  322. subtitle = NULL,
  323. xlim = c(-2.5,2.5),
  324. col=c('grey','black','purple' , 'orange1'),
  325. pCutoff = 10e-6,
  326. FCcutoff = 0.58,
  327. pointSize = 2.0,
  328. labSize = 3,
  329. axisLabSize=10)
  330. #saved as pdf 7x7 "Enhanced_volcano_young_timeofday_ignoring_for_condition"
  331. ```
  332. #DEG analysis of SL vs AW and SD vs AW
  333. ```{r}
  334. dds_3mo_AW_SL<-dds_3mo
  335. design(dds_3mo_AW_SL)<-formula(~Condition)
  336. dds_3mo_AW_SL$Condition<-factor(dds_3mo_AW_SL$Condition, levels=c("AW", "SL", "SD"))
  337. dds_3mo_AW_SL<-DESeq(dds_3mo_AW_SL)
  338. res_3moAWvsSL<-results(dds_3mo_AW_SL, contrast = c("Condition", "SL", "AW"))
  339. res_3moAWvsSL_df <- as.data.frame(res_3moAWvsSL)
  340. res_3moAWvsSL_df<-tibble::rownames_to_column(res_3moAWvsSL_df, "ENTREZID")
  341. res_3moAWvsSL_df$ENTREZID<- as.character(res_3moAWvsSL_df$ENTREZID)
  342. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_3moAWvsSL_df$ENTREZID,
  343. columns=c("SYMBOL","GENENAME"),
  344. keytype="ENTREZID")
  345. res_3moAWvsSL_df <- left_join(res_3moAWvsSL_df,anno,by="ENTREZID")
  346. #for some reason the annotation put gene ID 11865 to Bmal instead of Arntl so need to replace this gene and make consistent with the old/AD datasets
  347. res_3moAWvsSL_df$SYMBOL[res_3moAWvsSL_df$ENTREZID == "11865"]<-"Arntl"
  348. res_3moAWvsSL_df$GENENAME[res_3moAWvsSL_df$ENTREZID == "11865"]<-"aryl hydrocarbon receptor nuclear translocator-like"
  349. save(res_3moAWvsSL_df, file="allAWvsSL_3mo.Rdata")
  350. threshold <- res_3moAWvsSL_df$padj < padj.cutoff & abs(res_3moAWvsSL_df$log2FoldChange) > log2FoldChange.cutoff
  351. length(which(threshold))
  352. res_3moAWvsSL_df$threshold <- threshold
  353. sig_res_3moAWvsSL <- data.frame(subset(res_3moAWvsSL_df, threshold==TRUE), row.names = 1)
  354. dim(sig_res_3moAWvsSL)
  355. sig_res_3moAWvsSL<-na.omit(sig_res_3moAWvsSL)
  356. dim(sig_res_3moAWvsSL)
  357. write.csv(sig_res_3moAWvsSL, file="sig_res_3moAWvsSL.csv")
  358. save(sig_res_3moAWvsSL, file="sigAWvsSL_3mo.Rdata")
  359. ```
  360. #SD vs AW
  361. ```{r}
  362. dds_3mo_AW_SD<-dds_3mo
  363. design(dds_3mo_AW_SD)<-formula(~Condition)
  364. dds_3mo_AW_SD$Condition<-factor(dds_3mo_AW_SD$Condition, levels=c("AW", "SL", "SD"))
  365. dds_3mo_AW_SD<-DESeq(dds_3mo_AW_SD)
  366. res_3moAWvsSD<-results(dds_3mo_AW_SD, contrast = c("Condition", "SD", "AW"))
  367. res_3moAWvsSD_df <- as.data.frame(res_3moAWvsSD)
  368. res_3moAWvsSD_df<-tibble::rownames_to_column(res_3moAWvsSD_df, "ENTREZID")
  369. res_3moAWvsSD_df$ENTREZID<- as.character(res_3moAWvsSD_df$ENTREZID)
  370. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_3moAWvsSD_df$ENTREZID,
  371. columns=c("SYMBOL","GENENAME"),
  372. keytype="ENTREZID")
  373. res_3moAWvsSD_df <- left_join(res_3moAWvsSD_df,anno,by="ENTREZID")
  374. #for some reason the annotation put gene ID 11865 to Bmal instead of Arntl so need to replace this gene and make consistent with the old/AD datasets
  375. res_3moAWvsSD_df$SYMBOL[res_3moAWvsSD_df$ENTREZID == "11865"]<-"Arntl"
  376. res_3moAWvsSD_df$GENENAME[res_3moAWvsSD_df$ENTREZID == "11865"]<-"aryl hydrocarbon receptor nuclear translocator-like"
  377. save(res_3moAWvsSD_df, file="allAWvsSD_3mo.Rdata")
  378. threshold <- res_3moAWvsSD_df$padj < padj.cutoff & abs(res_3moAWvsSD_df$log2FoldChange) > log2FoldChange.cutoff
  379. length(which(threshold))
  380. res_3moAWvsSD_df$threshold <- threshold
  381. sig_res_3moAWvsSD <- data.frame(subset(res_3moAWvsSD_df, threshold==TRUE), row.names = 1)
  382. dim(sig_res_3moAWvsSD)
  383. sig_res_3moAWvsSD<-na.omit(sig_res_3moAWvsSD)
  384. dim(sig_res_3moAWvsSD)
  385. write.csv(sig_res_3moAWvsSD, file="sig_res_3moAWvsSD.csv")
  386. save(sig_res_3moAWvsSD, file="sigAWvsSD_3mo.Rdata")
  387. ```
  388. #SD vs SL
  389. ```{r}
  390. dds_3mo_SL_SD<-dds_3mo
  391. design(dds_3mo_SL_SD)<-formula(~Condition)
  392. dds_3mo_SL_SD$Condition<-factor(dds_3mo_SL_SD$Condition, levels=c("AW", "SL", "SD"))
  393. dds_3mo_SL_SD<-DESeq(dds_3mo_SL_SD)
  394. res_3moSLvsSD<-results(dds_3mo_SL_SD, contrast = c("Condition", "SD", "SL"))
  395. res_3moSLvsSD_df <- as.data.frame(res_3moSLvsSD)
  396. res_3moSLvsSD_df<-tibble::rownames_to_column(res_3moSLvsSD_df, "ENTREZID")
  397. res_3moSLvsSD_df$ENTREZID<- as.character(res_3moSLvsSD_df$ENTREZID)
  398. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_3moSLvsSD_df$ENTREZID,
  399. columns=c("SYMBOL","GENENAME"),
  400. keytype="ENTREZID")
  401. res_3moSLvsSD_df <- left_join(res_3moSLvsSD_df,anno,by="ENTREZID")
  402. #for some reason the annotation put gene ID 11865 to Bmal instead of Arntl so need to replace this gene and make consistent with the old/AD datasets
  403. res_3moSLvsSD_df$SYMBOL[res_3moSLvsSD_df$ENTREZID == "11865"]<-"Arntl"
  404. res_3moSLvsSD_df$GENENAME[res_3moSLvsSD_df$ENTREZID == "11865"]<-"aryl hydrocarbon receptor nuclear translocator-like"
  405. save(res_3moSLvsSD_df, file="allSLvsSD_3mo.Rdata")
  406. threshold <- res_3moSLvsSD_df$padj < padj.cutoff & abs(res_3moSLvsSD_df$log2FoldChange) > log2FoldChange.cutoff
  407. length(which(threshold))
  408. res_3moSLvsSD_df$threshold <- threshold
  409. sig_res_3moSLvsSD_df <- data.frame(subset(res_3moSLvsSD_df, threshold==TRUE), row.names = 1)
  410. dim(sig_res_3moSLvsSD_df)
  411. sig_res_3moSLvsSD_df<-na.omit(sig_res_3moSLvsSD_df)
  412. dim(sig_res_3moSLvsSD_df)
  413. save(sig_res_3moSLvsSD_df, file="sigSLvsSD_3mo.Rdata")
  414. ```
  415. #Volcano plots of Aw vs SL or AW vs SD
  416. ```{r volcano plot}
  417. #plot ignoring the condition variable and just comparing time of day effects
  418. EnhancedVolcano(res_3moAWvsSL_df,
  419. lab = res_3moAWvsSL_df$SYMBOL,
  420. x = 'log2FoldChange',
  421. y = 'padj',
  422. title="Aw vs SL",
  423. subtitle = NULL,
  424. xlim = c(-2.5,2.5),
  425. col=c('grey','black', 'orange1' , 'red2'),
  426. pCutoff = 0.05,
  427. FCcutoff = 0.58,
  428. pointSize = 2.0,
  429. labSize = 3,
  430. axisLabSize=10)
  431. #saved as pdf 7x7 "Enhanced_volcano_young_AWvsSL"
  432. EnhancedVolcano(res_3moAWvsSD_df,
  433. lab = res_3moAWvsSD_df$SYMBOL,
  434. x = 'log2FoldChange',
  435. y = 'padj',
  436. title="Aw vs SD",
  437. subtitle = NULL,
  438. xlim = c(-2.5,2.5),
  439. col=c('grey','black', 'orange1' , 'red2'),
  440. pCutoff = 0.05,
  441. FCcutoff = 0.58,
  442. pointSize = 2.0,
  443. labSize = 3,
  444. axisLabSize=10)
  445. #saved as pdf 7x7 "Enhanced_volcano_young_AWvsSD"
  446. ```
  447. ```{r}
  448. # identifying genes unique to either AW vs SL or AW vs SD or overlapping
  449. only_AWvsSL<- subset(sig_res_3moAWvsSL, !SYMBOL %in% sig_res_3moAWvsSD$SYMBOL)
  450. save(only_AWvsSL, file="unique_AWvsSL.Rdata")
  451. only_AWvsSD<- subset(sig_res_3moAWvsSD, !SYMBOL %in% sig_res_3moAWvsSL$SYMBOL)
  452. save(only_AWvsSD, file="unique_AWvsSD.Rdata")
  453. both_AWvsSL_AWvsSD<-subset(sig_res_3moAWvsSL, SYMBOL %in% sig_res_3moAWvsSD$SYMBOL)
  454. save(both_AWvsSL_AWvsSD, file="common_AWvsSLandAWvsSD.Rdata")
  455. ```
  456. #Bar plots of RNAseq data young animals AW vs SD, AW vs SL
  457. ```{r bar plots of SL and SD data}
  458. #plotting the DS and SL changes by circadian genes
  459. #join the fold changes from each results dataframe
  460. #subset the data to get just Fc and padj
  461. sd<-res_3moAWvsSD_df[, c("SYMBOL", "padj", "log2FoldChange")] %>% na.omit()
  462. sd<-sd %>% dplyr::rename(
  463. padj_sd = padj,
  464. log2FC_sd = log2FoldChange)
  465. sl<-res_3moAWvsSL_df[, c("SYMBOL", "padj", "log2FoldChange")] %>% na.omit()
  466. sl<-sl %>% dplyr::rename(
  467. padj_sl = padj,
  468. log2FC_sl = log2FoldChange)
  469. #put the data together
  470. SDandSL_DEGs<-inner_join(sd, sl, by= "SYMBOL")
  471. #Add row that has *s or ns for significance
  472. SDandSL_DEGs_symbol<-SDandSL_DEGs %>%
  473. mutate(p_symbol_sd=case_when(padj_sd<0.001 ~ "***"
  474. , padj_sd<0.01 ~ "**"
  475. , padj_sd<0.05 ~ "*"
  476. , TRUE ~ "ns")) %>%
  477. mutate(p_symbol_sl=case_when(padj_sl<0.001 ~ "***"
  478. , padj_sl<0.01 ~ "**"
  479. , padj_sl<0.05 ~ "*"
  480. , TRUE ~ "ns"))
  481. #just getting log2FC data
  482. SDandSL_DEGs_FC<-SDandSL_DEGs[, c("SYMBOL", "log2FC_sd", "log2FC_sl")] %>% pivot_longer(col=!SYMBOL, names_to = "sleep_group", names_prefix="log2FC_", values_to = "log2FC")
  483. #getting log2FC and padj values
  484. SDandSL_DEGs_FC_padj<-SDandSL_DEGs %>%
  485. pivot_longer(col=!SYMBOL,
  486. names_to = c("measure", "sleep_group"),
  487. names_sep= "_",
  488. values_to = "value")
  489. SDandSL_DEGs_FC_padj %>% pivot_wider(names_from = "measure", values_from = "value") %>% ggplot(aes(x=SYMBOL, y=log2FC, fill=sleep_group)) + geom_bar(stat="identity")
  490. circadian_genes<-c("Nr1d1", "Nr1d2", "Manf", "Fus", "Ciart", "Dbp", "Arntl", "Clock", "Bhlhe41", "Nfil3", "Cry1", "Rorg", "Xbp1", "Per3")
  491. SDandSL_DEGs_FC_padj[SDandSL_DEGs_FC_padj$SYMBOL %in% circadian_genes, ] %>%
  492. pivot_wider(names_from = "measure", values_from = "value") %>%
  493. ggplot(aes(x=reorder(SYMBOL,-log2FC), y=log2FC, fill=sleep_group)) +
  494. geom_bar(stat="identity", position="dodge", color="black") +
  495. #geom_text(aes(label=sprintf(fmt="%0.2e", round(padj, digits = 2)))) +
  496. scale_fill_manual(values = alpha(c("white", "royalblue4"), 0.8)) +
  497. theme_classic()
  498. #saved as "barplot_SLandSD_circgenes.pdf" 6.5x4
  499. ```
  500. #Wild-type aged mouse samples, day vs night
  501. ```{r}
  502. #make a dds file from galaxy generated normalized counts (rlog)
  503. dds_12moWT<-read.csv("12mo_counts.csv", row.names = 1)
  504. View(dds_12moWT)
  505. #but this is all the samples
  506. #need to get only the WT
  507. metadata<-read.csv("12mo_metadata.csv", row.names = 1)
  508. metadata$Genotype<-factor(metadata$Genotype, levels=c("WT", "AD"))
  509. metadata_WT <- dplyr::filter(metadata, Genotype == "WT")
  510. metadata_WT$TimeOfDay<-factor(metadata_WT$TimeOfDay, levels=c("Night", "Day"))
  511. View(metadata_WT)
  512. #explore
  513. rownames(metadata_WT)
  514. colnames(dds_12moWT)
  515. #filter dds file by metadata rownames
  516. dds_12moWT<-dds_12moWT[, rownames(metadata_WT)]
  517. #make sure the rows and columns match
  518. all(rownames(metadata_WT) == colnames(dds_12moWT))
  519. ```
  520. #Normalizing Old Wt samples day vs night
  521. ```{r}
  522. #creating the DESeq2 object, using *TimeOfDay as condition
  523. dds_12moWT<-DESeqDataSetFromMatrix(countData = dds_12moWT, colData = metadata_WT, design = ~ TimeOfDay)
  524. #determine size factors to use for normalization
  525. dds_12moWT <- estimateSizeFactors(dds_12moWT)
  526. sizeFactors(dds_12moWT)
  527. #extract the normalized counts
  528. normalized_counts_12moWT <-counts(dds_12moWT, normalized = TRUE)
  529. View(normalized_counts_12moWT)
  530. write.csv(normalized_counts_12moWT, file="normalized_counts_12moWT.csv")
  531. ###Getting the ENTREZID as rownames for the damn dataframe.
  532. normalized_counts_12moWT_df <- data.frame(ENTREZID=row.names(normalized_counts_12moWT), normalized_counts_12moWT)
  533. #perform unsupervised clustering analysis:log transformation
  534. nrow(dds_12moWT)
  535. vsd_12moWT <- vst(dds_12moWT, blind = TRUE)
  536. vsd_mat_12moWT <- assay(vsd_12moWT)
  537. vsd_cor_12moWT <- cor(vsd_mat_12moWT)
  538. View(vsd_cor_12moWT)
  539. ```
  540. #DEG of wild-type day vs night
  541. ```{r}
  542. dds_12moWT<-DESeq(dds_12moWT)
  543. res_12moWT<-results(dds_12moWT, contrast = c("TimeOfDay","Night", "Day"))
  544. res_12moWT_df <- as.data.frame(res_12moWT)
  545. res_12moWT_df<-tibble::rownames_to_column(res_12moWT_df, "ENTREZID")
  546. res_12moWT_df$ENTREZID<- as.character(res_12moWT_df$ENTREZID)
  547. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_12moWT_df$ENTREZID,
  548. columns=c("SYMBOL","GENENAME"),
  549. keytype="ENTREZID")
  550. res_12moWT_df <- left_join(res_12moWT_df,anno,by="ENTREZID")
  551. threshold <- res_12moWT_df$padj < padj.cutoff & abs(res_12moWT_df$log2FoldChange) > log2FoldChange.cutoff
  552. length(which(threshold))
  553. res_12moWT_df$threshold <- threshold
  554. sig_res_12moWT_df <- data.frame(subset(res_12moWT_df, threshold==TRUE), row.names = 1)
  555. dim(sig_res_12moWT_df)
  556. sig_res_12moWT_df<-na.omit(sig_res_12moWT_df)
  557. dim(sig_res_12moWT_df)
  558. #save files
  559. save(res_12moWT_df, file="res_12moWT_df.Rdata")
  560. write.csv(res_12moWT_df, file= "res_12moWT_df.csv")
  561. save(sig_res_12moWT_df, file="sig_12moWT_df.Rdata")
  562. write.csv(sig_res_12moWT_df, file= "sig_res_12moWT_df.csv")
  563. ```
  564. #AD samples
  565. ```{r}
  566. #make a dds file from galaxy generated normalized counts (rlog)
  567. dds_12moAD<-read.csv("12mo_counts.csv", row.names = 1)
  568. View(dds_12moAD)
  569. #but this is all the samples
  570. #need to get only the AD
  571. metadata<-read.csv("12mo_metadata.csv", row.names = 1)
  572. metadata$Genotype<-factor(metadata$Genotype, levels=c("WT", "AD"))
  573. metadata_AD <- dplyr::filter(metadata, Genotype == "AD")
  574. metadata_AD$TimeOfDay<-factor(metadata_AD$TimeOfDay, levels=c("Night", "Day"))
  575. View(metadata_AD)
  576. #explore
  577. rownames(metadata_AD)
  578. colnames(dds_12moAD)
  579. #filter dds file by metadata ronames
  580. dds_12moAD<-dds_12moAD[, rownames(metadata_AD)]
  581. #make sure the rows and columns match
  582. all(rownames(metadata_AD) == colnames(dds_12moAD))
  583. ```
  584. #Normalizing Old AD samples day vs night
  585. ```{r}
  586. #creating the DESeq2 object, using *TimeOfDay as condition
  587. dds_12moAD<-DESeqDataSetFromMatrix(countData = dds_12moAD, colData = metadata_AD, design = ~ TimeOfDay)
  588. #determine size factors to use for normalization
  589. dds_12moAD <- estimateSizeFactors(dds_12moAD)
  590. sizeFactors(dds_12moAD)
  591. #extract the normalized counts
  592. normalized_counts_12moAD <-counts(dds_12moAD, normalized = TRUE)
  593. View(normalized_counts_12moAD)
  594. write.csv(normalized_counts_12moAD, file="normalized_counts_12moAD.csv")
  595. ###Getting the ENTREZID as rownames for the damn dataframe.
  596. normalized_counts_12moAD_df <- data.frame(ENTREZID=row.names(normalized_counts_12moAD), normalized_counts_12moAD)
  597. #perform unsupervised clustering analysis:log transformation
  598. nrow(dds_12moAD)
  599. vsd_12moAD <- vst(dds_12moAD, blind = TRUE)
  600. vsd_mat_12moAD <- assay(vsd_12moAD)
  601. vsd_cor_12moAD <- cor(vsd_mat_12moAD)
  602. View(vsd_cor_12moAD)
  603. ```
  604. #DEG of AD day vs night
  605. ```{r}
  606. dds_12moAD<-DESeq(dds_12moAD)
  607. res_12moAD<-results(dds_12moAD, contrast = c("TimeOfDay", "Night", "Day"))
  608. res_12moAD_df <- as.data.frame(res_12moAD)
  609. res_12moAD_df<-tibble::rownames_to_column(res_12moAD_df, "ENTREZID")
  610. res_12moAD_df$ENTREZID<- as.character(res_12moAD_df$ENTREZID)
  611. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_12moAD_df$ENTREZID,
  612. columns=c("SYMBOL","GENENAME"),
  613. keytype="ENTREZID")
  614. res_12moAD_df <- left_join(res_12moAD_df,anno,by="ENTREZID")
  615. threshold <- res_12moAD_df$padj < padj.cutoff & abs(res_12moAD_df$log2FoldChange) > log2FoldChange.cutoff
  616. length(which(threshold))
  617. res_12moAD_df$threshold <- threshold
  618. sig_res_12moAD_df <- data.frame(subset(res_12moAD_df, threshold==TRUE), row.names = 1)
  619. dim(sig_res_12moAD_df)
  620. sig_res_12moAD_df<-na.omit(sig_res_12moAD_df)
  621. dim(sig_res_12moAD_df)
  622. save(res_12moAD_df, file="res_12moAD_df.Rdata")
  623. write.csv(res_12moAD_df, file="res_12moAD_df.csv")
  624. save(sig_res_12moAD_df, file="sig_12moAD_df.Rdata")
  625. write.csv(sig_res_12moAD_df, file= "sig_res_12moAD_df.csv")
  626. ```
  627. #Including the comparison of the WT vs AD group as this is an obvious question even though it has been done already (daMesquita et al)
  628. ```{r }
  629. dds_12mo<-read.csv("12mo_counts.csv", row.names = 1)
  630. View(dds_12mo)
  631. metadata_WTAD<-read.csv("12mo_metadata.csv", row.names = 1)
  632. metadata_WTAD$Genotype<-factor(metadata_WTAD$Genotype, levels=c("WT", "AD"))
  633. metadata_WTAD$TimeOfDay<-factor(metadata_WTAD$TimeOfDay, levels=c("Night", "Day"))
  634. View(metadata_WTAD)
  635. #explore
  636. rownames(metadata_WTAD)
  637. colnames(dds_12mo)
  638. #filter dds file by metadata ronames
  639. dds_12mo<-dds_12mo[, rownames(metadata_WTAD)]
  640. #make sure the rows and columns match
  641. all(rownames(metadata_WTAD) == colnames(dds_12mo))
  642. ```
  643. #Normalizing all samples together
  644. ```{r }
  645. #creating the DESeq2 object, using *TimeOfDay and Genotype as condition
  646. dds_12mo<-DESeqDataSetFromMatrix(countData = dds_12mo, colData = metadata_WTAD, design = ~ TimeOfDay + Genotype)
  647. #determine size factors to use for normalization
  648. dds_12mo <- estimateSizeFactors(dds_12mo)
  649. sizeFactors(dds_12mo)
  650. #extract the normalized counts
  651. normalized_counts_12mo <-counts(dds_12mo, normalized = TRUE)
  652. View(normalized_counts_12mo)
  653. write.csv(normalized_counts_12mo, file="normalized_counts_12mo_all.csv")
  654. ###Getting the ENTREZID as rownames for the damn dataframe.
  655. normalized_counts_12mo_df <- data.frame(ENTREZID=row.names(normalized_counts_12mo), normalized_counts_12mo)
  656. #perform unsupervised clustering analysis:log transformation
  657. nrow(dds_12mo)
  658. vsd_12mo <- vst(dds_12mo, blind = TRUE)
  659. vsd_mat_12mo <- assay(vsd_12mo)
  660. vsd_cor_12mo <- cor(vsd_mat_12mo)
  661. View(vsd_cor_12mo)
  662. ```
  663. #Plots of variation
  664. ```{r pressure, echo=FALSE}
  665. pheatmap(vsd_cor_12mo, cluster_rows = TRUE, cluster_cols = TRUE)
  666. pheatmap(vsd_cor_12mo, annotation = dplyr::select(metadata_WTAD, c(TimeOfDay, Genotype)))
  667. plotPCA(vsd_3mo, intgroup = "Genotype")
  668. plotPCA(vsd_3mo, intgroup=c("Genotype", "TimeOfDay"))
  669. ```
  670. #Degs for all old samples night vs day correcting for genotype, then genotype correcting for night vs day
  671. ```{r}
  672. #time of day accounting for genotype
  673. design(dds_12mo)<-formula(~ Genotype + TimeOfDay)
  674. dds_12mo<-DESeq(dds_12mo)
  675. res_12moToD<-results(dds_12mo, contrast = c("TimeOfDay", "Night", "Day"))
  676. res_12moToD_df <- as.data.frame(res_12moToD)
  677. res_12moToD_df<-tibble::rownames_to_column(res_12moToD_df, "ENTREZID")
  678. res_12moToD_df$ENTREZID<- as.character(res_12moToD_df$ENTREZID)
  679. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_12moToD_df$ENTREZID,
  680. columns=c("SYMBOL","GENENAME"),
  681. keytype="ENTREZID")
  682. res_12moToD_df <- left_join(res_12moToD_df,anno,by="ENTREZID")
  683. threshold <- res_12moToD_df$padj < padj.cutoff & abs(res_12moToD_df$log2FoldChange) > log2FoldChange.cutoff
  684. length(which(threshold))
  685. res_12moToD_df$threshold <- threshold
  686. sig_res_12moToD_df <- data.frame(subset(res_12moToD_df, threshold==TRUE), row.names = 1)
  687. dim(sig_res_12moToD_df)
  688. sig_res_12moToD_df<-na.omit(sig_res_12moToD_df)
  689. dim(sig_res_12moToD_df)
  690. save(sig_res_12moToD_df, file="sig_12moToD_df.Rdata")
  691. write.csv(sig_res_12moToD_df, file="sig_res_12moToD_df.csv")
  692. #Genotype accounting for time of day
  693. design(dds_12mo)<-formula(~ TimeOfDay + Genotype)
  694. dds_12mo<-DESeq(dds_12mo)
  695. res_12moGT<-results(dds_12mo, contrast = c("Genotype", "AD", "WT"))
  696. res_12moGT_df <- as.data.frame(res_12moGT)
  697. res_12moGT_df<-tibble::rownames_to_column(res_12moGT_df, "ENTREZID")
  698. res_12moGT_df$ENTREZID<- as.character(res_12moGT_df$ENTREZID)
  699. anno <- AnnotationDbi::select(org.Mm.eg.db,keys=res_12moGT_df$ENTREZID,
  700. columns=c("SYMBOL","GENENAME"),
  701. keytype="ENTREZID")
  702. res_12moGT_df <- left_join(res_12moGT_df,anno,by="ENTREZID")
  703. threshold <- res_12moGT_df$padj < padj.cutoff & abs(res_12moGT_df$log2FoldChange) > log2FoldChange.cutoff
  704. length(which(threshold))
  705. res_12moGT_df$threshold <- threshold
  706. sig_res_12moGT_df <- data.frame(subset(res_12moGT_df, threshold==TRUE), row.names = 1)
  707. dim(sig_res_12moGT_df)
  708. sig_res_12moGT_df<-na.omit(sig_res_12moGT_df)
  709. dim(sig_res_12moGT_df)
  710. save(sig_res_12moGT_df, file="sig_12moGT_df.Rdata")
  711. write.csv(sig_res_12moGT_df, file="sig_res_12moGT_df.csv")
  712. ```
  713. #Volcano plots of old WT or AD samples
  714. ```{r volcano plot}
  715. #plot comparing time of day effects
  716. EnhancedVolcano(res_12moWT_df,
  717. lab = res_12moWT_df$SYMBOL,
  718. x = 'log2FoldChange',
  719. y = 'padj',
  720. title="Night vs Day",
  721. subtitle = NULL,
  722. xlim = c(-2.5,2.5),
  723. col=c('grey','black', 'orange1' , 'red2'),
  724. pCutoff = 0.05,
  725. FCcutoff = 0.58,
  726. pointSize = 2.0,
  727. labSize = 5,
  728. axisLabSize=10)
  729. #saved as pdf 7x7 "Enhanced_volcano_Old_WT_NightvsDay.pdf"
  730. EnhancedVolcano(res_3moAWvsSD_df,
  731. lab = res_3moAWvsSD_df$SYMBOL,
  732. x = 'log2FoldChange',
  733. y = 'padj',
  734. title="Aw vs SD",
  735. subtitle = NULL,
  736. xlim = c(-2.5,2.5),
  737. col=c('grey','black', 'orange1' , 'red2'),
  738. pCutoff = 0.05,
  739. FCcutoff = 0.58,
  740. pointSize = 2.0,
  741. labSize = 3,
  742. axisLabSize=10)
  743. #saved as pdf 7x7 "Enhanced_volcano_young_AWvsSD"
  744. ```
  745. #Plotting the normalized counts from the DEG lists of young, old and AD groups
  746. #using 3mo data that has 3 condition metadata
  747. ```{r heatmaps of normalized counts}
  748. # normalized_counts_3mo_cond_df
  749. #have to annotate each dataset to get gene SYMBOLS
  750. class(normalized_counts_3mo_cond_df$ENTREZID) #character
  751. normalized_counts_3mo_cond_df$ENTREZID<-as.character(normalized_counts_3mo_cond_df$ENTREZID)
  752. keys(org.Mm.eg.db, keytype="ENTREZID")[1:10]
  753. anno <- AnnotationDbi::select(org.Mm.eg.db,
  754. keys=normalized_counts_3mo_cond_df$ENTREZID,
  755. columns=c("SYMBOL","GENENAME"),
  756. keytype="ENTREZID")
  757. head(anno)
  758. dim(anno)
  759. dim(normalized_counts_3mo_cond_df)
  760. #they match!
  761. normalized_counts_3mo_cond_df_annotated <- left_join(normalized_counts_3mo_cond_df,anno,by="ENTREZID")
  762. head(normalized_counts_3mo_cond_df_annotated)
  763. #Extract the normalized count data for the DEGs of the AWvsSL comparison
  764. ##For AWvsSL
  765. col_order<-c("SYMBOL", "M1", "M2", "M3", "M4", "M9", "M10", "M11")
  766. norm_SYMBOL_AWvsSL<-normalized_counts_3mo_cond_df_annotated[ ,col_order]
  767. norm_SYMBOL_AWvsSL<-norm_SYMBOL_AWvsSL %>% drop_na(SYMBOL)
  768. norm_SYMBOL_AWvsSL<-data.frame(norm_SYMBOL_AWvsSL, row.names = 1)
  769. norm_sigAWvsSL <- norm_SYMBOL_AWvsSL[sig_res_3moAWvsSL$SYMBOL, ]
  770. norm_sigAWvsSL<-na.omit(norm_sigAWvsSL)
  771. dim(norm_sigAWvsSL)
  772. #need this for the complex heatmap
  773. norm_sigAWvsSL_mat<-as.matrix(norm_sigAWvsSL)
  774. #For AWvsSD
  775. col_order2<-c("SYMBOL", "M5", "M6", "M7", "M8", "M9", "M10", "M11")
  776. norm_SYMBOL_AWvsSD<-normalized_counts_3mo_cond_df_annotated[ ,col_order2]
  777. norm_SYMBOL_AWvsSD<-norm_SYMBOL_AWvsSD %>% drop_na(SYMBOL)
  778. norm_SYMBOL_AWvsSD<-data.frame(norm_SYMBOL_AWvsSD, row.names = 1)
  779. norm_sigAWvsSD <- norm_SYMBOL_AWvsSD[sig_res_3moAWvsSD$SYMBOL, ]
  780. norm_sigAWvsSD<-na.omit(norm_sigAWvsSD)
  781. dim(norm_sigAWvsSD)
  782. norm_sigAWvsSD_mat<-as.matrix(norm_sigAWvsSD)
  783. #Annotate our heatmap (optional)
  784. #annotation_SL <- data.frame(sampletype=metadata_SL[, "Condition"],
  785. #row.names=rownames(metadata_SL))
  786. # normalized_counts_12moWT_df
  787. class(normalized_counts_12moWT_df$ENTREZID) #character
  788. normalized_counts_12moWT_df$ENTREZID<-as.character(normalized_counts_12moWT_df$ENTREZID)
  789. anno <- AnnotationDbi::select(org.Mm.eg.db,
  790. keys=normalized_counts_12moWT_df$ENTREZID,
  791. columns=c("SYMBOL","GENENAME"),
  792. keytype="ENTREZID")
  793. head(anno)
  794. dim(anno)
  795. dim(normalized_counts_12moWT_df)
  796. #they match!
  797. # normalized_counts_12moWT_df
  798. normalized_counts_12moWT_df_annotated <- left_join(normalized_counts_12moWT_df,anno,by="ENTREZID")
  799. head(normalized_counts_12moWT_df_annotated)
  800. col_order_old<-c("SYMBOL", "M13", "M14", "M15", "M16", "M21", "M22", "M23", "M24")
  801. norm_SYMBOL_12moWT<-normalized_counts_12moWT_df_annotated[ ,col_order_old]
  802. norm_SYMBOL_12moWT<-norm_SYMBOL_12moWT %>% drop_na(SYMBOL)
  803. norm_SYMBOL_12moWT<-data.frame(norm_SYMBOL_12moWT, row.names = 1)
  804. #to get only the sig genes from the 3mo AWvsSL list
  805. norm_sig12moWT <- norm_SYMBOL_12moWT[sig_res_3moAWvsSL$SYMBOL, ]
  806. norm_sig12moWT<-na.omit(norm_sig12moWT)
  807. dim(norm_sig12moWT)
  808. norm_sig12moWT_mat<-as.matrix(norm_sig12moWT)
  809. #############################
  810. # normalized_counts_12moAD_df
  811. class(normalized_counts_12moAD_df$ENTREZID) #character
  812. normalized_counts_12moAD_df$ENTREZID<-as.character(normalized_counts_12moAD_df$ENTREZID)
  813. anno <- AnnotationDbi::select(org.Mm.eg.db,
  814. keys=normalized_counts_12moAD_df$ENTREZID,
  815. columns=c("SYMBOL","GENENAME"),
  816. keytype="ENTREZID")
  817. head(anno)
  818. dim(anno)
  819. dim(normalized_counts_12moAD_df)
  820. #they match!
  821. # normalized_counts_12moAD_df
  822. normalized_counts_12moAD_df_annotated <- left_join(normalized_counts_12moAD_df,anno,by="ENTREZID")
  823. head(normalized_counts_12moAD_df_annotated)
  824. col_order_AD<-c("SYMBOL", "M17", "M18", "M19", "M20", "M25", "M26", "M27", "M28")
  825. norm_SYMBOL_12moAD<-normalized_counts_12moAD_df_annotated[ ,col_order_AD]
  826. norm_SYMBOL_12moAD<-norm_SYMBOL_12moAD %>% drop_na(SYMBOL)
  827. norm_SYMBOL_12moAD<-data.frame(norm_SYMBOL_12moAD, row.names = 1)
  828. norm_sig12moAD <- norm_SYMBOL_12moAD[sig_res_3moAWvsSL$SYMBOL, ]
  829. norm_sig12moAD<-na.omit(norm_sig12moAD)
  830. dim(norm_sig12moAD)
  831. norm_sig12moAD_mat<-as.matrix(norm_sig12moAD)
  832. ```
  833. #Heatmaps of normalized counts
  834. ```{r heatmaps of normalized counts for sig genes}
  835. #Set a color palette
  836. heat.colors <- brewer.pal(11, "RdBu")
  837. norm_sigAWvsSL_mat_scaled<-t(scale((t(norm_sigAWvsSL_mat))))
  838. #sig genes for AWvsSL
  839. hm<-pheatmap(norm_sigAWvsSL_mat, color = heat.colors, cluster_rows = T, show_rownames=T,
  840. border_color=NA, fontsize = 10, scale="row",
  841. fontsize_row = 3, height=20, main="AWvsSL sig genes")
  842. hm2<-Heatmap(norm_sigAWvsSL_mat_scaled, col=heat.colors, row_names_gp = gpar(fontsize = 4), clustering_distance_rows = "euclidean")
  843. draw(hm2, heatmap_legend_side="left")
  844. #save image as "pheatmap_AWvsSLnormcounts_AWvsSLgenelist.pdf"
  845. #to get row order for subsequent heatmaps
  846. ro1<-row_order(hm2)
  847. # to manually set which rows are labelled
  848. ro_label<-rownames(norm_sigAWvsSL_mat_scaled)[row_order(hm2)]
  849. label_file<-read.csv("3mo_heatmap_label.csv")
  850. rownumbers<-label_file$row_number
  851. rowgenes<-label_file$SYMBOL
  852. ha <-rowAnnotation(foo=anno_mark(at = rownumbers, labels = rowgenes, labels_gp=gpar(fontsize=6)))
  853. hm2<-Heatmap(norm_sigAWvsSL_mat_scaled, col=heat.colors, show_column_dend = FALSE, show_row_dend = FALSE, show_column_names = FALSE, right_annotation=ha, show_row_names = FALSE, row_names_gp=gpar(fontsize=5), clustering_distance_rows = "euclidean")
  854. draw(hm2, heatmap_legend_side="left")
  855. #saved as pdf "pheatmap_AWvsSLnormcounts_AWvsSLgenelist_select_labels_2.pdf" 14x4
  856. #sig genes for AwvsSD
  857. norm_sigAWvsSD_mat_scaled<-t(scale((t(norm_sigAWvsSD_mat))))
  858. hm3<-Heatmap(norm_sigAWvsSD_mat_scaled, col=heat.colors, row_names_gp = gpar(fontsize = 4), clustering_distance_rows = "euclidean")
  859. #manually set which genes are labelled as above
  860. ro_label<-rownames(norm_sigAWvsSD_mat_scaled)[row_order(hm3)]
  861. label_file<-read.csv("3moAWvsSD_heatmap_label.csv")
  862. rownumbers<-label_file$row_number
  863. rowgenes<-label_file$SYMBOL
  864. ha <-rowAnnotation(foo=anno_mark(at = rownumbers, labels = rowgenes, labels_gp=gpar(fontsize=10)))
  865. hm3<-Heatmap(norm_sigAWvsSD_mat_scaled, col=heat.colors, show_column_dend = FALSE, show_row_dend = FALSE, show_column_names = FALSE, right_annotation=ha, show_row_names = FALSE, row_names_gp=gpar(fontsize=5), clustering_distance_rows = "euclidean")
  866. draw(hm3, heatmap_legend_side="left")
  867. #save image as "pheatmap_AWvsSDnormcounts_AWvsSDgenelist.pdf" 4x4 portrait
  868. #sig genes from AWvsSL in old WT norm counts
  869. norm_sig12moWT_mat_scaled<-t(scale((t(norm_sig12moWT_mat))))
  870. hm4<-Heatmap(norm_sig12moWT_mat_scaled, col=heat.colors, row_names_gp = gpar(fontsize = 4), clustering_distance_rows = "euclidean")
  871. draw(hm4, heatmap_legend_side="left")
  872. hm4<-Heatmap(norm_sig12moWT_mat_scaled, col=heat.colors, row_order=ro1, row_names_gp = gpar(fontsize = 4), clustering_distance_rows = "euclidean")
  873. draw(hm4, heatmap_legend_side="left")
  874. #save image as "pheatmap_oldWTnormcounts_AWvsSLgenelist_order.pdf" 14x4 portrait or pheatmap_oldWTnormcounts_AWvsSLgenelist.pdf not in order
  875. #heatmap of top 500 genes of the WT old data
  876. #need to first get the sig genes in order
  877. sig_res_12moWT_df_ordered <- sig_res_12moWT_df[order(sig_res_12moWT_df$padj), ]
  878. top500_sig_res_12moWT <- sig_res_12moWT_df_ordered[1:500, ]
  879. top500_sig_res_12moWT_genes<-norm_SYMBOL_12moWT[top500_sig_res_12moWT$SYMBOL, ]
  880. top500_sig_res_12moWT_genes<-na.omit(top500_sig_res_12moWT_genes)
  881. dim(top500_sig_res_12moWT_genes)
  882. #make into matrix and scale
  883. top500_sig_res_12moWT_genes_mat<-as.matrix(top500_sig_res_12moWT_genes)
  884. top500_sig_res_12moWT_genes_mat_scaled<-t(scale((t(top500_sig_res_12moWT_genes_mat))))
  885. #now make the heatmap!
  886. hm4_1<-Heatmap(top500_sig_res_12moWT_genes_mat_scaled, col=heat.colors, row_names_gp = gpar(fontsize = 4), clustering_distance_rows = "euclidean")
  887. draw(hm4_1, heatmap_legend_side="left")
  888. #but to select only some genes to be labelled need to save to csv then do in excel and get row #s too
  889. write.csv(top500_sig_res_12moWT_genes, file = "top500_sig_res_12moWT_genes.csv")
  890. #save file with log2FC as well
  891. write.csv(top500_sig_res_12moWT, file="top500_sig_res_12moWT.csv")
  892. label_file<-read.csv("12moWT_heatmap_label.csv")
  893. rownumbers<-label_file$row_number
  894. rowgenes<-label_file$SYMBOL
  895. ha <-rowAnnotation(foo=anno_mark(at = rownumbers, labels = rowgenes, labels_gp=gpar(fontsize=10)))
  896. hm4_1<-Heatmap(top500_sig_res_12moWT_genes_mat_scaled, col=heat.colors, show_column_dend = FALSE, show_row_dend = FALSE, right_annotation=ha, show_row_names = FALSE, row_names_gp=gpar(fontsize=5), clustering_distance_rows = "euclidean")
  897. draw(hm4_1, heatmap_legend_side="left")
  898. #sig genes from AWvsSL in old AD norm counts
  899. norm_sig12moAD_mat_scaled<-t(scale((t(norm_sig12moAD_mat))))
  900. hm5<-Heatmap(norm_sig12moAD_mat_scaled, col=heat.colors, row_names_gp = gpar(fontsize = 4), clustering_distance_rows = "euclidean")
  901. draw(hm5, heatmap_legend_side="left")
  902. hm5<-Heatmap(norm_sig12moAD_mat_scaled, col=heat.colors, row_order=ro1, row_names_gp = gpar(fontsize = 4), clustering_distance_rows = "euclidean")
  903. draw(hm5, heatmap_legend_side="left")
  904. #save image as "pheatmap_oldADnormcounts_AWvsSLgenelist_order.pdf" 14x4 portrait or pheatmap_oldWTnormcounts_AWvsSLgenelist.pdf not in order
  905. ```
  906. #Genes of interest across young, aged, AD groups
  907. ```{r plotting genes of interest by fuctional groups}
  908. SLC_family_genes<-c("Slc26a2", "Slc4a10", "Slc4a5", "Slc12a2", "Slc25a28", "Slc12a7", "Slc12a4", "Slc4a2", "Slc38a3", "Slc22a8")
  909. #"Slc12a1", "Slc12a6", "Slc25a37", "Slc5a5", "Slco4a1" not sig in any
  910. all_SLC_genes<-wide_young_old_ad %>% dplyr::filter(grepl("Slc", SYMBOL))
  911. all_SLC_genes_list<-all_SLC_genes$SYMBOL
  912. Na_K_ATPase_family_genes<-c("Atp1a2", "Atp1a1", "Atp1b1")
  913. # "Atp1b1", "Atp1b2", "Atp1a4" not sig in any
  914. Carbonic_anhydrase_family_genes<-c("Ca4", "Ca2", "Ca3","Ca13", "Ca8", "Ca14")
  915. #none of these are significant in the groups
  916. ATP_synthase_family<-c("Atp5l", "Atp23", "Atp5g3", "Atpaf1", "Atp5b" ) #none are significant
  917. tight_junctions<-c("Cldn5", "Cldn2", "Cldn3", "Cldn19", "Ocln")
  918. #"Cldn18" not expressed, "Cldn11", "Cldn1" not sig in any
  919. amyloid_proteins<-c("Abpa3", "Apbb1ip", "App") #only APP is different
  920. circadian_genes<-c("Nr1d1", "Nr1d2", "Manf", "Fus", "Ciart", "Dbp", "Arntl", "Clock", "Bhlhe41", "Nfil3", "Cry1", "Rorg", "Xbp1", "Per3")
  921. # "Sirt1" not sig in any
  922. #DEGs from Dani et al, age-dependent
  923. age_genes<-read.csv("age_genes_dani_et_al.csv")
  924. age_gene_names<-age_genes$Age_dependent_genes
  925. ```
  926. ```{r plots from above}
  927. res_3moAWvsSL_df[res_3moAWvsSL_df$SYMBOL %in% SLC_family_genes, ] %>% dplyr::filter(padj<0.05) %>%
  928. ggplot(aes(x=SYMBOL, y=log2FoldChange)) +
  929. geom_bar(stat="identity") +
  930. geom_text(aes(label= sprintf("%.2f",round(padj, digits=2))))
  931. ```
  932. ```{r}
  933. #combine young AWvsSL, oldWT and old AD datasets with FC and pvalues to have on same graph
  934. #need to take out the NA gene symbols from each dataset to be able to pivot wide later, otherwise numbers are converted to list and then nothing works
  935. young_fc_padj<-res_3moAWvsSL_df[, c("SYMBOL", "log2FoldChange", "padj")]
  936. #add column to designate the dataset group
  937. young_fc_padj<-young_fc_padj %>% mutate(Group= "Young")
  938. young_fc_padj<-young_fc_padj %>% drop_na(SYMBOL)
  939. oldWT_fc_padj<-res_12moWT_df[, c("SYMBOL", "log2FoldChange", "padj") ]
  940. oldWT_fc_padj<-oldWT_fc_padj %>% mutate(Group= "OldWT")
  941. oldWT_fc_padj<-oldWT_fc_padj%>% drop_na(SYMBOL)
  942. oldAD_fc_padj<-res_12moAD_df[, c("SYMBOL", "log2FoldChange", "padj") ]
  943. oldAD_fc_padj<-oldAD_fc_padj %>% mutate(Group= "OldAD")
  944. oldAD_fc_padj<-oldAD_fc_padj%>% drop_na(SYMBOL)
  945. young_old_ad<-dplyr::bind_rows(young_fc_padj,oldWT_fc_padj)
  946. young_old_ad<-dplyr::bind_rows(young_old_ad, oldAD_fc_padj)
  947. #Add row that has *s or ns for significance
  948. young_old_ad_symbol<-young_old_ad %>%
  949. mutate(padj_symbol=case_when(padj<0.001 ~ "***"
  950. , padj<0.01 ~ "**"
  951. , padj<0.05 ~ "*"
  952. , TRUE ~ NA))
  953. write.csv(young_old_ad_symbol, file="young_old_ad_long_FC_padj.csv")
  954. #to place p-values in the middle of the bars, need to calculate half the fold change
  955. young_old_ad_symbol<-young_old_ad_symbol %>%
  956. mutate(half_fc=log2FoldChange*0.5)
  957. #need to filter the data so that we have only genes left that are significant in at least one group
  958. #need to do this by gene
  959. wide_young_old_ad<-pivot_wider(young_old_ad, names_from = Group, values_from = c(log2FoldChange, padj))
  960. wide_young_old_ad<-wide_young_old_ad %>%
  961. mutate(Keep = case_when(padj_Young <0.05 ~ "SIG",
  962. padj_OldWT <0.05 ~ "SIG",
  963. padj_OldAD <0.05 ~ "SIG",
  964. .default = "Not_SIG") )
  965. #now filter the long data by values to keep from wide data
  966. wide_mod<-wide_young_old_ad[wide_young_old_ad$Keep =="SIG",]
  967. #make list with only sig genes
  968. sig_list<-wide_mod$SYMBOL
  969. #filter the whole dataset by the sig list
  970. young_old_ad_filtered_bysig<-young_old_ad_symbol[young_old_ad_symbol$SYMBOL %in% sig_list, ]
  971. young_old_ad_filtered_bysig$Group<-factor(young_old_ad_filtered_bysig$Group, levels=c("Young", "OldWT", "OldAD"))
  972. #want a list of ones that are sig in the young group
  973. young_sig_genes<-young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$Group=="Young", ] %>% dplyr::filter(padj<0.05) %>% dplyr::filter(log2FoldChange>0.58 | log2FoldChange < -0.58)
  974. young_sig_genes_list<-young_sig_genes$SYMBOL
  975. young_old_conserved<-young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% young_sig_genes_list, ] %>% subset(Group=="OldWT") %>% dplyr::filter(padj<0.05) %>% dplyr::filter(log2FoldChange>0.58 | log2FoldChange < -0.58)
  976. young_old_conserved_list<-young_old_conserved$SYMBOL
  977. write.csv(young_old_conserved, file= "young_old_conserved.csv")
  978. #make matrix with young/old data to plot as heatmap
  979. young_old_wide<-wide_young_old_ad[wide_young_old_ad$SYMBOL %in% young_old_conserved_list, c(1:4)]
  980. young_old_mat<-as.matrix(young_old_wide[,-1])
  981. rownames(young_old_mat)<-young_old_wide$SYMBOL
  982. write.csv(wide_young_old_ad, file = "wide_young_aged_ad_FC_padj.csv")
  983. ```
  984. ```{r plotting gene expression across groups}
  985. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% circadian_genes, ] %>%
  986. ggplot(aes(fill=Group, x=SYMBOL, y=log2FoldChange)) +
  987. geom_bar(position="dodge", stat="identity") +
  988. geom_text(aes(label= sprintf("%.2f",round(padj, digits=2))), size=3,vjust=1.5, position=position_dodge(0.9)) +
  989. theme_classic() +
  990. scale_fill_viridis_d(option="inferno", begin=0.2, end=0.8)
  991. #label the p values as symbols instead
  992. #circadian related genes
  993. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% circadian_genes, ] %>%
  994. ggplot(aes(fill=Group, x=reorder(SYMBOL, -log2FoldChange), y=log2FoldChange)) +
  995. geom_bar(position="dodge", stat="identity", color="black") +
  996. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  997. theme_classic() +
  998. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7)) +
  999. coord_flip()
  1000. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% circadian_genes, ] %>%
  1001. ggplot(aes(fill=Group, x=reorder(SYMBOL, -log2FoldChange), y=log2FoldChange)) +
  1002. geom_bar(position="dodge", stat="identity", color="black") +
  1003. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1004. theme_classic() +
  1005. theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  1006. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7))
  1007. #saved as "barplot_young_old_ad_circadian_family_genes_rotated.pdf"
  1008. #plotting the conserved genes in aged animals
  1009. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% young_old_conserved_list, ] %>%
  1010. ggplot(aes(fill=Group, x=reorder(SYMBOL, -log2FoldChange), y=log2FoldChange)) +
  1011. geom_bar(position="dodge", stat="identity", color="black") +
  1012. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1013. theme_classic() +
  1014. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7)) +
  1015. coord_flip()
  1016. # cool but can't see anything. try another heatmap
  1017. pheatmap(young_old_mat)
  1018. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% SLC_family_genes, ] %>%
  1019. ggplot(aes(fill=Group, x=reorder(SYMBOL, -log2FoldChange), y=log2FoldChange)) +
  1020. geom_bar(position="dodge", stat="identity", color="black") +
  1021. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1022. theme_classic() +
  1023. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7)) +
  1024. coord_flip()
  1025. #saved as "barplot_young_old_ad_slc_family_genes.pdf" 5x4
  1026. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% all_SLC_genes_list, ] %>%
  1027. ggplot(aes(fill=Group, x=reorder(SYMBOL, -log2FoldChange), y=log2FoldChange)) +
  1028. geom_bar(position="dodge", stat="identity", color="black") +
  1029. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1030. theme_classic() +
  1031. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7)) +
  1032. coord_flip()
  1033. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% Na_K_ATPase_family_genes, ] %>%
  1034. ggplot(aes(fill=Group, x=SYMBOL, y=log2FoldChange)) +
  1035. geom_bar(position="dodge", stat="identity", color="black") +
  1036. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1037. theme_classic() +
  1038. scale_fill_viridis_d(option="inferno", alpha=0.6, begin=0.2, end=0.8)
  1039. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% amyloid_proteins, ] %>%
  1040. ggplot(aes(fill=Group, x=SYMBOL, y=log2FoldChange)) +
  1041. geom_bar(position="dodge", stat="identity", color="black") +
  1042. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1043. theme_classic() +
  1044. scale_fill_viridis_d(option="inferno", alpha=0.6, begin=0.2, end=0.8)
  1045. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% tight_junctions, ] %>%
  1046. ggplot(aes(fill=Group, x=reorder(SYMBOL, -log2FoldChange), y=log2FoldChange)) +
  1047. geom_bar(position="dodge", stat="identity", color="black") +
  1048. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1049. theme_classic() +
  1050. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7)) +
  1051. coord_flip()
  1052. #combine these together
  1053. slc_atp_app_tj<-c(SLC_family_genes, ATP_synthase_family, amyloid_proteins, tight_junctions, "Aqp1")
  1054. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% slc_atp_app_tj, ] %>%
  1055. ggplot(aes(fill=Group, x= SYMBOL, y=log2FoldChange)) +
  1056. geom_bar(position="dodge", stat="identity", color="black") +
  1057. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1058. theme_classic() +
  1059. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7)) +
  1060. coord_flip()
  1061. #saved as "barplot_young_old_ad_slc_family_genes.pdf" 5x4
  1062. #rotated
  1063. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% slc_atp_app_tj, ] %>%
  1064. ggplot(aes(fill=Group, x= SYMBOL, y=log2FoldChange)) +
  1065. geom_bar(position="dodge", stat="identity", color="black") +
  1066. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1067. theme_classic() +
  1068. theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
  1069. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7))
  1070. #saved as "barplot_young_old_ad_slc_atp_tj_aqp1_app_family_genes_rotate.pdf" 5x4
  1071. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% age_gene_names, ] %>%
  1072. ggplot(aes(fill=Group, x=SYMBOL, y=log2FoldChange)) +
  1073. geom_bar(position="dodge", stat="identity", color="black") +
  1074. geom_text(aes(label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1075. theme_classic() +
  1076. theme(axis.text.x=element_text(size= 2, angle = 90)) +
  1077. scale_fill_viridis_d(option="inferno", alpha=0.6, begin=0.2, end=0.8) +
  1078. coord_flip()
  1079. #this is too many genes. Need to filter by gene and have only those that are significant at least in one group be plotted
  1080. #slc12a2
  1081. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% "Slc12a2", ] %>%
  1082. ggplot(aes(fill=Group, x=SYMBOL, y=log2FoldChange)) +
  1083. geom_bar(position="dodge", stat="identity", color="black") +
  1084. geom_text(aes(label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1085. theme_classic() +
  1086. theme(axis.text.x=element_text(size= 2, angle = 90)) +
  1087. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7))
  1088. young_old_ad_filtered_bysig[young_old_ad_filtered_bysig$SYMBOL %in% "slc12a2", ] %>%
  1089. ggplot(aes(fill=Group, x=reorder(SYMBOL, -log2FoldChange), y=log2FoldChange)) +
  1090. geom_bar(position="dodge", stat="identity", color="black") +
  1091. geom_text(aes(y=half_fc, label= padj_symbol), size=3, vjust=1, position=position_dodge(0.9)) +
  1092. theme_classic() +
  1093. scale_fill_manual(values = alpha(c("darkcyan", 'midnightblue', 'orangered1'), 0.7)) +
  1094. coord_flip()
  1095. ```
  1096. #Venn diagrams to visualize overlaps
  1097. ```{r venn diagrams of gene list overlaps}
  1098. library(VennDiagram)
  1099. sig_res_3moAWvsSL_genelist<-sig_res_3moAWvsSL$SYMBOL
  1100. sig_res_12moWT_df_genelist<-sig_res_12moWT_df$SYMBOL
  1101. sig_res_12moAD_df_genelist<-sig_res_12moAD_df$SYMBOL
  1102. venn.diagram(x=list(sig_res_3moAWvsSL_genelist, sig_res_12moWT_df_genelist, sig_res_12moAD_df_genelist),
  1103. category.names=c("Young", "Aged", "AD"),
  1104. filename = "Circadian Gene Overlaps Young Aged AD.png",
  1105. output=TRUE,
  1106. imagetype="png" ,
  1107. height = 1000 ,
  1108. width = 1000 ,
  1109. resolution = 1000,
  1110. compression = "lzw",
  1111. lwd = 1,
  1112. col=c("darkcyan", 'midnightblue', 'orangered1'),
  1113. fill = c(alpha("darkcyan",0.3), alpha('midnightblue',0.3), alpha('orangered1',0.3)),
  1114. cex = 0.5,
  1115. fontfamily = "sans",
  1116. cat.cex = 0.3,
  1117. cat.default.pos = "outer",
  1118. cat.pos = c(-27, 27, 135),
  1119. cat.dist = c(0.055, 0.055, 0.085),
  1120. cat.fontfamily = "sans",
  1121. cat.col = c("darkcyan", 'midnightblue', 'orangered1'),
  1122. rotation = 1
  1123. )
  1124. #for young, AWvsSD, AWvsSL
  1125. sig_res_3moAWvsSL_genelist<-sig_res_3moAWvsSL$SYMBOL
  1126. sig_res_3moAWvsSD_genelist<-sig_res_3moAWvsSD$SYMBOL
  1127. venn.diagram(
  1128. x=list(sig_res_3moAWvsSL_genelist,sig_res_3moAWvsSD_genelist),
  1129. category.names=c("SL", "SD"),
  1130. filename = "Circadian Gene Overlaps SL vs SD.png",
  1131. output=TRUE,
  1132. imagetype="png" ,
  1133. height = 1000 ,
  1134. width = 1000 ,
  1135. resolution = 1000,
  1136. compression = "lzw",
  1137. lwd = 1,
  1138. col=c("midnightblue", 'orangered1'),
  1139. fill = c(alpha("midnightblue",0.3), alpha('orangered1',0.3)),
  1140. cex = 0.4,
  1141. fontfamily = "sans",
  1142. cat.cex = 0.4,
  1143. cat.default.pos = "outer",
  1144. cat.fontfamily = "sans",
  1145. cat.dist = c(0.055, 0.055),
  1146. cat.pos = c(-50, 30),
  1147. cat.col = c("midnightblue", 'orangered1')
  1148. )
  1149. ```
  1150. ```{r heatmaps}
  1151. #heatmap?
  1152. young_old_ad_mat<-as.matrix(wide_mod[ ,c("log2FoldChange_Young", "log2FoldChange_OldWT", "log2FoldChange_OldAD") ])
  1153. rownames(young_old_ad_mat)<-wide_mod$SYMBOL
  1154. #make matrix of p values by taking the padj symbols
  1155. wide_sig_symbol<-pivot_wider(young_old_ad_symbol[, c(1,4:5)], names_from = Group, values_from = padj_symbol)
  1156. #then have to filter by ones that are significant in at least one group
  1157. wide_filtered_sig<-wide_sig_symbol[wide_sig_symbol$SYMBOL %in% sig_list, ]
  1158. #make into a matrix
  1159. wide_filtered_sig_mat<-as.matrix(wide_filtered_sig[, c(2:4)])
  1160. rownames(wide_filtered_sig_mat)<-wide_filtered_sig$SYMBOL
  1161. #then get rid of the NA values so they don't show up on the heatmap
  1162. wide_filtered_sig_mat[is.na(wide_filtered_sig_mat)]<-""
  1163. pheatmap(young_old_ad_mat[rownames(young_old_ad_mat) %in% age_gene_names, ], cluster_cols = FALSE, display_numbers = wide_filtered_sig_mat[rownames(wide_filtered_sig_mat) %in% age_gene_names, ])
  1164. ```

deseq2 feb 2023.Rmd, under CC-BY-4.0 · at the source

Overview

Authors: Deidre Jansson1,2,3, Ryan O’Boyle2,3, Taylor J Pedersen2,3, Elizabeth Gino2,3, Mathew Sevao2,3, Ron Vered2,3, Katherine L Suchland3, Blake Zhou4, Ryann Fame4, Samantha A Keil2,3,5, Molly Braun2,3,6, Jeffrey Iliff2,3,7
  1. School of Biological Sciences, University of Auckland, Auckland, New Zealand
  2. Department of Psychiatry and Behavioral Sciences, University of Washington School of Medicine, Seattle, WA USA
  3. VA Northwest Mental Illness Research, Education, and Clinical Center (MIRECC), VA Puget Sound Health Care System, Seattle, WA USA
  4. Department of Neurosurgery, Stanford University, Stanford, CA USA
  5. Department of Radiology, Brain Health Imaging Institute, Weill Cornell Medicine, New York, NY USA
  6. Department of Neurosurgery, Medical College of Georgia, Augusta University, Augusta, GA USA
  7. Department of Neurology, University of Washington School of Medicine, Seattle, WA USA
Institutions: University of Auckland (New Zealand); University of Washington (United States); VA Puget Sound Health Care System (United States); Mental Illness Research, Education and Clinical Centers (United States); Stanford Medicine (United States); Stanford University (United States); Weill Cornell Medicine (United States); Augusta University (United States)
Journal: Communications biology, volume 9, issue 1, article 1073
Dates: received 19 November 2025; accepted 13 May 2026; published online 20 May 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s42003-026-10335-4 · PMID 42162350 · PMCID PMC13457615 · OpenAlex W7161808160
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: genetics / omics (modality), mouse (organism), Alzheimer's / dementia (population), cellular / molecular (subfield)
Methods: Statistics
Keywords: Circadian rhythms and sleep, Ion channels in the nervous system
MeSH: Aging*, Amyloid beta-Peptides*, Choroid Plexus*, Circadian Rhythm*, Age Factors, Alzheimer Disease, Animals, Female, Male, Mice, Sex Factors, Solute Carrier Family 12, Member 2, Transcriptome (* major topic)
Topic: Cerebrospinal fluid and hydrocephalus (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Funding: U.S. Department of Health &amp; Human Services | NIH | National Institute on Aging (P30 AG066509); NIA NIH HHS (P30 AG066509)
Citations: cited by 1 paper (Europe PMC); 91 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.

Repository

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

figshare 32129572

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: the references
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (5 files), ggplot2 (4 files), clusterProfiler (2 files), ggpubr (2 files), pheatmap (2 files), rstatix (2 files), ComplexHeatmap (1 file), DESeq2 (1 file), patchwork (1 file), reshape2 (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
  • 28 September 2026: the link answers (HTTP 200)
7 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:

  • no repository, dataset or request procedure was recognized in it

Read it in the paper: doi.org/10.1038/s42003-026-10335-4.

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;
  • 6 scripts, each with its path and the digest of its content;
  • 9 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data availability statement

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:

Read it in the paper: doi.org/10.1038/s42003-026-10335-4.

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, 12 authors, 2 keywords, 13 MeSH terms, 2 funders, 89 references.

Cite

This paper

Jansson, D., O’Boyle, R., Pedersen, T. J., Gino, E., Sevao, M., Vered, R., Suchland, K. L., Zhou, B., Fame, R., Keil, S. A., Braun, M., & Iliff, J. (2026). Diurnal choroid plexus function in mice depends on sex, age, and amyloid-β status. Communications biology, 9(1), 1073. https://doi.org/10.1038/s42003-026-10335-4

BibTeX

@article{jansson2026diurnal,
author = {Jansson, Deidre and O’Boyle, Ryan and Pedersen, Taylor J and Gino, Elizabeth and Sevao, Mathew and Vered, Ron and Suchland, Katherine L and Zhou, Blake and Fame, Ryann and Keil, Samantha A and Braun, Molly and Iliff, Jeffrey},
title = {{Diurnal choroid plexus function in mice depends on sex, age, and amyloid-β status}},
journal = {Communications biology},
year = {2026},
month = may,
volume = {9},
number = {1},
pages = {1073},
publisher = {Nature Publishing Group},
issn = {2399-3642},
doi = {10.1038/s42003-026-10335-4},
url = {https://doi.org/10.1038/s42003-026-10335-4},
pmid = {42162350},
pmcid = {PMC13457615}
}

RIS

TY - JOUR
AU - Jansson, Deidre
AU - O’Boyle, Ryan
AU - Pedersen, Taylor J
AU - Gino, Elizabeth
AU - Sevao, Mathew
AU - Vered, Ron
AU - Suchland, Katherine L
AU - Zhou, Blake
AU - Fame, Ryann
AU - Keil, Samantha A
AU - Braun, Molly
AU - Iliff, Jeffrey
TI - Diurnal choroid plexus function in mice depends on sex, age, and amyloid-β status
T2 - Communications biology
J2 - Commun Biol
PY - 2026
DA - 2026/05/20
VL - 9
IS - 1
SP - 1073
SN - 2399-3642
PB - Nature Publishing Group
DO - 10.1038/s42003-026-10335-4
UR - https://doi.org/10.1038/s42003-026-10335-4
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s42003-026-10335-4",
"type": "article-journal",
"title": "Diurnal choroid plexus function in mice depends on sex, age, and amyloid-β status",
"container-title": "Communications biology",
"author": [
{
"family": "Jansson",
"given": "Deidre"
},
{
"family": "O’Boyle",
"given": "Ryan"
},
{
"family": "Pedersen",
"given": "Taylor J"
},
{
"family": "Gino",
"given": "Elizabeth"
},
{
"family": "Sevao",
"given": "Mathew"
},
{
"family": "Vered",
"given": "Ron"
},
{
"family": "Suchland",
"given": "Katherine L"
},
{
"family": "Zhou",
"given": "Blake"
},
{
"family": "Fame",
"given": "Ryann"
},
{
"family": "Keil",
"given": "Samantha A"
},
{
"family": "Braun",
"given": "Molly"
},
{
"family": "Iliff",
"given": "Jeffrey"
}
],
"container-title-short": "Commun Biol",
"volume": "9",
"issue": "1",
"page": "1073",
"DOI": "10.1038/s42003-026-10335-4",
"PMID": "42162350",
"PMCID": "PMC13457615",
"ISSN": "2399-3642",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s42003-026-10335-4",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
20
]
]
}
}

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.1002/imt2.70163 [code]
Spatial multi-omics unveils sphingolipid metabolic reprogramming within the retinal pathological niche.
Journal: iMeta
In common: rstatix, DESeq2, clusterProfiler, 7 other tools, genetics / omics, mouse, cellular / molecular
[2] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: DESeq2, clusterProfiler, ComplexHeatmap, 6 other tools, mouse, cellular / molecular, 1 reference
[3] 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: rstatix, DESeq2, clusterProfiler, 7 other tools, genetics / omics
[4] doi:10.3390/ijms27093997 [code]
Coordinated Multicellular Immune Programs and Drug Targets Revealed by Single-Cell Analysis in Driver-Mutated NSCLC.
Journal: International journal of molecular sciences
In common: rstatix, DESeq2, clusterProfiler, 7 other tools, genetics / omics
[5] doi:10.1126/sciadv.aeb4265 [code]
Single-nucleus profiling reveals a core disease signature and cell type-specific vulnerabilities in early Rett syndrome.
Journal: Science advances
In common: rstatix, DESeq2, clusterProfiler, 6 other tools, genetics / omics, mouse, cellular / molecular
[6] doi:10.1371/journal.pcbi.1014573 [code]
Cell-type-specific m1A dynamics are associated with microglial phenotypic transition and neuronal metabolic adaptation during spinal cord injury.
Journal: PLoS computational biology
In common: rstatix, DESeq2, clusterProfiler, 6 other tools, genetics / omics, mouse, cellular / molecular
[7] doi:10.1038/s41586-026-10629-x [code]
Whole-genome duplication shaped cell-type evolution in the vertebrate brain.
Journal: Nature
In common: rstatix, DESeq2, clusterProfiler, 6 other tools, genetics / omics, mouse, cellular / molecular
[8] 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: DESeq2, clusterProfiler, ComplexHeatmap, 6 other tools, genetics / omics, mouse, cellular / molecular
[9] doi:10.1038/s41467-026-73305-8 [code]
Comparative analysis of the cellular landscape in mammalian striatum.
Journal: Nature communications
In common: DESeq2, clusterProfiler, ComplexHeatmap, 6 other tools, genetics / omics, mouse, cellular / molecular
[10] doi:10.1073/pnas.2609132123 [code]
A human lysosomal storage disorder toolkit for decoding proteome landscapes in cortical-like and dopaminergic-like induced neurons.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: rstatix, clusterProfiler, ComplexHeatmap, 6 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.