SBGNview Quick Start

Overview

We previously developed an R/BioConductor package called Pathview, which maps, integrates and visualizes a wide range of data onto KEGG pathway graphs. Since its publication, Pathview has been widely used in omics studies and data analyses, and has become the leading tool in its category. Here we introduce the SBGNview package, which adopts Systems Biology Graphical Notation (SBGN) and greatly extends the Pathview project by supporting multiple major pathway databases beyond KEGG.

Key features:

  • Pathway definition by the widely adopted Systems Biology Graphical Notation (SBGN);

  • Supports multiple major pathway databases beyond KEGG (Reactome, MetaCyc, SMPDB, PANTHER, METACROP etc) and user defined pathways;

  • Covers 5,200 reference pathways and over 3,000 species by default;

  • Extensive graphics controls, including glyph and edge attributes, graph layout and sub-pathway highlight;

  • SBGN pathway data manipulation, processing, extraction and analysis.

Citation

Please cite the following papers when using this open-source package. This will help the project and our team:

Luo W, Brouwer C. Pathview: an R/Biocondutor package for pathway-based data integration and visualization. Bioinformatics, 2013, 29(14):1830-1831, doi: 10.1093/bioinformatics/btt285

Installation

Prerequisites

SBGNview depends or imports from the following R packages:

  • xml2: parse SBGN-ML files
  • rsvg: convert svg files to other formats (pdf, png, ps). librsvg2 is needed to install rsvg. See this page for more details: https://github.com/jeroen/rsvg
  • igraph: find shortest paths
  • httr: search SBGNhub for mapping files
  • KEGGREST: generate mapping tables from scratch when needed
  • pathview: map between different ID types for gene and chemical compound
  • gage: R package for pathway enrichment analysis.
  • SBGNview.data: demo and supportive datasets for SBGNview package
  • SummarizedExperiment: alternative input user data as SummarizedExperiment objects
  • AnnotationDbi: BioConductor annotation data and infrastructure

Note these dependencies will be automatically installed when SBGNview is installed from BioConductor or GitHub. To install them manually within R:

if (!requireNamespace("BiocManager", quietly = TRUE)){
     install.packages("BiocManager")
}
BiocManager::install(c("xml2", "rsvg", "igraph", "httr", "KEGGREST", "pathview", "gage", "SBGNview.data", "SummarizedExperiment", "AnnotationDbi"))

External dependencies (outside R): Windows 10: none

Linux (Ubuntu): needs additional packages (libxml2-dev, libssl-dev, libcurl4-openssl-dev, librsvg2-dev) to be installed. Run the command below in a terminal to install the necessary packages. The same or similar packages can be found for other distributes of linux.

sudo apt install libxml2-dev libssl-dev libcurl4-openssl-dev librsvg2-dev

Install SBGNview

Install SBGNview through Bioconductor:

BiocManager::install(c("SBGNview"))

Install SBGNview through GitHub:

install.packages("devtools")
devtools::install_github("datapplab/SBGNview")

Clone the Git repository:

git clone https://github.com/datapplab/SBGNview.git

Quick example

library(SBGNview)
# load demo dataset, SBGN pathway data collection and info, which may take a few seconds
data("gse16873.d","pathways.info", "sbgn.xmls")
input.pathways <- findPathways("Adrenaline and noradrenaline biosynthesis")
SBGNview.obj <- SBGNview(
          gene.data = gse16873.d[,1:3], 
          gene.id.type = "entrez",
          input.sbgn = input.pathways$pathway.id,
          output.file = "quick.start", 
          output.formats =  c("png")
          ) 
print(SBGNview.obj)

Two image files (a svg file by default and a png file) will be created in the current working directory.

Quick start example: Adrenaline and noradrenaline biosynthesis pathway.
Quick start example: Adrenaline and noradrenaline biosynthesis pathway.

