KeggConn: The connector abstract class to KEGG databases.

KeggConnR Documentation

The connector abstract class to KEGG databases.

Description

The connector abstract class to KEGG databases.

The connector abstract class to KEGG databases.

Details

This is the mother class of all KEGG connectors. It defines code common to all KEGG connectors.

The constructor accepts the following arguments:

db.name: The database name as defined in http://www.kegg.jp/kegg/docs/keggapi.html.

db.abbrev: The database abbreviated name, as defined in http://www.kegg.jp/kegg/docs/keggapi.html.

Super classes

biodb::BiodbConnBase -> biodb::BiodbConn -> KeggConn

Methods

Public methods

Inherited methods

Method new()

New instance initializer. Connector classes must not be instantiated directly. Instead, you must use the createConn() method of the factory class. The parameters of this function are for the use of subclasses.

Usage
KeggConn$new(
  db.name = NA_character_,
  db.abbrev = NA_character_,
  accession.prefix = NA_character_,
  ...
)
Arguments
db.name

The database name as defined in www.kegg.jp/kegg/docs/keggapi.html.

db.abbrev

The database abbreviation as defined in www.kegg.jp/kegg/docs/keggapi.html.

accession.prefix

The prefix used for accession identifiers.

...

All parameters are passed to the super class initializer.

Returns

Nothing.


Method wsList()

Gets the full list of entry IDs. See

Usage
KeggConn$wsList(retfmt = c("plain", "request", "ids"))
Arguments
retfmt

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

http

//www.kegg.jp/kegg/docs/keggapi.html for details.

Returns

Depending on 'retfmt'.


Method wsFind()

Searches for entries. See http://www.kegg.jp/kegg/docs/keggapi.html for details.

Usage
KeggConn$wsFind(
  query,
  option = c("NONE", "formula", "exact_mass", "mol_weight", "nop"),
  retfmt = c("plain", "request", "parsed", "ids", "ids.no.prefix")
)
Arguments
query

The query to send to the database web service. When searching by mass (i.e. 'option' parameter set to either 'exact_mass' or 'mol_weight'), this query field must be set to either an exact (i.e. 174.05) or a range (i.e. '250-260').

option

Set this parameter to 'NONE' for querying on fields 'ENTRY', 'NAME', 'DESCRIPTION', 'COMPOSITION', 'DEFINITION' and 'ORTHOLOGY'. See http //www.kegg.jp/kegg/docs/keggapi.html for an exact list of fields that are searched for each database, and also for other possible values of this 'option' paramater.

retfmt

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

Returns

Depending on 'retfmt'.


Method clone()

The objects of this class are cloneable with this method.

Usage
KeggConn$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Examples

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

# Create a connector to a KEGG database
conn <- mybiodb$getFactory()$createConn('kegg.compound')

# Search for an entry
conn$wsFind('NADPH', retfmt='parsed')

# Terminate instance.
mybiodb$terminate()


pkrog/biodbKegg documentation built on Oct. 1, 2022, 6:27 p.m.