Directly quoting from UniProt:
The Universal Protein Resource (UniProt) is a comprehensive resource for protein sequence and annotation data. The UniProt databases are the UniProt Knowledgebase (UniProtKB), the UniProt Reference Clusters (UniRef), and the UniProt Archive (UniParc). The UniProt consortium and host institutions EMBL-EBI, SIB and PIR are committed to the long-term preservation of the UniProt databases.
(source: https://www.uniprot.org/help/about)
Most rbioapi UniProt function families have two variants: one
retrieves data using a supported identifier, while the other (with a
_search suffix) searches using one or more service-specific
criteria. We first demonstrate this using an example, then provide a
list of these function families in rbioapi.
Suppose we are interested in the human CD40 ligand protein and know that its UniProt accession is “P29965”. We can retrieve it directly:
## 1 Retrieve CD40 ligand by its UniProt accession
cd40 <- rba_uniprot_proteins(accession = "P29965")
## 2 Inspect the returned object's structure
str(cd40, 1)
#> List of 13
#> $ accession : chr "P29965"
#> $ id : chr "CD40L_HUMAN"
#> $ proteinExistence: chr "Evidence at protein level"
#> $ info :List of 4
#> $ organism :List of 3
#> $ protein :List of 4
#> $ gene :'data.frame': 1 obs. of 2 variables:
#> $ comments :'data.frame': 12 obs. of 10 variables:
#> $ features :'data.frame': 65 obs. of 9 variables:
#> $ dbReferences :'data.frame': 141 obs. of 4 variables:
#> $ keywords :'data.frame': 14 obs. of 1 variable:
#> $ references :'data.frame': 25 obs. of 3 variables:
#> $ sequence :List of 5This returns the data represented by the UniProtKB entry for P29965.
If we do not know the accession, or want to query by other criteria, we
can use the function with the _search suffix:
## 1 Supply the criteria pertinent to the search
cd40_search <- rba_uniprot_proteins_search(
protein = "CD40 ligand",
organism = "human",
reviewed = TRUE
)
## 2 Inspect the returned object's structure
str(cd40_search, 2)
#> List of 1
#> $ P29965:List of 13
#> ..$ accession : chr "P29965"
#> ..$ id : chr "CD40L_HUMAN"
#> ..$ proteinExistence: chr "Evidence at protein level"
#> ..$ info :List of 4
#> ..$ organism :List of 3
#> ..$ protein :List of 4
#> ..$ gene :List of 1
#> ..$ comments :List of 12
#> ..$ features :List of 65
#> ..$ dbReferences :List of 141
#> ..$ keywords :List of 14
#> ..$ references :List of 25
#> ..$ sequence :List of 5This is analogous to an advanced search in the
UniProt web portal. See the rba_uniprot_proteins_search
manual for details. In *_search functions you do not need
to fill every argument, but the Proteins API requires at least one of
the primary search criteria documented for that function; refining
modifiers do not constitute a search by themselves.
The applications of *_search variants are not limited to
what the title ‘search’ implies. These functions also retrieve their
search hits, so you can use them for bulk retrieval. Many arguments
accept multiple values; see the functions’ manuals for the supported
limits. Consider the following examples:
## 1 As the simplest scenario, we can retrieve multiple proteins in one call
multi_prs1 <- rba_uniprot_proteins_search(
accession = c("P04637", "P38398", "P24941", "P60953", "P06493", "Q02241")
)
## Inspect the returned object's structure
str(multi_prs1, 1)
#> List of 6
#> $ P24941:List of 14
#> $ P04637:List of 14
#> $ P06493:List of 14
#> $ P60953:List of 14
#> $ Q02241:List of 14
#> $ P38398:List of 14
## 2 Search by gene name, excluding isoforms and unreviewed entries
multi_prs2 <- rba_uniprot_proteins_search(
gene = c("KIF23", "BRCA1", "TP53", "CDC42"),
reviewed = TRUE,
taxid = 9606,
isoform = 0
)
str(multi_prs2, 1)
#> List of 29
#> $ Q9ULZ0:List of 14
#> $ Q02241:List of 14
#> $ P38398:List of 14
#> $ Q12888:List of 14
#> $ Q9HCN2:List of 14
#> $ P04637:List of 14
#> $ A1A5B4:List of 14
#> $ Q9Y2B4:List of 13
#> $ Q8IXH6:List of 14
#> $ Q53FA7:List of 14
#> $ Q9NS56:List of 14
#> $ Q96A56:List of 14
#> $ O14683:List of 14
#> $ Q96S44:List of 14
#> $ Q8NBR0:List of 14
#> $ Q13625:List of 14
#> $ Q7L0Q8:List of 14
#> $ Q5VT25:List of 14
#> $ Q00587:List of 14
#> $ O14613:List of 14
#> $ Q6DT37:List of 14
#> $ Q9H3Q1:List of 14
#> $ Q07960:List of 14
#> $ Q9UKI2:List of 14
#> $ Q6NZY7:List of 14
#> $ Q9NRR8:List of 14
#> $ Q9NRR3:List of 14
#> $ P60953:List of 14
#> $ Q9Y5S2:List of 14## 3 Search for every protein with the chemokines keyword
multi_prs3 <- rba_uniprot_proteins_search(
keyword = "chemokines"
)
str(multi_prs3, 1)
#> List of 17
#> $ P0DTM9:List of 14
#> $ P09703:List of 15
#> $ Q6SW98:List of 15
#> $ P19063:List of 14
#> $ P16849:List of 15
#> $ P33854:List of 14
#> $ P0DSV7:List of 15
#> $ P69332:List of 15
#> $ P24766:List of 15
#> $ Q98314:List of 15
#> $ P69333:List of 15
#> $ P07562:List of 14
#> $ F5HF62:List of 14
#> $ P34016:List of 14
#> $ P21064:List of 14
#> $ P0DSV8:List of 15
#> $ F5HBX1:List of 14## 4 Search for every reviewed SARS-CoV-2 protein
multi_prs4 <- rba_uniprot_proteins_search(
organism = "SARS-CoV-2",
reviewed = TRUE
)
str(multi_prs4, 1)
#> List of 17
#> $ P0DTG1 :List of 13
#> $ P0DTC9 :List of 14
#> $ P0DTC5 :List of 14
#> $ P0DTC3 :List of 14
#> $ P0DTD8 :List of 14
#> $ P0DTD1 :List of 14
#> $ P0DTC1 :List of 13
#> $ P0DTG0 :List of 13
#> $ P0DTC7 :List of 14
#> $ P0DTC2 :List of 14
#> $ P0DTC8 :List of 14
#> $ P0DTC4 :List of 14
#> $ A0A663DJA2:List of 14
#> $ P0DTD2 :List of 14
#> $ P0DTD3 :List of 14
#> $ P0DTC6 :List of 14
#> $ P0DTF1 :List of 13*_search variantThe search variants are not limited to the examples above. The following function families have both retrieval and search variants. See their manuals for detailed guidance and examples.
rba_uniprot_proteins() and
rba_uniprot_proteins_search()
rba_uniprot_features() and
rba_uniprot_features_search()
rba_uniprot_variation() and
rba_uniprot_variation_search()
rba_uniprot_antigens() and
rba_uniprot_antigens_search()
rba_uniprot_epitope() and
rba_uniprot_epitope_search()
rba_uniprot_rna_edit() and
rba_uniprot_rna_edit_search()
rba_uniprot_proteomes() and
rba_uniprot_proteomes_search()
rba_uniprot_mutagenesis() and
rba_uniprot_mutagenesis_search()
rba_uniprot_proteomics_hpp() and
rba_uniprot_proteomics_hpp_search()
rba_uniprot_proteomics_non_ptm() and
rba_uniprot_proteomics_non_ptm_search()
rba_uniprot_proteomics_ptm() and
rba_uniprot_proteomics_ptm_search()
rba_uniprot_genecentric() and
rba_uniprot_genecentric_search()
rba_uniprot_uniparc() and
rba_uniprot_uniparc_search()
The Proteins API endpoints implemented by rbioapi are organized into six groups. Here are those categories and the corresponding rbioapi functions. See the functions’ manuals for more details.
rba_uniprot_proteins()
rba_uniprot_proteins_search()
rba_uniprot_proteins_crossref()
rba_uniprot_features()
rba_uniprot_features_search()
rba_uniprot_features_type()
rba_uniprot_variation()
rba_uniprot_variation_locations()
rba_uniprot_variation_search()
rba_uniprot_antigens()
rba_uniprot_antigens_search()
rba_uniprot_epitope()
rba_uniprot_epitope_search()
rba_uniprot_mutagenesis()
rba_uniprot_mutagenesis_search()
rba_uniprot_rna_edit()
rba_uniprot_rna_edit_search()
rba_uniprot_proteomics_species()
rba_uniprot_proteomics_hpp()
rba_uniprot_proteomics_hpp_search()
rba_uniprot_proteomics_non_ptm()
rba_uniprot_proteomics_non_ptm_search()
rba_uniprot_proteomics_ptm()
rba_uniprot_proteomics_ptm_search()
rba_uniprot_proteomes()
rba_uniprot_proteomes_search()
rba_uniprot_genecentric()
rba_uniprot_genecentric_search()
rba_uniprot_taxonomy()
rba_uniprot_taxonomy_lca()
rba_uniprot_taxonomy_lineage()
rba_uniprot_taxonomy_name()
rba_uniprot_taxonomy_path()
rba_uniprot_taxonomy_relationship()
rba_uniprot_coordinates()
rba_uniprot_coordinates_search()
rba_uniprot_coordinates_location()
rba_uniprot_coordinates_location_protein()
rba_uniprot_coordinates_location_genome()
rba_uniprot_uniparc()
rba_uniprot_uniparc_search()
rba_uniprot_uniparc_bestguess()
rba_uniprot_uniparc_sequence()
To cite UniProt (Please see https://www.uniprot.org/help/publications):
To cite rbioapi:
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 26.04.1 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
#> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] rbioapi_0.8.3.9000 rmarkdown_2.32
#>
#> loaded via a namespace (and not attached):
#> [1] httr_1.4.9 cli_3.6.6 knitr_1.52 rlang_1.3.0
#> [5] xfun_0.62 otel_0.2.0 png_0.1-9 jsonlite_2.0.0
#> [9] DT_0.34.0 buildtools_1.0.0 htmltools_0.5.9 maketools_1.3.2
#> [13] sys_3.4.3 sass_0.4.10 grid_4.6.1 crosstalk_1.2.2
#> [17] evaluate_1.0.5 jquerylib_0.1.4 fastmap_1.2.0 yaml_2.3.12
#> [21] lifecycle_1.0.5 compiler_4.6.1 htmlwidgets_1.6.4 digest_0.6.39
#> [25] R6_2.6.1 curl_8.1.0 magrittr_2.0.5 bslib_0.12.0
#> [29] tools_4.6.1 mime_0.13 cachem_1.1.0