keggFind: Finds entries with matching query keywords or other query...

View source: R/KEGGREST.R

keggFindR Documentation

Finds entries with matching query keywords or other query data in a given database

Description

Finds entries with matching query keywords or other query data in a given database.

Usage

keggFind(database, query, option = c("formula", "exact_mass", 
    "mol_weight")) 

Arguments

database

Either the name of a single KEGG database (list available via listDatabases(), a "T number" genome identifier, or a KEGG organism code (lists of both available via keggList("organism")).

query

One or more keywords, or a range of integers representing molecular weights. If query includes identifiers not known to KEGG, the results will not contain any information about those identifiers.

option

Optional. If database is compound or drug, option can be formula, exact_mass, or weight. Chemical formula search is a partial match irrespective of the order of atoms given. The exact mass (or molecular weight) is checked by rounding off to the same decimal place as the query data.

Value

A named character vector.

Author(s)

Dan Tenenbaum

References

https://www.kegg.jp/kegg/docs/keggapi.html

Examples

res <-
    keggFind("genes", c("shiga", "toxin")) ## for keywords "shiga" and "toxin"
length(res)
head(res)
res <- keggFind("genes", "shiga toxin")    ## for keywords "shiga toxin"
length(res)
head(res)
keggFind("compound", "C7H10O5", "formula") ## for chemical formula "C7H10O5"
res <- keggFind("compound", "O5C7", "formula") ## for chemical formula
                                           ## containing "O5" and "C7" 
length(res)
head(res)
keggFind("compound", 174.05, "exact_mass") ## for 174.045
                                           ## =< exact mass < 174.055
res <- keggFind("compound", 300:310, "mol_weight") ## for 300 =<
                                           ## molecular weight =< 310
length(res)
head(res)

Bioconductor/KEGGREST documentation built on July 14, 2022, 9:40 p.m.