STRING is a comprehensive database of protein-protein interactions (PPI) that in version 11.0, covers 24,584,628 proteins from 5,090 organisms. Directly quoting from their paper:
The STRING database aims to collect, score and integrate all publicly available sources of protein–protein interaction information, and to complement these with computational predictions. Its goal is to achieve a comprehensive and objective global network, including direct (physical) as well as indirect (functional) interactions.
(source: Szklarczyk, Damian, et al. “STRING v11: protein–protein association networks with increased coverage, supporting functional discovery in genome-wide experimental datasets.” Nucleic acids research 47.D1 (2019): D607-D613. )
You can find an argument named “species” in every rbioapi STRING function. Providing the species argument is not mandatory, but it has been recommended in STRING API’s documentation to always specify the species. An exception is when your input proteins’ vector length is more than 100; In such cases, the species argument is required. Otherwise, calling the function without providing the species will produce an ERROR.
Although STRING API resources will handle and recognize a variety of identifiers, it is recommended that you first map your IDs to STRING IDs before using them in other rbioapi STRING functions.
## 1 We create a variable with our genes' NCBI IDs <- c("p53", "BRCA1", "cdk2", "Q99835", "CDC42","CDK1","KIF23", proteins "PLK1","RAC2","RACGAP1","RHOA","RHOB", "PHF14", "RBM3") ## 2 Now we map our protein IDs <- rba_string_map_ids(ids = proteins, proteins_mapped species = 9606) ## 3 What we need and will use for the rest of this vignette is the `stringId` column
You can retrieve a list of interactions that the proteins in your set have with each other along with the STRING annotations of each interaction. You may filter the results by using required_score and network_type arguments.
See the ‘values’ section
rba_string_interactions_network function’s manual for information on the returned columns.
<- rba_string_interactions_network(ids = proteins_mapped, int_net species = 9606, required_score = 500)
In the last example, we only obtained the interaction which our proteins have among themselves, what if we wanted to get a list of every protein which interact with our protein(s)?
To do that, we can use
## Although we supply only one protein ID here (CD40 protein), you can provide a vector of proteins as the input <- rba_string_interaction_partners(ids = "9606.ENSP00000361359", int_partners species = 9606, required_score = 900)
Let’s go back to the interaction network. As you must have seen in the STRING webpages, STRING plots the interaction network of your proteins with many customizations available. You can also do that with STRING API services.
rba_string_network_image function is very flexible and you have a variety of options; see the function’s manual.
## Example 1: <- rba_string_network_image(ids = proteins_mapped, graph_1 image_format = "image", species = 9606, save_image = FALSE, required_score = 500, network_flavor = "confidence")
## Example 2: <- rba_string_network_image(ids = proteins_mapped, graph_2 image_format = "image", species = 9606, save_image = FALSE, required_score = 500, add_color_nodes = 5, add_white_nodes = 5, network_flavor = "actions")
STRING let you perform two types of enrichments. See STRING’s paper for more information.
The first type is the conventional type, which statistically tests your supplied gene sets against some sets of annotation. Currently, STRING supports Gene Ontology, KEGG pathways, UniProt Keywords, PubMed publications, Pfam domains, InterPro domains, and SMART domains. (source).
<- rba_string_enrichment(ids = proteins_mapped, enriched species = 9606)
Even without incorporating annotation data, STRING can calculate if your proteins are functionally related. Briefly, STRING accomplishes this by comparing the interactions’ distribution in your protein-set to the interactions’ distribution in the proteome. Read STRING’s paper for more information.
rba_string_enrichment_ppi(ids = proteins_mapped, species = 9606) #> $p_value #>  "2.03e-06" #> #> $average_node_degree #>  5.714286 #> #> $number_of_edges #>  40 #> #> $number_of_nodes #>  14 #> #> $expected_number_of_edges #>  17 #> #> $local_clustering_coefficient #>  0.6374717
As you have seen above, STRING maps the proteins to multiple annotation sources. You can obtain any annotation associated with your proteins without performing enrichment analysis and retrieving just the significant portion.
<- rba_string_annotations(ids = "9606.ENSP00000269305", annotations species = 9606) ## This function returns large results, so the results was not shown in this vignette.
Some rbioapi STRING functions were not covered in this vignette, please check their manuals:
#> R version 4.1.0 (2021-05-18) #> Platform: x86_64-w64-mingw32/x64 (64-bit) #> Running under: Windows 10 x64 (build 19043) #> #> Matrix products: default #> #> locale: #>  LC_COLLATE=C #>  LC_CTYPE=English_United States.1252 #>  LC_MONETARY=English_United States.1252 #>  LC_NUMERIC=C #>  LC_TIME=English_United States.1252 #> system code page: 1256 #> #> attached base packages: #>  stats graphics grDevices utils datasets methods base #> #> other attached packages: #>  rbioapi_0.7.4 #> #> loaded via a namespace (and not attached): #>  png_0.1-7 digest_0.6.27 grid_4.1.0 R6_2.5.0 #>  jsonlite_1.7.2 magrittr_2.0.1 evaluate_0.14 highr_0.9 #>  httr_1.4.2 rlang_0.4.11 stringi_1.6.1 curl_4.3.1 #>  jquerylib_0.1.4 DT_0.18 bslib_0.2.5.1 rmarkdown_2.9 #>  tools_4.1.0 stringr_1.4.0 htmlwidgets_1.5.3 crosstalk_1.1.1 #>  xfun_0.23 yaml_2.2.1 compiler_4.1.0 htmltools_0.5.1.1 #>  knitr_1.33 sass_0.4.0