Skip to contents

STRING cross-references proteins with several annotation resources. This function retrieves the complete set of annotations assigned to the input proteins, together with information about each term.

Usage

rba_string_annotations(
  ids,
  species = NULL,
  allow_pubmed = FALSE,
  split_df = TRUE,
  only_pubmed = FALSE,
  ...
)

Arguments

ids

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

species

Numeric: (optional) NCBI Taxonomy identifier; Human Taxonomy ID is 9606. (Recommended, but optional.)

allow_pubmed

Logical: (default = FALSE) Include PubMed annotations. These annotations are excluded by default because many publications may be assigned to each protein.

split_df

Logical: (default = TRUE) Split results into a list of data frames by category; otherwise, return one data frame.

only_pubmed

Logical: (default = FALSE) Return only PubMed annotations. This takes precedence over allow_pubmed.

...

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

Value

A data frame in which every row is an assigned term and the columns contain the term category, description, number of genes, and other pertinent information. If split_df = TRUE, a list of data frames split by category is returned. With only_pubmed = TRUE, a one-element list named PMID is returned when PubMed annotations are available.

Details

STRING currently retrieves annotations based on Gene Ontology (GO), UniProt Keywords, PubMed publications, Pfam domains, InterPro domains, SMART domains, and other resources including GWAS Catalog and Hallmark gene sets. Category availability depends on species. KEGG annotations are unavailable from this endpoint because of KEGG licensing restrictions.
This function returns annotations without enrichment filtering. To perform enrichment and retrieve only enriched terms, use rba_string_enrichment.

Corresponding API Resources

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

References

  • Damian Szklarczyk, Katerina Nastou, Mikaela Koutrouli, Rebecca Kirsch, Farrokh Mehryary, Radja Hachilif, Dewei Hu, Matteo E Peluso, Qingyao Huang, Tao Fang, Nadezhda T Doncheva, Sampo Pyysalo, Peer Bork, Lars J Jensen, Christian von Mering, The STRING database in 2025: protein networks with directionality of regulation, Nucleic Acids Research, Volume 53, Issue D1, 6 January 2025, Pages D730–D737, https://doi.org/10.1093/nar/gkae1113

  • STRING API Documentation

  • Citations note on STRING website

Examples

# \donttest{
rba_string_annotations(ids = "TP53", species = 9606)
# }
if (FALSE) { # \dontrun{
rba_string_annotations(
    ids = "TP53",
    species = 9606,
    only_pubmed = TRUE
)
} # }