Learn R Programming

minval (version 0.4)

is.chebi: Evaluates if a compound name is a ChEBI name

Description

This function takes a compound name and returns a logical value (TRUE) if it is a ChEBI name

Usage

is.chebi(metabolite)

Arguments

metabolite
A compound name

Examples

Run this code
## For a specific metabolite
is.chebi("ATP")
# [1] TRUE

## For a set of metabolites
mets<-metabolites(glugln[1:3],woCompartment = TRUE)
sapply(mets,is.chebi,simplify = FALSE)
# $`alpha-D-glucose 1-phosphate`
# [1] TRUE

# $`alpha-D-Glucose 6-phosphate`
# [1] TRUE

# $water
# [1] TRUE

# $ATP
# [1] TRUE

# $`alpha-D-Glucose`
# [1] TRUE

# $ADP
# [1] TRUE

# $`phosphate(3-)`
# [1] TRUE

Run the code above in your browser using DataLab