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.3.1 (2023-06-16)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.2 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.17-bioc/R/lib/libRblas.so 
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_GB              LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## time zone: America/New_York
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] dce_1.8.2                   graph_1.78.0               
##  [3] cowplot_1.1.1               lubridate_1.9.2            
##  [5] forcats_1.0.0               stringr_1.5.0              
##  [7] dplyr_1.1.2                 purrr_1.0.1                
##  [9] readr_2.1.4                 tidyr_1.3.0                
## [11] tibble_3.2.1                tidyverse_2.0.0            
## [13] TCGAutils_1.20.2            curatedTCGAData_1.22.2     
## [15] MultiAssayExperiment_1.26.0 SummarizedExperiment_1.30.2
## [17] Biobase_2.60.0              GenomicRanges_1.52.0       
## [19] GenomeInfoDb_1.36.1         IRanges_2.34.1             
## [21] S4Vectors_0.38.1            BiocGenerics_0.46.0        
## [23] MatrixGenerics_1.12.2       matrixStats_1.0.0          
## [25] ggraph_2.1.0                ggplot2_3.4.2              
## [27] BiocStyle_2.28.0           
## 
## loaded via a namespace (and not attached):
##   [1] bitops_1.0-7                  httr_1.4.6                   
##   [3] GenomicDataCommons_1.24.2     prabclus_2.3-2               
##   [5] Rgraphviz_2.44.0              numDeriv_2016.8-1.1          
##   [7] tools_4.3.1                   utf8_1.2.3                   
##   [9] R6_2.5.1                      vegan_2.6-4                  
##  [11] mgcv_1.9-0                    sn_2.1.1                     
##  [13] permute_0.9-7                 withr_2.5.0                  
##  [15] graphite_1.46.0               prettyunits_1.1.1            
##  [17] gridExtra_2.3                 flexclust_1.4-1              
##  [19] cli_3.6.1                     sandwich_3.0-2               
##  [21] labeling_0.4.2                sass_0.4.6                   
##  [23] diptest_0.76-0                mvtnorm_1.2-2                
##  [25] robustbase_0.99-0             proxy_0.4-27                 
##  [27] Rsamtools_2.16.0              FMStable_0.1-4               
##  [29] Linnorm_2.24.1                plotrix_3.8-2                
##  [31] limma_3.56.2                  RSQLite_2.3.1                
##  [33] generics_0.1.3                BiocIO_1.10.0                
##  [35] gtools_3.9.4                  wesanderson_0.3.6            
##  [37] Matrix_1.6-0                  fansi_1.0.4                  
##  [39] abind_1.4-5                   logger_0.2.2                 
##  [41] lifecycle_1.0.3               multcomp_1.4-25              
##  [43] yaml_2.3.7                    edgeR_3.42.4                 
##  [45] mathjaxr_1.6-0                BiocFileCache_2.8.0          
##  [47] Rtsne_0.16                    grid_4.3.1                   
##  [49] blob_1.2.4                    promises_1.2.0.1             
##  [51] gdata_2.19.0                  ppcor_1.1                    
##  [53] bdsmatrix_1.3-6               ExperimentHub_2.8.1          
##  [55] crayon_1.5.2                  lattice_0.21-8               
##  [57] GenomicFeatures_1.52.1        KEGGREST_1.40.0              
##  [59] magick_2.7.4                  pillar_1.9.0                 
##  [61] knitr_1.43                    rjson_0.2.21                 
##  [63] fpc_2.2-10                    corpcor_1.6.10               
##  [65] codetools_0.2-19              mutoss_0.1-13                
##  [67] glue_1.6.2                    RcppArmadillo_0.12.4.1.0     
##  [69] data.table_1.14.8             vctrs_0.6.3                  
##  [71] png_0.1-8                     Rdpack_2.4                   
##  [73] mnem_1.16.0                   gtable_0.3.3                 
##  [75] kernlab_0.9-32                assertthat_0.2.1             
##  [77] amap_0.8-19                   cachem_1.0.8                 
##  [79] xfun_0.39                     rbibutils_2.2.13             
##  [81] S4Arrays_1.0.4                mime_0.12                    
##  [83] RcppEigen_0.3.3.9.3           tidygraph_1.2.3              
##  [85] survival_3.5-5                fastICA_1.2-3                
##  [87] statmod_1.5.0                 interactiveDisplayBase_1.38.0
##  [89] ellipsis_0.3.2                TH.data_1.1-2                
##  [91] tsne_0.1-3.1                  nlme_3.1-162                 
##  [93] naturalsort_0.1.3             bit64_4.0.5                  
##  [95] progress_1.2.2                gmodels_2.18.1.1             
##  [97] filelock_1.0.2                bslib_0.5.0                  
##  [99] colorspace_2.1-0              DBI_1.1.3                    
## [101] nnet_7.3-19                   mnormt_2.1.1                 
## [103] tidyselect_1.2.0              bit_4.0.5                    
## [105] compiler_4.3.1                curl_5.0.1                   
## [107] rvest_1.0.3                   expm_0.999-7                 
## [109] xml2_1.3.5                    TFisher_0.2.0                
## [111] ggdendro_0.1.23               DelayedArray_0.26.6          
## [113] shadowtext_0.1.2              bookdown_0.34                
## [115] rtracklayer_1.60.0            harmonicmeanp_3.0            
## [117] sfsmisc_1.1-15                scales_1.2.1                 
## [119] DEoptimR_1.1-0                RBGL_1.76.0                  
## [121] rappdirs_0.3.3                snowfall_1.84-6.2            
## [123] apcluster_1.4.10              digest_0.6.33                
## [125] rmarkdown_2.23                XVector_0.40.0               
## [127] htmltools_0.5.5               pkgconfig_2.0.3              
## [129] highr_0.10                    dbplyr_2.3.3                 
## [131] fastmap_1.1.1                 rlang_1.1.1                  
## [133] shiny_1.7.4.1                 farver_2.1.1                 
## [135] jquerylib_0.1.4               zoo_1.8-12                   
## [137] jsonlite_1.8.7                BiocParallel_1.34.2          
## [139] mclust_6.0.0                  RCurl_1.98-1.12              
## [141] magrittr_2.0.3                modeltools_0.2-23            
## [143] GenomeInfoDbData_1.2.10       munsell_0.5.0                
## [145] Rcpp_1.0.11                   viridis_0.6.3                
## [147] stringi_1.7.12                zlibbioc_1.46.0              
## [149] MASS_7.3-60                   plyr_1.8.8                   
## [151] AnnotationHub_3.8.0           org.Hs.eg.db_3.17.0          
## [153] flexmix_2.3-19                parallel_4.3.1               
## [155] ggrepel_0.9.3                 Biostrings_2.68.1            
## [157] graphlayouts_1.0.0            splines_4.3.1                
## [159] multtest_2.56.0               hms_1.1.3                    
## [161] locfit_1.5-9.8                qqconf_1.3.2                 
## [163] igraph_1.5.0                  fastcluster_1.2.3            
## [165] reshape2_1.4.4                biomaRt_2.56.1               
## [167] BiocVersion_3.17.1            XML_3.99-0.14                
## [169] evaluate_0.21                 metap_1.8                    
## [171] pcalg_2.7-8                   BiocManager_1.30.21          
## [173] tzdb_0.4.0                    tweenr_2.0.2                 
## [175] httpuv_1.6.11                 polyclip_1.10-4              
## [177] clue_0.3-64                   BiocBaseUtils_1.2.0          
## [179] ggforce_0.4.1                 xtable_1.8-4                 
## [181] restfulr_0.0.15               e1071_1.7-13                 
## [183] later_1.3.1                   viridisLite_0.4.2            
## [185] class_7.3-22                  snow_0.4-4                   
## [187] ggm_2.5                       memoise_2.0.1                
## [189] AnnotationDbi_1.62.2          GenomicAlignments_1.36.0     
## [191] ellipse_0.4.5                 cluster_2.1.4                
## [193] timechange_0.2.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.