get_svg: Get a network SVG file from STRING website

Description Usage Arguments Value Examples

View source: R/get_svg.R

Description

get_svg is a modified version of STRINGdb's get_png. It returns a SVG image of a STRING network with the given identifiers.

Usage

1
2
3
4
5
6
7
8
get_svg(
  string_db,
  string_ids,
  required_score = NULL,
  network_flavor = c("evidence", "confidence", "actions"),
  file = NULL,
  payload_id = NULL
)

Arguments

string_db

An instantiated STRINGdb reference class. See STRINGdb-class.

string_ids

A vector of STRING IDs.

required_score

An integer. The minimum STRING combined score of the interactions.

network_flavor

One of "evidence", "confidence", "actions", specify the flavor of the network

file

Optional. Specify the file for the image.

payload_id

Optional. See Payload Mechanism in STRINGdb's vignette.

Value

Return a XML document and a SVG file if file is specified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# extract the most significant 200 genes
hits <- example1_mapped$STRING_id[1:200]

# save the XML document in a variable for downstream manipulation
xml <- get_svg(string_db, hits)

## Not run: 
# print a SVG file
get_svg(string_db, hits, file = "my_network.svg")

## End(Not run)

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