1 Introduction

1.1 RMarkdown set-up

First, basic parameters are set up in this RMarkdown, such as loading dependencies, setting paths and setting up a uniform plot structure.

2 Differential methylation

2.1 Setup

Differential methylation of promotor regions was performed with EdgeR (https://www.bioconductor.org/packages/release/bioc/vignettes/edgeR/inst/doc/edgeRUsersGuide.pdf), and FRY/KEGG according to https://www.bioconductor.org/packages/devel/workflows/vignettes/RnaSeqGeneEdgeRQL/inst/doc/edgeRQL.html

The cut-off was set at 15 reads per region.

if (file.exists("fitted_DMR_full.RData")){
  load("fitted_DMR_full.RData")
} else {
  if (file.exists("bismark2DGE_object_full.Rdata")){
  load("bismark2DGE_object_full.Rdata")
  } else {
  files<-list.files(data_path,recursive=TRUE)
  files<-files[grep("18.cov$", files)]
  yall <- readBismark2DGE(paste0(data_path,sample_annotation$cov_filename), sample.names=sample_annotation$UniqueID)
  save(yall, file = "bismark2DGE_object_full.Rdata")
  }

yall <- yall[yall$genes$Chr %in% c(1:21, "X", "Y"), ]

# Select sites in promotor regions
TSS <- nearestTSS(yall$genes$Chr, yall$genes$Locus, species="Hs")
yall$genes$EntrezID <- TSS$gene_id
yall$genes$Symbol <- TSS$symbol
yall$genes$Strand <- TSS$strand
yall$genes$Distance <- TSS$distance
yall$genes$Width <- TSS$width

InPromoter <- yall$genes$Distance >= -1000 & yall$genes$Distance <= 2000
yIP <- yall[InPromoter,,keep.lib.sizes=FALSE]

yall <- rowsum(yIP, yIP$genes$EntrezID, reorder=FALSE)
yall$genes$EntrezID <- NULL

# Normalisation
Methylation <- gl(2,1,ncol(yall), labels=c("Me","Un"))
Me <- yall$counts[, Methylation=="Me"]
Un <- yall$counts[, Methylation=="Un"]
Coverage <- Me + Un 

HasCoverage <- rowSums(Coverage >= 15) == 45
HasBoth <- rowSums(Me) > 0 & rowSums(Un) > 0
y <- yall[HasCoverage & HasBoth,, keep.lib.sizes=FALSE]

# Correct for library size
TotalLibSizepr <- 0.5*y$samples$lib.size[Methylation=="Me"] + 0.5*y$samples$lib.size[Methylation=="Un"]
y$samples$lib.size <- rep(TotalLibSizepr, each=2)

# design matrix
designSL <- model.matrix(~0+TimeLapse:Tube, data=sample_annotation)
design <- modelMatrixMeth(designSL)
colnames(design) <- str_replace(colnames(design), ":", "_")
colnames(design) <- str_replace(colnames(design), " ", "_")

y <- estimateDisp(y, design=design, trend="none")
fit <- glmFit(y, design)
}

3 Across tubes at T0

In the first differential methylation analysis, we compare each time every tube, at timepoint 0.

3.1 Biomatrica vs DNA Streck

3.2 Biomatrica vs EDTA

3.3 Biomatrica vs PAXgene

3.4 Biomatrica vs Roche

3.5 DNA Streck vs EDTA

3.6 DNA Streck vs PAXgene

3.7 DNA Streck vs Roche

3.8 EDTA vs PAXgene

3.9 EDTA vs Roche

3.10 Roche vs PAXgene

4 Within tubes

In the second differential methylation analysis, we compare within tubes: the comparison is now between timepoint 0 and timepoint 72.

4.1 Biomatrica T72 vs T0

4.2 DNA Streck T72 vs T0

4.3 EDTA T72 vs T0

4.3.1 Gene ontology

4.3.1.1 FRY

4.3.1.2 KEGG

4.4 EDTA T24 vs T0

4.5 PAXgene T72 vs T0

4.6 Roche T72 vs T0

5 Session info

## R version 3.6.3 (2020-02-29)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS Catalina 10.15.3
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## attached base packages:
## [1] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] org.Hs.eg.db_3.10.0  GO.db_3.10.0         AnnotationDbi_1.48.0
##  [4] IRanges_2.20.2       S4Vectors_0.24.3     Biobase_2.46.0      
##  [7] BiocGenerics_0.32.0  DT_0.13              RColorBrewer_1.1-2  
## [10] readxl_1.3.1         edgeR_3.28.1         limma_3.42.2        
## [13] forcats_0.5.0        stringr_1.4.0        dplyr_0.8.5         
## [16] purrr_0.3.3          readr_1.3.1          tidyr_1.0.2         
## [19] tibble_3.0.0         ggplot2_3.3.0        tidyverse_1.3.0     
## 
## loaded via a namespace (and not attached):
##  [1] httr_1.4.1        bit64_0.9-7       jsonlite_1.6.1    modelr_0.1.6     
##  [5] assertthat_0.2.1  blob_1.2.1        cellranger_1.1.0  yaml_2.2.1       
##  [9] pillar_1.4.3      RSQLite_2.2.0     backports_1.1.5   lattice_0.20-38  
## [13] glue_1.3.2        digest_0.6.25     rvest_0.3.5       colorspace_1.4-1 
## [17] htmltools_0.4.0   pkgconfig_2.0.3   broom_0.5.5       haven_2.2.0      
## [21] scales_1.1.0      generics_0.0.2    ellipsis_0.3.0    withr_2.1.2      
## [25] cli_2.0.2         magrittr_1.5      crayon_1.3.4      memoise_1.1.0    
## [29] evaluate_0.14     fs_1.4.0          fansi_0.4.1       nlme_3.1-144     
## [33] xml2_1.3.0        tools_3.6.3       hms_0.5.3         lifecycle_0.2.0  
## [37] munsell_0.5.0     reprex_0.3.0      locfit_1.5-9.4    compiler_3.6.3   
## [41] rlang_0.4.5       grid_3.6.3        rstudioapi_0.11   htmlwidgets_1.5.1
## [45] crosstalk_1.1.0.1 rmarkdown_2.1     gtable_0.3.0      codetools_0.2-16 
## [49] DBI_1.1.0         R6_2.4.1          lubridate_1.7.4   knitr_1.28       
## [53] bit_1.1-15.2      stringi_1.4.6     Rcpp_1.0.4        vctrs_0.2.4      
## [57] dbplyr_1.4.2      tidyselect_1.0.0  xfun_0.12