fetchFromUniProt: Fetch annotations from UniProt

View source: R/uniprot.R

fetchFromUniProtR Documentation

Fetch annotations from UniProt

Description

Fetch annotations from UniProt

Usage

fetchFromUniProt(
  unis,
  columns = c("genes", "protein names"),
  col.names = NULL,
  batchsize = 400,
  verbose = FALSE
)

Arguments

unis

A character vector with UniProt identifiers

columns

Data columns requested (see allowedUniProtColumns)

col.names

How to name data columns in the returned data frame

batchsize

Size of batch of proteins in a single query

verbose

Logical, if true, query progress will be displayed

Details

For a given list of UniProt identifiers this function will bring back annotations from UniProt servers. What information is downloaded is controlled by the columns parameter. By default it fetches gene names and protein name/description. The full list of available columns is in a vector allowedUniProtColumns.

The column names in the returned data frame are the same as in columns parameter, unless alternative names are provided in parameter col.names. The id column is added by default.

Value

A data frame with protein annotations.

Examples

library(proteusLabelFree)
data(proteusLabelFree)

# Extract UniProt identifiers from protein IDs
unis <- sapply(as.character(prodat$proteins), function(prot) {
 s <- unlist(strsplit(prot, "|", fixed=TRUE))
 s[2]
})

# Fetch first 100 annotations (for a quick example)
anno <- fetchFromUniProt(unis[1:100])

bartongroup/Proteus documentation built on April 22, 2023, 5:33 a.m.