knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%", message = FALSE, warning = FALSE )
STRINGutils provides additional utilities for STRINGdb such as getting SVG file of STRING network and highlighting features of interest.
You can install STRINGutils with:
devtools::install_github("chiasinL/STRINGutils")
For more thorough walkthrough of the package, please see the vignette.
Getting SVG file of STRING network:
library(STRINGutils) data(list = c("example1_mapped", "string_db")) hits <- example1_mapped$STRING_id[1:200] feature_of_int <- c("VSTM2L","TBC1D2","LENG9","TMEM27","TSPAN1", "TNNC1","MGAM","TRIM22","KLK11","TYROBP") colors_vec <- rep("rgb(101,226,11)", length(feature_of_int)) names(colors_vec) <- feature_of_int
library(STRINGutils) svg <- get_svg(string_db, hits, file = "my_network.svg")
magick::image_read_svg("my_network.svg")
If we have a list of proteins of interest, the full or sub- STRING network of the proteins can be obtained. These proteins will be highlighted by the colors of choice.
For full network:
plot_features(example1_mapped, colors_vec, string_db, entire = TRUE)
magick::image_read_svg("features_of_int.svg")
For subnetwork:
plot_features(example1_mapped, colors_vec, string_db)
magick::image_read_svg("features_of_int.svg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.