Skip to contents

Compile a query for the KEGG REST API

Usage

kegg_query(operation, ...)

Arguments

operation

Character: one of the KEGG REST API operations.

...

Arguments for the API operation, as defined in the templates available by kegg_api_templates and in the page https://www.kegg.jp/kegg/rest/keggapi.html.

Value

A list with the following elements:

  • operation - The KEGG API operation.

  • names - The names of the arguments.

  • query - The values of the arguments.

  • error - Error messages.

  • complete - Whether the query has all mandatory arguments.

Raises an error if fails to successfully compile a valid query.

Examples

kegg_query("conv", "compound", "pubchem")
#> $operation
#> [1] "conv"
#> 
#> $names
#> [1] "target_db" "source_db"
#> 
#> $query
#> [1] "compound" "pubchem" 
#> 
#> $error
#> NULL
#> 
#> $complete
#> [1] TRUE
#>