knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%",
  message = FALSE,
  warning = FALSE
)

STRINGutils

STRINGutils provides additional utilities for STRINGdb such as getting SVG file of STRING network and highlighting features of interest.

Installation

You can install STRINGutils with:

devtools::install_github("chiasinL/STRINGutils")

Quick demo

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")


chiasinL/STRINGutils documentation built on Dec. 19, 2021, 3:56 p.m.