UniprotConn: The connector class to Uniprot database.

UniprotConnR Documentation

The connector class to Uniprot database.

Description

The connector class to Uniprot database.

The connector class to Uniprot database.

Details

This is a concrete connector class. It must never be instantiated directly, but instead be instantiated through the factory BiodbFactory. Only specific methods are described here. See super classes for the description of inherited methods.

Super classes

biodb::BiodbConnBase -> biodb::BiodbConn -> UniprotConn

Methods

Public methods

Inherited methods

Method wsSearch()

Calls search service on the database for searching for compounds. See https://www.uniprot.org/help/programmatic_access for details.

Usage
UniprotConn$wsSearch(
  query = "",
  fields = NULL,
  format = NULL,
  size = NULL,
  retfmt = c("plain", "parsed", "ids", "request")
)
Arguments
query

The query to send to the database.

fields

The field columns to retrieve from the database (e.g.: 'id', 'entry name', 'pathway', 'organism', 'sequence', etc).

format

The return format (e.g.: 'tsv').

size

The maximum number of entries to return.

retfmt

Use to set the format of the returned value. 'plain' will return the raw results from the server, as a character value. 'parsed' will return the parsed results, as a JSON object. 'request' will return a BiodbRequest object representing the request as it would have been sent. 'ids' will return a character vector containing the IDs of the matching entries.

Returns

Depending on 'retfmt' parameter.


Method wsQuery()

Calls query service on the database for searching for compounds. See http //www.uniprot.org/help/api_queries for details.

Usage
UniprotConn$wsQuery(
  query = "",
  columns = NULL,
  format = NULL,
  limit = NULL,
  retfmt = c("plain", "parsed", "ids", "request")
)
Arguments
query

The query to send to the database.

columns

The field columns to retrieve from the database (e.g.: 'id', 'entry name', 'pathway', 'organism', 'sequence', etc).

format

The return format (e.g.: 'tsv').

limit

The maximum number of entries to return.

retfmt

Use to set the format of the returned value. 'plain' will return the raw results from the server, as a character value. 'parsed' will return the parsed results, as a JSON object. 'request' will return a BiodbRequest object representing the request as it would have been sent. 'ids' will return a character vector containing the IDs of the matching entries.

Returns

Depending on 'retfmt' parameter.


Method geneSymbolToUniprotIds()

Gets UniProt IDs associated with gene symbols.

Usage
UniprotConn$geneSymbolToUniprotIds(
  genes,
  ignore.nonalphanum = FALSE,
  partial.match = FALSE,
  filtering = TRUE,
  max.results = 0
)
Arguments
genes

A vector of gene symbols to convert to UniProt IDs.

ignore.nonalphanum

If set to TRUE, do not take into account non-alphanumeric characters when comparing gene symbols.

partial.match

If set to TRUE, a match will be valid even if the provided gene symbol is only a substring of the found gene symbol.

filtering

If set to FALSE, do not run any filtering and return all the UniProt IDs given by UniProt search web service. DEPRECATED: new UniProt REST API returns only exact match.

max.results

Maximum of UniProt IDs returned for each gene symbol.

Returns

A named list of vectors of UniProt IDs. The names are gene symbols provided with the genes parameter. For each gene symbol, a vector of found UniProt IDs is set.


Method clone()

The objects of this class are cloneable with this method.

Usage
UniprotConn$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

# Create an instance with default settings:
mybiodb <- biodb::newInst()

# Get Uniprot connector
uniprot <- mybiodb$getFactory()$createConn('uniprot')

# Access web service "search":
result <- uniprot$wsSearch(query='protein_name:"prion protein"',
                           fields=c('id', 'entry name'),
                           format='tsv', size=10)

# Terminate instance.
mybiodb$terminate()


pkrog/biodbUniprot documentation built on Sept. 26, 2022, 3:50 p.m.