Contents

1 Introduction

1.1 Load required packages

Load the package with the library function.

library(tidyverse)
library(ggplot2)

library(dce)

set.seed(42)

2 Pathway database overview

We provide access to the following topological pathway databases using graphite (Sales et al. 2012) in a processed format. This format looks as follows:

dce::df_pathway_statistics %>%
  arrange(desc(node_num)) %>%
  head(10) %>%
  knitr::kable()
database pathway_id pathway_name node_num edge_num
reactome R-HSA-162582 Signaling Pathways 2488 62068
reactome R-HSA-1430728 Metabolism 2047 85543
reactome R-HSA-392499 Metabolism of proteins 1894 52807
reactome R-HSA-1643685 Disease 1774 55469
reactome R-HSA-168256 Immune System 1771 58277
panther P00057 Wnt signaling pathway 1644 195344
reactome R-HSA-74160 Gene expression (Transcription) 1472 32493
reactome R-HSA-597592 Post-translational protein modification 1394 26399
kegg hsa:01100 Metabolic pathways 1343 22504
reactome R-HSA-73857 RNA Polymerase II Transcription 1339 25294

Let’s see how many pathways each database provides:

dce::df_pathway_statistics %>%
  count(database, sort = TRUE, name = "pathway_number") %>%
  knitr::kable()
database pathway_number
pathbank 48685
smpdb 48671
reactome 2406
wikipathways 640
kegg 323
panther 94
pharmgkb 90

Next, we can see how the pathway sizes are distributed for each database:

dce::df_pathway_statistics %>%
  ggplot(aes(x = node_num)) +
    geom_histogram(bins = 30) +
    facet_wrap(~ database, scales = "free") +
    theme_minimal()

3 Plotting pathways

It is easily possible to plot pathways:

pathways <- get_pathways(
  pathway_list = list(
    pathbank = c("Lactose Synthesis"),
    kegg = c("Fatty acid biosynthesis")
  )
)

lapply(pathways, function(x) {
  plot_network(
    as(x$graph, "matrix"),
    visualize_edge_weights = FALSE,
    arrow_size = 0.02,
    shadowtext = TRUE
  ) +
    ggtitle(x$pathway_name)
})
## [[1]]

## 
## [[2]]

4 Session information