As a unique and useful feature of SBGNview package, we can highlight nodes, edges and/or paths using the highlight functions. Please read the function documentation and main vignette for details.{#quickhighlight}

outputFile(SBGNview.obj) <- "quick.start.highlights"
SBGNview.obj + highlightArcs(class = "production",color = "red") + 
               highlightArcs(class = "consumption",color = "blue") +
               highlightNodes(node.set = c("tyrosine", "(+-)-epinephrine"), 
                              stroke.width = 4, stroke.color = "green") + 
               highlightPath(from.node = "tyrosine", to.node = "dopamine",
                             from.node.color = "green",
                             to.node.color = "blue",
                             shortest.paths.cols = "purple",
                             input.node.stroke.width = 6,
                             path.node.stroke.width = 5,
                             path.node.color = "purple",
                             path.stroke.width = 5,
                             tip.size = 10 )
Quick start example: Highlight arcs, nodes, and path.
Quick start example: Highlight arcs, nodes, and path.

Additional information

This tutorial is just a brief introduction and quick start. For more info, please check the package documentation and main vignettes.

For more info on SBGN, please check the official SBGN project website

For any questions, please contact Kovidh Vegesna (kvegesna [AT] uncc.edu) or Weijun Luo (luo_weijun [AT] yahoo.com)

Session Info

sessionInfo()
## R version 4.4.2 (2024-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.1 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        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: Etc/UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] SBGNview_1.21.0      SBGNview.data_1.20.0 pathview_1.47.0     
## [4] knitr_1.49           bookdown_0.41       
## 
## loaded via a namespace (and not attached):
##  [1] KEGGREST_1.47.0             SummarizedExperiment_1.37.0
##  [3] xfun_0.49                   bslib_0.8.0                
##  [5] lattice_0.22-6              Biobase_2.67.0             
##  [7] vctrs_0.6.5                 tools_4.4.2                
##  [9] Rdpack_2.6.2                bitops_1.0-9               
## [11] generics_0.1.3              stats4_4.4.2               
## [13] AnnotationDbi_1.69.0        RSQLite_2.3.8              
## [15] blob_1.2.4                  pkgconfig_2.0.3            
## [17] Matrix_1.7-1                S4Vectors_0.45.2           
## [19] graph_1.85.0                lifecycle_1.0.4            
## [21] GenomeInfoDbData_1.2.13     compiler_4.4.2             
## [23] Biostrings_2.75.1           GenomeInfoDb_1.43.1        
## [25] htmltools_0.5.8.1           sys_3.4.3                  
## [27] buildtools_1.0.0            sass_0.4.9                 
## [29] RCurl_1.98-1.16             yaml_2.3.10                
## [31] crayon_1.5.3                jquerylib_0.1.4            
## [33] DelayedArray_0.33.2         cachem_1.1.0               
## [35] org.Hs.eg.db_3.20.0         abind_1.4-8                
## [37] digest_0.6.37               maketools_1.3.1            
## [39] rsvg_2.6.1                  fastmap_1.2.0              
## [41] grid_4.4.2                  SparseArray_1.7.2          
## [43] cli_3.6.3                   magrittr_2.0.3             
## [45] S4Arrays_1.7.1              XML_3.99-0.17              
## [47] UCSC.utils_1.3.0            bit64_4.5.2                
## [49] rmarkdown_2.29              XVector_0.47.0             
## [51] httr_1.4.7                  matrixStats_1.4.1          
## [53] igraph_2.1.1                bit_4.5.0                  
## [55] png_0.1-8                   memoise_2.0.1              
## [57] evaluate_1.0.1              GenomicRanges_1.59.1       
## [59] IRanges_2.41.1              rbibutils_2.3              
## [61] rlang_1.1.4                 DBI_1.2.3                  
## [63] Rgraphviz_2.51.0            xml2_1.3.6                 
## [65] BiocGenerics_0.53.3         KEGGgraph_1.67.0           
## [67] jsonlite_1.8.9              R6_2.5.1                   
## [69] MatrixGenerics_1.19.0       zlibbioc_1.52.0