3.12 Summary

Before proceeding to differential expression analysis, confirm all QC checks pass:

Check Expected outcome
Size factors ≈ 1.0 across samples Library sizes are balanced
Boxplots of normalised counts overlap No extreme outlier samples
Correlation heatmap: within-group distances < between-group Replicates are reproducible
PCA PC1 separates conditions Condition is the dominant source of variance
No isolated samples in PCA or heatmap No technical outliers

⭐ Important: If any check fails, investigate the cause before running DESeq2. Proceeding with outlier samples or confounded designs will compromise all downstream results

# ── Export DDS for downstream analysis ────────────────────────────────────────
results_dir <- file.path(git_root, "results", "rds")
dir.create(results_dir, recursive = TRUE, showWarnings = FALSE)

dds_path <- file.path(results_dir, "dds_ecoli_MG1655.rds")
saveRDS(dds, file = dds_path)
cat("✅ DDS saved to:", dds_path, "\n")
cat("   Dimensions  :", nrow(dds), "genes ×", ncol(dds), "samples\n")
cat("   Conditions  :", paste(levels(dds$condition), collapse = " vs "), "\n")


sessionInfo()
## R version 4.4.1 (2024-06-14)
## Platform: aarch64-apple-darwin20
## Running under: macOS Sonoma 14.3
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0
## 
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
## 
## time zone: Europe/Copenhagen
## tzcode source: internal
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] plotly_4.12.0               DT_0.34.0                  
##  [3] kableExtra_1.4.0            knitr_1.51                 
##  [5] factoextra_2.0.0            pheatmap_1.0.13            
##  [7] RColorBrewer_1.1-3          ggpubr_0.6.3               
##  [9] DESeq2_1.46.0               SummarizedExperiment_1.36.0
## [11] Biobase_2.66.0              MatrixGenerics_1.18.1      
## [13] matrixStats_1.5.0           GenomicRanges_1.58.0       
## [15] GenomeInfoDb_1.42.3         IRanges_2.40.1             
## [17] S4Vectors_0.44.0            BiocGenerics_0.52.0        
## [19] reshape2_1.4.5              lubridate_1.9.5            
## [21] forcats_1.0.1               stringr_1.6.0              
## [23] dplyr_1.2.1                 purrr_1.2.2                
## [25] readr_2.2.0                 tidyr_1.3.2                
## [27] tibble_3.3.1                ggplot2_4.0.3              
## [29] tidyverse_2.0.0            
## 
## loaded via a namespace (and not attached):
##  [1] tidyselect_1.2.1        viridisLite_0.4.3       farver_2.1.2           
##  [4] S7_0.2.2                lazyeval_0.2.3          fastmap_1.2.0          
##  [7] digest_0.6.39           timechange_0.4.0        lifecycle_1.0.5        
## [10] magrittr_2.0.5          compiler_4.4.1          rlang_1.2.0            
## [13] sass_0.4.10             tools_4.4.1             yaml_2.3.12            
## [16] data.table_1.18.2.1     ggsignif_0.6.4          labeling_0.4.3         
## [19] htmlwidgets_1.6.4       S4Arrays_1.6.0          DelayedArray_0.32.0    
## [22] xml2_1.5.2              plyr_1.8.9              abind_1.4-8            
## [25] BiocParallel_1.40.2     withr_3.0.2             grid_4.4.1             
## [28] colorspace_2.1-2        scales_1.4.0            cli_3.6.6              
## [31] rmarkdown_2.31          crayon_1.5.3            generics_0.1.4         
## [34] otel_0.2.0              rstudioapi_0.18.0       httr_1.4.8             
## [37] tzdb_0.5.0              cachem_1.1.0            zlibbioc_1.52.0        
## [40] parallel_4.4.1          XVector_0.46.0          vctrs_0.7.3            
## [43] Matrix_1.7-5            jsonlite_2.0.0          carData_3.0-6          
## [46] bookdown_0.46           car_3.1-5               hms_1.1.4              
## [49] rstatix_0.7.3           ggrepel_0.9.8           Formula_1.2-5          
## [52] crosstalk_1.2.2         systemfonts_1.3.2       locfit_1.5-9.12        
## [55] jquerylib_0.1.4         glue_1.8.1              codetools_0.2-20       
## [58] stringi_1.8.7           gtable_0.3.6            UCSC.utils_1.2.0       
## [61] pillar_1.11.1           htmltools_0.5.9         GenomeInfoDbData_1.2.13
## [64] R6_2.6.1                textshaping_1.0.5       evaluate_1.0.5         
## [67] lattice_0.22-9          backports_1.5.1         broom_1.0.12           
## [70] bslib_0.10.0            Rcpp_1.1.1-1.1          svglite_2.2.2          
## [73] SparseArray_1.6.2       xfun_0.57               pkgconfig_2.0.3