sessionInfo()
## R version 4.4.0 alpha (2024-03-27 r86216)
## Platform: aarch64-apple-darwin20
## Running under: macOS Ventura 13.6.5
## 
## 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: America/New_York
## tzcode source: internal
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] dce_1.12.0                  graph_1.82.0               
##  [3] cowplot_1.1.3               lubridate_1.9.3            
##  [5] forcats_1.0.0               stringr_1.5.1              
##  [7] dplyr_1.1.4                 purrr_1.0.2                
##  [9] readr_2.1.5                 tidyr_1.3.1                
## [11] tibble_3.2.1                tidyverse_2.0.0            
## [13] TCGAutils_1.24.0            curatedTCGAData_1.25.4     
## [15] MultiAssayExperiment_1.30.0 SummarizedExperiment_1.34.0
## [17] Biobase_2.64.0              GenomicRanges_1.56.0       
## [19] GenomeInfoDb_1.40.0         IRanges_2.38.0             
## [21] S4Vectors_0.42.0            BiocGenerics_0.50.0        
## [23] MatrixGenerics_1.16.0       matrixStats_1.2.0          
## [25] ggraph_2.2.1                ggplot2_3.5.0              
## [27] BiocStyle_2.32.0           
## 
## loaded via a namespace (and not attached):
##   [1] bitops_1.0-7              httr_1.4.7               
##   [3] GenomicDataCommons_1.28.0 prabclus_2.3-3           
##   [5] Rgraphviz_2.48.0          numDeriv_2016.8-1.1      
##   [7] tools_4.4.0               utf8_1.2.4               
##   [9] R6_2.5.1                  vegan_2.6-4              
##  [11] mgcv_1.9-1                sn_2.1.1                 
##  [13] permute_0.9-7             withr_3.0.0              
##  [15] graphite_1.50.0           gridExtra_2.3            
##  [17] flexclust_1.4-1           cli_3.6.2                
##  [19] sandwich_3.1-0            labeling_0.4.3           
##  [21] sass_0.4.9                diptest_0.77-0           
##  [23] mvtnorm_1.2-4             robustbase_0.99-2        
##  [25] proxy_0.4-27              Rsamtools_2.20.0         
##  [27] FMStable_0.1-4            Linnorm_2.28.0           
##  [29] plotrix_3.8-4             limma_3.60.0             
##  [31] RSQLite_2.3.5             generics_0.1.3           
##  [33] BiocIO_1.14.0             gtools_3.9.5             
##  [35] wesanderson_0.3.7         Matrix_1.7-0             
##  [37] fansi_1.0.6               logger_0.3.0             
##  [39] abind_1.4-5               lifecycle_1.0.4          
##  [41] multcomp_1.4-25           yaml_2.3.8               
##  [43] edgeR_4.2.0               mathjaxr_1.6-0           
##  [45] SparseArray_1.4.0         BiocFileCache_2.12.0     
##  [47] Rtsne_0.17                grid_4.4.0               
##  [49] blob_1.2.4                promises_1.2.1           
##  [51] gdata_3.0.0               ppcor_1.1                
##  [53] bdsmatrix_1.3-7           ExperimentHub_2.12.0     
##  [55] crayon_1.5.2              lattice_0.22-6           
##  [57] GenomicFeatures_1.56.0    chromote_0.2.0           
##  [59] KEGGREST_1.44.0           magick_2.8.3             
##  [61] pillar_1.9.0              knitr_1.45               
##  [63] rjson_0.2.21              fpc_2.2-11               
##  [65] corpcor_1.6.10            codetools_0.2-19         
##  [67] mutoss_0.1-13             glue_1.7.0               
##  [69] RcppArmadillo_0.12.8.1.0  data.table_1.15.4        
##  [71] vctrs_0.6.5               png_0.1-8                
##  [73] Rdpack_2.6                mnem_1.20.0              
##  [75] gtable_0.3.4              kernlab_0.9-32           
##  [77] assertthat_0.2.1          amap_0.8-19              
##  [79] cachem_1.0.8              xfun_0.43                
##  [81] mime_0.12                 rbibutils_2.2.16         
##  [83] S4Arrays_1.4.0            RcppEigen_0.3.4.0.0      
##  [85] tidygraph_1.3.1           survival_3.5-8           
##  [87] fastICA_1.2-4             statmod_1.5.0            
##  [89] TH.data_1.1-2             tsne_0.1-3.1             
##  [91] nlme_3.1-164              naturalsort_0.1.3        
##  [93] bit64_4.0.5               gmodels_2.19.1           
##  [95] filelock_1.0.3            bslib_0.6.2              
##  [97] colorspace_2.1-0          DBI_1.2.2                
##  [99] nnet_7.3-19               mnormt_2.1.1             
## [101] tidyselect_1.2.1          processx_3.8.4           
## [103] bit_4.0.5                 compiler_4.4.0           
## [105] curl_5.2.1                rvest_1.0.4              
## [107] expm_0.999-9              xml2_1.3.6               
## [109] TFisher_0.2.0             ggdendro_0.2.0           
## [111] DelayedArray_0.30.0       shadowtext_0.1.3         
## [113] bookdown_0.38             rtracklayer_1.64.0       
## [115] harmonicmeanp_3.0.1       sfsmisc_1.1-17           
## [117] scales_1.3.0              DEoptimR_1.1-3           
## [119] RBGL_1.80.0               rappdirs_0.3.3           
## [121] apcluster_1.4.11          digest_0.6.35            
## [123] snowfall_1.84-6.3         rmarkdown_2.26           
## [125] XVector_0.44.0            htmltools_0.5.8          
## [127] pkgconfig_2.0.3           highr_0.10               
## [129] dbplyr_2.5.0              fastmap_1.1.1            
## [131] rlang_1.1.3               UCSC.utils_1.0.0         
## [133] farver_2.1.1              jquerylib_0.1.4          
## [135] zoo_1.8-12                jsonlite_1.8.8           
## [137] BiocParallel_1.38.0       mclust_6.1               
## [139] RCurl_1.98-1.14           magrittr_2.0.3           
## [141] modeltools_0.2-23         GenomeInfoDbData_1.2.12  
## [143] munsell_0.5.0             Rcpp_1.0.12              
## [145] viridis_0.6.5             stringi_1.8.3            
## [147] zlibbioc_1.50.0           MASS_7.3-60.2            
## [149] plyr_1.8.9                AnnotationHub_3.12.0     
## [151] org.Hs.eg.db_3.19.0       flexmix_2.3-19           
## [153] parallel_4.4.0            ggrepel_0.9.5            
## [155] Biostrings_2.72.0         graphlayouts_1.1.1       
## [157] splines_4.4.0             multtest_2.60.0          
## [159] hms_1.1.3                 locfit_1.5-9.9           
## [161] qqconf_1.3.2              ps_1.7.6                 
## [163] igraph_2.0.3              fastcluster_1.2.6        
## [165] reshape2_1.4.4            BiocVersion_3.19.1       
## [167] XML_3.99-0.16.1           evaluate_0.23            
## [169] metap_1.9                 pcalg_2.7-11             
## [171] BiocManager_1.30.22       tzdb_0.4.0               
## [173] tweenr_2.0.3              polyclip_1.10-6          
## [175] clue_0.3-65               BiocBaseUtils_1.6.0      
## [177] ggforce_0.4.2             restfulr_0.0.15          
## [179] e1071_1.7-14              later_1.3.2              
## [181] viridisLite_0.4.2         class_7.3-22             
## [183] snow_0.4-4                websocket_1.4.1          
## [185] ggm_2.5.1                 memoise_2.0.1            
## [187] AnnotationDbi_1.66.0      GenomicAlignments_1.40.0 
## [189] ellipse_0.5.0             cluster_2.1.6            
## [191] timechange_0.3.0

References

Sales, Gabriele, Enrica Calura, Duccio Cavalieri, and Chiara Romualdi. 2012. “Graphite-a Bioconductor Package to Convert Pathway Topology to Gene Network.” BMC Bioinformatics 13 (1): 20.