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.0 RC (2022-04-21 r82226)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 20.04.4 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.5.1                   graph_1.75.0               
##  [3] cowplot_1.1.1               forcats_0.5.1              
##  [5] stringr_1.4.0               dplyr_1.0.9                
##  [7] purrr_0.3.4                 readr_2.1.2                
##  [9] tidyr_1.2.0                 tibble_3.1.7               
## [11] tidyverse_1.3.1             TCGAutils_1.17.0           
## [13] curatedTCGAData_1.19.0      MultiAssayExperiment_1.23.0
## [15] SummarizedExperiment_1.27.1 Biobase_2.57.0             
## [17] GenomicRanges_1.49.0        GenomeInfoDb_1.33.3        
## [19] IRanges_2.31.0              S4Vectors_0.35.0           
## [21] BiocGenerics_0.43.0         MatrixGenerics_1.9.0       
## [23] matrixStats_0.62.0          ggraph_2.0.5               
## [25] ggplot2_3.3.6               BiocStyle_2.25.0           
## 
## loaded via a namespace (and not attached):
##   [1] rappdirs_0.3.3                rtracklayer_1.57.0           
##   [3] prabclus_2.3-2                bit64_4.0.5                  
##   [5] knitr_1.39                    multcomp_1.4-19              
##   [7] DelayedArray_0.23.0           data.table_1.14.2            
##   [9] wesanderson_0.3.6             KEGGREST_1.37.0              
##  [11] RCurl_1.98-1.6                generics_0.1.2               
##  [13] metap_1.8                     GenomicFeatures_1.49.1       
##  [15] TH.data_1.1-1                 RSQLite_2.2.14               
##  [17] shadowtext_0.1.2              proxy_0.4-26                 
##  [19] bit_4.0.4                     tzdb_0.3.0                   
##  [21] mutoss_0.1-12                 xml2_1.3.3                   
##  [23] lubridate_1.8.0               httpuv_1.6.5                 
##  [25] assertthat_0.2.1              viridis_0.6.2                
##  [27] amap_0.8-18                   xfun_0.30                    
##  [29] hms_1.1.1                     jquerylib_0.1.4              
##  [31] evaluate_0.15                 promises_1.2.0.1             
##  [33] DEoptimR_1.0-11               fansi_1.0.3                  
##  [35] restfulr_0.0.13               progress_1.2.2               
##  [37] dbplyr_2.1.1                  readxl_1.4.0                 
##  [39] Rgraphviz_2.41.0              igraph_1.3.1                 
##  [41] DBI_1.1.2                     tmvnsim_1.0-2                
##  [43] apcluster_1.4.9               RcppArmadillo_0.11.0.0.0     
##  [45] ellipsis_0.3.2                backports_1.4.1              
##  [47] bookdown_0.26                 permute_0.9-7                
##  [49] harmonicmeanp_3.0             biomaRt_2.53.1               
##  [51] vctrs_0.4.1                   abind_1.4-5                  
##  [53] Linnorm_2.21.0                cachem_1.0.6                 
##  [55] RcppEigen_0.3.3.9.2           withr_2.5.0                  
##  [57] sfsmisc_1.1-13                ggforce_0.3.3                
##  [59] robustbase_0.95-0             bdsmatrix_1.3-4              
##  [61] vegan_2.6-2                   GenomicAlignments_1.33.0     
##  [63] pcalg_2.7-6                   prettyunits_1.1.1            
##  [65] mclust_5.4.9                  mnormt_2.0.2                 
##  [67] cluster_2.1.3                 ExperimentHub_2.5.0          
##  [69] GenomicDataCommons_1.21.1     crayon_1.5.1                 
##  [71] ellipse_0.4.2                 labeling_0.4.2               
##  [73] FMStable_0.1-2                edgeR_3.39.1                 
##  [75] pkgconfig_2.0.3               qqconf_1.2.3                 
##  [77] tweenr_1.0.2                  nlme_3.1-157                 
##  [79] ggm_2.5                       nnet_7.3-17                  
##  [81] rlang_1.0.2                   diptest_0.76-0               
##  [83] lifecycle_1.0.1               sandwich_3.0-1               
##  [85] filelock_1.0.2                BiocFileCache_2.5.0          
##  [87] mathjaxr_1.6-0                modelr_0.1.8                 
##  [89] AnnotationHub_3.5.0           cellranger_1.1.0             
##  [91] polyclip_1.10-0               Matrix_1.4-1                 
##  [93] zoo_1.8-10                    reprex_2.0.1                 
##  [95] png_0.1-7                     viridisLite_0.4.0            
##  [97] rjson_0.2.21                  bitops_1.0-7                 
##  [99] Biostrings_2.65.0             blob_1.2.3                   
## [101] scales_1.2.0                  plyr_1.8.7                   
## [103] memoise_2.0.1                 graphite_1.43.0              
## [105] magrittr_2.0.3                gdata_2.18.0                 
## [107] zlibbioc_1.43.0               compiler_4.2.0               
## [109] BiocIO_1.7.1                  clue_0.3-60                  
## [111] plotrix_3.8-2                 Rsamtools_2.13.1             
## [113] cli_3.3.0                     XVector_0.37.0               
## [115] MASS_7.3-57                   mgcv_1.8-40                  
## [117] tidyselect_1.1.2              stringi_1.7.6                
## [119] highr_0.9                     yaml_2.3.5                   
## [121] locfit_1.5-9.5                ggrepel_0.9.1                
## [123] grid_4.2.0                    sass_0.4.1                   
## [125] tools_4.2.0                   parallel_4.2.0               
## [127] rstudioapi_0.13               snowfall_1.84-6.1            
## [129] gridExtra_2.3                 farver_2.1.0                 
## [131] Rtsne_0.16                    digest_0.6.29                
## [133] BiocManager_1.30.17           flexclust_1.4-1              
## [135] shiny_1.7.1                   mnem_1.13.0                  
## [137] fpc_2.2-9                     ppcor_1.1                    
## [139] Rcpp_1.0.8.3                  broom_0.8.0                  
## [141] BiocVersion_3.16.0            later_1.3.0                  
## [143] org.Hs.eg.db_3.15.0           httr_1.4.3                   
## [145] ggdendro_0.1.23               AnnotationDbi_1.59.0         
## [147] kernlab_0.9-30                naturalsort_0.1.3            
## [149] Rdpack_2.3                    colorspace_2.0-3             
## [151] rvest_1.0.2                   XML_3.99-0.9                 
## [153] fs_1.5.2                      splines_4.2.0                
## [155] RBGL_1.73.0                   statmod_1.4.36               
## [157] sn_2.0.2                      expm_0.999-6                 
## [159] graphlayouts_0.8.0            multtest_2.53.0              
## [161] flexmix_2.3-17                xtable_1.8-4                 
## [163] jsonlite_1.8.0                tidygraph_1.2.1              
## [165] corpcor_1.6.10                modeltools_0.2-23            
## [167] R6_2.5.1                      gmodels_2.18.1               
## [169] TFisher_0.2.0                 pillar_1.7.0                 
## [171] htmltools_0.5.2               mime_0.12                    
## [173] glue_1.6.2                    fastmap_1.1.0                
## [175] BiocParallel_1.31.3           class_7.3-20                 
## [177] interactiveDisplayBase_1.35.0 codetools_0.2-18             
## [179] tsne_0.1-3.1                  mvtnorm_1.1-3                
## [181] utf8_1.2.2                    lattice_0.20-45              
## [183] bslib_0.3.1                   logger_0.2.2                 
## [185] numDeriv_2016.8-1.1           curl_4.3.2                   
## [187] gtools_3.9.2                  magick_2.7.3                 
## [189] survival_3.3-1                limma_3.53.0                 
## [191] rmarkdown_2.14                fastICA_1.2-3                
## [193] munsell_0.5.0                 e1071_1.7-9                  
## [195] fastcluster_1.2.3             GenomeInfoDbData_1.2.8       
## [197] reshape2_1.4.4                haven_2.5.0                  
## [199] gtable_0.3.0                  rbibutils_2.2.8

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.