Skip to contents

Depending on that you supplied a single protein ID or more than one protein ID, this function will produce a static image of the interaction networks among your input proteins or/and with other proteins. See the "Arguments" section to learn more about how you can modify the network image.

Usage

rba_string_network_image(
  ids,
  image_format = "image",
  save_image = TRUE,
  species = NULL,
  add_color_nodes = NULL,
  add_white_nodes = NULL,
  required_score = NULL,
  network_flavor = "evidence",
  network_type = "functional",
  hide_node_labels = FALSE,
  use_query_labels = FALSE,
  hide_disconnected_nodes = FALSE,
  hide_structure_pics = FALSE,
  flat_nodes = FALSE,
  node_labels_center = FALSE,
  node_labels_font_size = 12,
  ...
)

Arguments

ids

Your protein ID(s). It is strongly recommended to supply STRING IDs. See rba_string_map_ids for more information.

image_format

one of:

  • "image": PNG image with normal resolution.

  • "highres_image": High-resolution PNG image.

  • "svg": Scalable Vector Graphics image.

save_image

Logical or Character:

  • TRUE: Save the image to an automatically-generated path.

  • FALSE: Do not save the image, just return it as an R object.

  • Character string: A valid file path to save the image to.

species

Numeric: NCBI Taxonomy identifier; Human Taxonomy ID is 9606. (Recommended, but optional if your input is less than 100 IDs.)

add_color_nodes

Numeric: The number of colored nodes (queried proteins and first shell of interactors) to be added.

add_white_nodes

Numeric: The number of white nodes (second shell of interactors) to be added after colored nodes.

required_score

Numeric (Between 0 to 1000): A minimum of interaction score for an interaction to be included in the image. if not supplied, the threshold will be applied by STRING Based in the network. (low Confidence = 150, Medium Confidence = 400, High Confidence = 700, Highest confidence = 900)

network_flavor

The style of network edges, should be one of:

  • "evidence": (default) Line's color is based on the type of evidences that support the interaction.

  • "confidence": Line's thickness is an indicator of the interaction's confidence score.

  • "action": Line's Shape is an indicator of the interaction's predicted mode of actions.

network_type

should be one of:

  • "functional": (default) The edge's indicate both physical and functional associations.

  • "physical": The edges indicate that two proteins have a physical interaction or are parts of a complex.

hide_node_labels

Logical: (Default = FALSE) Hide proteins names from the image

use_query_labels

Logical: (Default = FALSE) Use the names supplied with the 'ids' argument as the nodes labels instead of STRING's default ones.

hide_disconnected_nodes

Logical: (Default = FALSE) Hide proteins that are not connected to any other proteins from the image

hide_structure_pics

Logical: (Default = FALSE) Hide protein's structure picture from inside the bubbles

flat_nodes

Logical: (Default = FALSE) Make the nodes design flat instead of the default 3D design

node_labels_center

Logical: (Default = FALSE) Position the protein names labels center aligned on the nodes

node_labels_font_size

Numeric (Between 5 to 50, Default = 12) Font size of the protein nodes labels

...

rbioapi option(s). See rba_options's arguments manual for more information on available options.

Value

A network images which can be PNG or SVG depending on the inputs.

Corresponding API Resources

"POST https://string-db.org/api/{output-format}/network?identifiers= {your_identifiers}&{optional_parameters}"

References

  • Damian Szklarczyk, Rebecca Kirsch, Mikaela Koutrouli, Katerina Nastou, Farrokh Mehryary, Radja Hachilif, Annika L Gable, Tao Fang, Nadezhda T Doncheva, Sampo Pyysalo, Peer Bork, Lars J Jensen, Christian von Mering, The STRING database in 2023: protein–protein association networks and functional enrichment analyses for any sequenced genome of interest, Nucleic Acids Research, Volume 51, Issue D1, 6 January 2023, Pages D638–D646, https://doi.org/10.1093/nar/gkac1000

  • STRING API Documentation

  • Citations note on STRING website

Examples

if (FALSE) {
rba_string_network_image(ids = c("9606.ENSP00000269305",
    "9606.ENSP00000398698",
    "9606.ENSP00000275493"),
    network_type = "functional",
    save_image = FALSE)
}
if (FALSE) {
rba_string_network_image(ids = c("TP53", "TNF", "EGFR"),
    species = 9606,
    save_image = TRUE)
}
if (FALSE) {
rba_string_network_image(ids = "9606.ENSP00000269305",
    image_format = "highres_image",
    save_image = file.path(getwd(), "TP53_network.png"))
}