KeggCompoundConn: The connector class to KEGG Compound database.

KeggCompoundConnR Documentation

The connector class to KEGG Compound database.

Description

The connector class to KEGG Compound database.

The connector class to KEGG Compound 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 -> biodbKegg::KeggConn -> KeggCompoundConn

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.

Usage
KeggCompoundConn$new(...)
Arguments
...

All parameters are passed to the super class initializer.

Returns

Nothing.


Method wsFindExactMass()

Searches for entries by mass. You must either provide a single mass through 'mass' parameter or provide a range through 'mass.min' and 'mass.max'.

Usage
KeggCompoundConn$wsFindExactMass(
  mass = NULL,
  mass.min = NULL,
  mass.max = NULL,
  ...
)
Arguments
mass

Single mass.

mass.min

Minimal mass.

mass.max

Maximal mass.

...

parameters passed to KeggConn::wsFind().

See

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

Returns

wsFind().


Method wsFindMolecularWeight()

Searches for entries by molecular mass. You must either provide a single mass through 'mass' parameter or provide a range through 'mass.min' and 'mass.max'. See http //www.kegg.jp/kegg/docs/keggapi.html for details.

Usage
KeggCompoundConn$wsFindMolecularWeight(
  mass = NULL,
  mass.min = NULL,
  mass.max = NULL,
  ...
)
Arguments
mass

Single mass.

mass.min

Minimal mass.

mass.max

Maximal mass.

...

Parameters passed to KeggConn::wsFind().

Returns

wsFind().


Method getPathwayIdsPerCompound()

Gets organism pathways for each compound. This method retrieves for each compound the KEGG pathways of the organism in which the compound is involved.

Usage
KeggCompoundConn$getPathwayIdsPerCompound(id, org, limit = 3)
Arguments
id

A character vector of KEGG Compound IDs.

org

The organism in which to search for pathways, as a KEGG organism code (3-4 letters code, like 'hsa', 'mmu', ...). See https //www.genome.jp/kegg/catalog/org_list.html for a complete list of KEGG organism codes.

limit

The maximum number of modules IDs to retrieve for each compound. Set to 0 to disable.

Returns

A named list of KEGG pathway ID vectors, where the names of the list are the compound IDs."


Method getModuleIdsPerCompound()

Gets organism modules for each compound. This method retrieves for each compound the KEGG modules of the organism in which the compound is involved.

Usage
KeggCompoundConn$getModuleIdsPerCompound(id, org, limit = 3)
Arguments
id

A character vector of KEGG Compound IDs.

org

The organism in which to search for modules, as a KEGG organism code (3-4 letters code, like 'hsa', 'mmu', ...). See https //www.genome.jp/kegg/catalog/org_list.html for a complete list of KEGG organism codes.

limit

The maximum number of modules IDs to retrieve for each compound. Set to 0 to disable.

Returns

A named list of KEGG module ID vectors, where the names of the list are the compound IDs."


Method getPathwayIds()

Gets organism pathways. This method retrieves KEGG pathways of the specified organism in which the compounds are involved.

Usage
KeggCompoundConn$getPathwayIds(id, org)
Arguments
id

A character vector of KEGG Compound IDs.

org

The organism in which to search for pathways, as a KEGG organism code (3-4 letters code, like 'hsa', 'mmu', ...). See https //www.genome.jp/kegg/catalog/org_list.html for a complete list of KEGG organism codes.

Returns

A vector of KEGG pathway IDs.


Method addInfo()

Add informations (as new column appended to the end) to an existing data frame containing a column of KEGG Compound IDs.

Usage
KeggCompoundConn$addInfo(x, id.col, org, limit = 3, prefix = "")
Arguments
x

A data frame containing at least one column with Biodb entry IDs identified by the parameter 'id.col'.

id.col

The name of the column containing IDs inside the input data frame.

org

The organism in which to search for pathways, as a KEGG organism code (3-4 letters code, like 'hsa', 'mmu', ...). See https //www.genome.jp/kegg/catalog/org_list.html for a complete list of KEGG organism codes.

limit

This is the maximum number of values obtained for each ID, for every column added, in case multiple values are obtained. Set to 0 to get all values.

prefix

Insert a prefix at the start of name of all new columns.

Returns

A data frame containing 'x' and new columns appended with KEGG identifiers and data.


Method clone()

The objects of this class are cloneable with this method.

Usage
KeggCompoundConn$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

KeggConn, KeggPathwayConn.

Examples

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

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

# Search for compounds by exact mass
conn$wsFindExactMass(mass=174.05, retfmt='parsed')

# Search for compounds by molecular weight 
conn$wsFindMolecularWeight(mass=300, retfmt='parsed')

# Get pathway IDs related to compounds
pathway.ids=conn$getPathwayIds(c('C02648', 'C06144'), org='mmu')

# Terminate instance.
mybiodb$terminate()


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