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 Under development (unstable) (2022-10-25 r83175)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 22.04.1 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       
## 
## attached base packages:
## [1] stats4    stats     graphics  grDevices utils     datasets  methods  
## [8] base     
## 
## other attached packages:
##  [1] dce_1.7.0                   graph_1.77.0               
##  [3] cowplot_1.1.1               forcats_0.5.2              
##  [5] stringr_1.4.1               dplyr_1.0.10               
##  [7] purrr_0.3.5                 readr_2.1.3                
##  [9] tidyr_1.2.1                 tibble_3.1.8               
## [11] tidyverse_1.3.2             TCGAutils_1.19.0           
## [13] curatedTCGAData_1.19.2      MultiAssayExperiment_1.25.0
## [15] SummarizedExperiment_1.29.0 Biobase_2.59.0             
## [17] GenomicRanges_1.51.0        GenomeInfoDb_1.35.0        
## [19] IRanges_2.33.0              S4Vectors_0.37.0           
## [21] BiocGenerics_0.45.0         MatrixGenerics_1.11.0      
## [23] matrixStats_0.62.0          ggraph_2.1.0               
## [25] ggplot2_3.3.6               BiocStyle_2.27.0           
## 
## loaded via a namespace (and not attached):
##   [1] fs_1.5.2                      bitops_1.0-7                 
##   [3] lubridate_1.8.0               httr_1.4.4                   
##   [5] GenomicDataCommons_1.23.0     prabclus_2.3-2               
##   [7] Rgraphviz_2.43.0              numDeriv_2016.8-1.1          
##   [9] tools_4.3.0                   backports_1.4.1              
##  [11] vegan_2.6-4                   utf8_1.2.2                   
##  [13] R6_2.5.1                      mgcv_1.8-41                  
##  [15] sn_2.1.0                      permute_0.9-7                
##  [17] withr_2.5.0                   graphite_1.45.0              
##  [19] prettyunits_1.1.1             gridExtra_2.3                
##  [21] flexclust_1.4-1               cli_3.4.1                    
##  [23] sandwich_3.0-2                labeling_0.4.2               
##  [25] sass_0.4.2                    diptest_0.76-0               
##  [27] robustbase_0.95-0             mvtnorm_1.1-3                
##  [29] proxy_0.4-27                  Rsamtools_2.15.0             
##  [31] FMStable_0.1-4                Linnorm_2.23.0               
##  [33] plotrix_3.8-2                 limma_3.55.0                 
##  [35] readxl_1.4.1                  RSQLite_2.2.18               
##  [37] generics_0.1.3                BiocIO_1.9.0                 
##  [39] gtools_3.9.3                  wesanderson_0.3.6            
##  [41] googlesheets4_1.0.1           Matrix_1.5-1                 
##  [43] fansi_1.0.3                   abind_1.4-5                  
##  [45] logger_0.2.2                  lifecycle_1.0.3              
##  [47] multcomp_1.4-20               yaml_2.3.6                   
##  [49] edgeR_3.41.0                  mathjaxr_1.6-0               
##  [51] BiocFileCache_2.7.0           Rtsne_0.16                   
##  [53] grid_4.3.0                    blob_1.2.3                   
##  [55] promises_1.2.0.1              gdata_2.18.0.1               
##  [57] ppcor_1.1                     bdsmatrix_1.3-6              
##  [59] ExperimentHub_2.7.0           crayon_1.5.2                 
##  [61] lattice_0.20-45               haven_2.5.1                  
##  [63] GenomicFeatures_1.51.0        KEGGREST_1.39.0              
##  [65] magick_2.7.3                  pillar_1.8.1                 
##  [67] knitr_1.40                    rjson_0.2.21                 
##  [69] fpc_2.2-9                     corpcor_1.6.10               
##  [71] codetools_0.2-18              mutoss_0.1-12                
##  [73] glue_1.6.2                    RcppArmadillo_0.11.4.0.1     
##  [75] data.table_1.14.4             vctrs_0.5.0                  
##  [77] png_0.1-7                     Rdpack_2.4                   
##  [79] cellranger_1.1.0              mnem_1.15.0                  
##  [81] gtable_0.3.1                  kernlab_0.9-31               
##  [83] assertthat_0.2.1              amap_0.8-19                  
##  [85] cachem_1.0.6                  xfun_0.34                    
##  [87] rbibutils_2.2.9               mime_0.12                    
##  [89] RcppEigen_0.3.3.9.2           tidygraph_1.2.2              
##  [91] survival_3.4-0                gargle_1.2.1                 
##  [93] fastICA_1.2-3                 statmod_1.4.37               
##  [95] interactiveDisplayBase_1.37.0 ellipsis_0.3.2               
##  [97] TH.data_1.1-1                 tsne_0.1-3.1                 
##  [99] nlme_3.1-160                  naturalsort_0.1.3            
## [101] bit64_4.0.5                   progress_1.2.2               
## [103] gmodels_2.18.1.1              filelock_1.0.2               
## [105] bslib_0.4.0                   colorspace_2.0-3             
## [107] DBI_1.1.3                     nnet_7.3-18                  
## [109] mnormt_2.1.1                  tidyselect_1.2.0             
## [111] bit_4.0.4                     compiler_4.3.0               
## [113] curl_4.3.3                    rvest_1.0.3                  
## [115] expm_0.999-6                  xml2_1.3.3                   
## [117] TFisher_0.2.0                 ggdendro_0.1.23              
## [119] DelayedArray_0.25.0           shadowtext_0.1.2             
## [121] bookdown_0.29                 rtracklayer_1.59.0           
## [123] harmonicmeanp_3.0             sfsmisc_1.1-13               
## [125] scales_1.2.1                  DEoptimR_1.0-11              
## [127] RBGL_1.75.0                   rappdirs_0.3.3               
## [129] snowfall_1.84-6.2             apcluster_1.4.10             
## [131] digest_0.6.30                 rmarkdown_2.17               
## [133] XVector_0.39.0                htmltools_0.5.3              
## [135] pkgconfig_2.0.3               highr_0.9                    
## [137] dbplyr_2.2.1                  fastmap_1.1.0                
## [139] rlang_1.0.6                   shiny_1.7.3                  
## [141] farver_2.1.1                  jquerylib_0.1.4              
## [143] zoo_1.8-11                    jsonlite_1.8.3               
## [145] BiocParallel_1.33.0           mclust_6.0.0                 
## [147] RCurl_1.98-1.9                magrittr_2.0.3               
## [149] modeltools_0.2-23             GenomeInfoDbData_1.2.9       
## [151] munsell_0.5.0                 Rcpp_1.0.9                   
## [153] viridis_0.6.2                 stringi_1.7.8                
## [155] zlibbioc_1.45.0               MASS_7.3-58.1                
## [157] plyr_1.8.7                    AnnotationHub_3.7.0          
## [159] org.Hs.eg.db_3.16.0           flexmix_2.3-18               
## [161] parallel_4.3.0                ggrepel_0.9.1                
## [163] Biostrings_2.67.0             graphlayouts_0.8.3           
## [165] splines_4.3.0                 multtest_2.55.0              
## [167] hms_1.1.2                     locfit_1.5-9.6               
## [169] qqconf_1.3.0                  fastcluster_1.2.3            
## [171] igraph_1.3.5                  reshape2_1.4.4               
## [173] biomaRt_2.55.0                BiocVersion_3.17.0           
## [175] XML_3.99-0.12                 reprex_2.0.2                 
## [177] evaluate_0.17                 metap_1.8                    
## [179] pcalg_2.7-7                   modelr_0.1.9                 
## [181] BiocManager_1.30.19           tzdb_0.3.0                   
## [183] tweenr_2.0.2                  httpuv_1.6.6                 
## [185] polyclip_1.10-4               clue_0.3-62                  
## [187] BiocBaseUtils_1.1.0           ggforce_0.4.1                
## [189] broom_1.0.1                   xtable_1.8-4                 
## [191] restfulr_0.0.15               e1071_1.7-12                 
## [193] later_1.3.0                   viridisLite_0.4.1            
## [195] class_7.3-20.1                googledrive_2.0.0            
## [197] snow_0.4-4                    ggm_2.5                      
## [199] ellipse_0.4.3                 memoise_2.0.1                
## [201] AnnotationDbi_1.61.0          GenomicAlignments_1.35.0     
## [203] cluster_2.1.4

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.