Task 1: Load Required Libraries & Setup Environment

This task prepares the R environment by loading all required libraries for RNA-seq processing, methylation analysis, statistical modeling, pathway enrichment, and network inference.


load Required Libraries

# RNA-seq analysis
library(DESeq2)
library(edgeR)
library(vsn)

# General data wrangling
library(tidyverse)
library(dplyr)
library(genefilter)

# Statistical testing
library(multtest)
library(DescTools)

# Visualization and PCA
library(ggfortify)
library(factoextra)

# Methylation analysis
library(minfi)
library(IlluminaHumanMethylation450kanno.ilmn12.hg19)

# Pathway and enrichment
library(clusterProfiler)
library(org.Hs.eg.db)
library(AnnotationDbi)

# Network inference
library(GeneNet)

# Optional: Check session info to confirm everything loaded
sessionInfo()
## R version 4.4.1 (2024-06-14 ucrt)
## Platform: x86_64-w64-mingw32/x64
## Running under: Windows 11 x64 (build 26100)
## 
## Matrix products: default
## 
## 
## locale:
## [1] LC_COLLATE=Arabic_Egypt.utf8  LC_CTYPE=Arabic_Egypt.utf8   
## [3] LC_MONETARY=Arabic_Egypt.utf8 LC_NUMERIC=C                 
## [5] LC_TIME=Arabic_Egypt.utf8    
## 
## time zone: Africa/Cairo
## tzcode source: internal
## 
## attached base packages:
## [1] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] GeneNet_1.2.17                                    
##  [2] fdrtool_1.2.18                                    
##  [3] longitudinal_1.1.13                               
##  [4] corpcor_1.6.10                                    
##  [5] org.Hs.eg.db_3.19.1                               
##  [6] AnnotationDbi_1.66.0                              
##  [7] clusterProfiler_4.12.6                            
##  [8] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.1
##  [9] minfi_1.50.0                                      
## [10] bumphunter_1.46.0                                 
## [11] locfit_1.5-9.9                                    
## [12] iterators_1.0.14                                  
## [13] foreach_1.5.2                                     
## [14] Biostrings_2.72.1                                 
## [15] XVector_0.44.0                                    
## [16] factoextra_1.0.7                                  
## [17] ggfortify_0.4.18                                  
## [18] DescTools_0.99.60                                 
## [19] multtest_2.60.0                                   
## [20] genefilter_1.86.0                                 
## [21] lubridate_1.9.4                                   
## [22] forcats_1.0.0                                     
## [23] stringr_1.5.1                                     
## [24] dplyr_1.1.4                                       
## [25] purrr_1.0.2                                       
## [26] readr_2.1.5                                       
## [27] tidyr_1.3.1                                       
## [28] tibble_3.2.1                                      
## [29] ggplot2_3.5.2                                     
## [30] tidyverse_2.0.0                                   
## [31] vsn_3.72.0                                        
## [32] edgeR_4.2.2                                       
## [33] limma_3.60.6                                      
## [34] DESeq2_1.44.0                                     
## [35] SummarizedExperiment_1.34.0                       
## [36] Biobase_2.64.0                                    
## [37] MatrixGenerics_1.16.0                             
## [38] matrixStats_1.3.0                                 
## [39] GenomicRanges_1.56.1                              
## [40] GenomeInfoDb_1.40.1                               
## [41] IRanges_2.38.0                                    
## [42] S4Vectors_0.42.0                                  
## [43] BiocGenerics_0.50.0                               
## 
## loaded via a namespace (and not attached):
##   [1] fs_1.6.4                  bitops_1.0-7             
##   [3] enrichplot_1.24.0         HDO.db_0.99.1            
##   [5] httr_1.4.7                RColorBrewer_1.1-3       
##   [7] tools_4.4.1               doRNG_1.8.6.2            
##   [9] R6_2.5.1                  HDF5Array_1.32.1         
##  [11] lazyeval_0.2.2            rhdf5filters_1.16.0      
##  [13] withr_3.0.0               gridExtra_2.3            
##  [15] base64_2.0.2              preprocessCore_1.66.0    
##  [17] cli_3.6.3                 scatterpie_0.2.3         
##  [19] sass_0.4.10               mvtnorm_1.3-3            
##  [21] proxy_0.4-27              askpass_1.2.0            
##  [23] Rsamtools_2.20.0          yulab.utils_0.2.0        
##  [25] gson_0.1.0                siggenes_1.78.0          
##  [27] illuminaio_0.46.0         DOSE_3.30.1              
##  [29] scrime_1.3.5              readxl_1.4.5             
##  [31] rstudioapi_0.17.1         RSQLite_2.3.7            
##  [33] generics_0.1.3            gridGraphics_0.5-1       
##  [35] BiocIO_1.14.0             GO.db_3.19.1             
##  [37] Matrix_1.7-0              abind_1.4-5              
##  [39] lifecycle_1.0.4           yaml_2.3.8               
##  [41] rhdf5_2.48.0              qvalue_2.36.0            
##  [43] SparseArray_1.4.8         grid_4.4.1               
##  [45] blob_1.2.4                crayon_1.5.3             
##  [47] lattice_0.22-6            haven_2.5.5              
##  [49] cowplot_1.1.3             GenomicFeatures_1.56.0   
##  [51] annotate_1.82.0           KEGGREST_1.44.1          
##  [53] pillar_1.10.1             knitr_1.50               
##  [55] beanplot_1.3.1            fgsea_1.30.0             
##  [57] rjson_0.2.21              boot_1.3-30              
##  [59] gld_2.6.7                 codetools_0.2-20         
##  [61] fastmatch_1.1-4           glue_1.7.0               
##  [63] ggfun_0.1.5               data.table_1.15.4        
##  [65] vctrs_0.6.5               png_0.1-8                
##  [67] treeio_1.28.0             cellranger_1.1.0         
##  [69] gtable_0.3.5              cachem_1.1.0             
##  [71] xfun_0.52                 S4Arrays_1.4.1           
##  [73] tidygraph_1.3.1           survival_3.6-4           
##  [75] statmod_1.5.0             nlme_3.1-164             
##  [77] ggtree_3.12.0             bit64_4.0.5              
##  [79] bslib_0.9.0               nor1mix_1.3-3            
##  [81] affyio_1.74.0             colorspace_2.1-0         
##  [83] DBI_1.2.3                 Exact_3.3                
##  [85] tidyselect_1.2.1          bit_4.0.5                
##  [87] compiler_4.4.1            curl_6.4.0               
##  [89] expm_1.0-0                xml2_1.3.8               
##  [91] DelayedArray_0.30.1       shadowtext_0.1.3         
##  [93] rtracklayer_1.64.0        scales_1.3.0             
##  [95] affy_1.82.0               quadprog_1.5-8           
##  [97] digest_0.6.35             rmarkdown_2.29           
##  [99] GEOquery_2.72.0           htmltools_0.5.8.1        
## [101] pkgconfig_2.0.3           sparseMatrixStats_1.16.0 
## [103] fastmap_1.2.0             rlang_1.1.4              
## [105] UCSC.utils_1.0.0          DelayedMatrixStats_1.26.0
## [107] farver_2.1.2              jquerylib_0.1.4          
## [109] jsonlite_1.8.8            BiocParallel_1.38.0      
## [111] mclust_6.1.1              GOSemSim_2.30.0          
## [113] RCurl_1.98-1.14           magrittr_2.0.3           
## [115] GenomeInfoDbData_1.2.12   ggplotify_0.1.2          
## [117] patchwork_1.2.0           Rhdf5lib_1.26.0          
## [119] munsell_0.5.1             Rcpp_1.0.12              
## [121] ape_5.8                   viridis_0.6.5            
## [123] stringi_1.8.4             ggraph_2.2.1             
## [125] rootSolve_1.8.2.4         zlibbioc_1.50.0          
## [127] MASS_7.3-60.2             plyr_1.8.9               
## [129] ggrepel_0.9.5             lmom_3.2                 
## [131] graphlayouts_1.1.1        splines_4.4.1            
## [133] hms_1.1.3                 igraph_2.0.3             
## [135] rngtools_1.5.2            reshape2_1.4.4           
## [137] XML_3.99-0.16.1           evaluate_1.0.4           
## [139] BiocManager_1.30.26       tzdb_0.5.0               
## [141] tweenr_2.0.3              openssl_2.2.0            
## [143] polyclip_1.10-6           reshape_0.8.10           
## [145] ggforce_0.4.2             xtable_1.8-4             
## [147] restfulr_0.0.15           e1071_1.7-16             
## [149] tidytree_0.4.6            viridisLite_0.4.2        
## [151] class_7.3-22              aplot_0.2.3              
## [153] memoise_2.0.1             GenomicAlignments_1.40.0 
## [155] timechange_0.3.0