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

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.