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.
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
SBGNview depends or imports from the following R packages:
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 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
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.
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 )
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)
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] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] SBGNview_1.12.0 SBGNview.data_1.11.0 pathview_1.38.0
## [4] knitr_1.40
##
## loaded via a namespace (and not attached):
## [1] KEGGgraph_1.58.0 Rcpp_1.0.9
## [3] lattice_0.20-45 png_0.1-7
## [5] rsvg_2.3.2 Biostrings_2.66.0
## [7] digest_0.6.30 R6_2.5.1
## [9] GenomeInfoDb_1.34.0 stats4_4.2.1
## [11] RSQLite_2.2.18 evaluate_0.17
## [13] highr_0.9 httr_1.4.4
## [15] Rdpack_2.4 zlibbioc_1.44.0
## [17] rlang_1.0.6 Rgraphviz_2.42.0
## [19] jquerylib_0.1.4 blob_1.2.3
## [21] S4Vectors_0.36.0 Matrix_1.5-1
## [23] rmarkdown_2.17 stringr_1.4.1
## [25] igraph_1.3.5 RCurl_1.98-1.9
## [27] bit_4.0.4 DelayedArray_0.24.0
## [29] compiler_4.2.1 xfun_0.34
## [31] pkgconfig_2.0.3 BiocGenerics_0.44.0
## [33] htmltools_0.5.3 KEGGREST_1.38.0
## [35] SummarizedExperiment_1.28.0 GenomeInfoDbData_1.2.9
## [37] bookdown_0.29 IRanges_2.32.0
## [39] matrixStats_0.62.0 XML_3.99-0.12
## [41] crayon_1.5.2 bitops_1.0-7
## [43] rbibutils_2.2.9 grid_4.2.1
## [45] jsonlite_1.8.3 DBI_1.1.3
## [47] magrittr_2.0.3 graph_1.76.0
## [49] cli_3.4.1 stringi_1.7.8
## [51] cachem_1.0.6 XVector_0.38.0
## [53] xml2_1.3.3 bslib_0.4.0
## [55] vctrs_0.5.0 org.Hs.eg.db_3.16.0
## [57] tools_4.2.1 bit64_4.0.5
## [59] Biobase_2.58.0 MatrixGenerics_1.10.0
## [61] fastmap_1.1.0 yaml_2.3.6
## [63] AnnotationDbi_1.60.0 GenomicRanges_1.50.0
## [65] memoise_2.0.1 sass_0.4.2