Learn R Programming

webchem (version 0.0.5.0)

cts_compinfo: Get record details from Chemical Translation Service (CTS)

Description

Get record details from CTS, see http://cts.fiehnlab.ucdavis.edu

Usage

cts_compinfo(inchikey, verbose = TRUE, ...)

Arguments

inchikey
character; InChIkey.
verbose
logical; should a verbose output be printed on the console?
...
currently not used.

Value

  • a list of 7. inchikey, inchicode, molweight, exactmass, formula, synonyms and externalIds

References

Wohlgemuth, G., P. K. Haldiya, E. Willighagen, T. Kind, and O. Fiehn 2010The Chemical Translation Service -- a Web-Based Tool to Improve Standardization of Metabolomic Reports. Bioinformatics 26(20): 2647–2648.

Examples

Run this code
# might fail if API is not available
out <- cts_compinfo("XEFQLINVKFYRCS-UHFFFAOYSA-N")
# = Triclosan
str(out)
out[1:5]

### multiple inputs
inchkeys <- c("XEFQLINVKFYRCS-UHFFFAOYSA-N","BSYNRYMUTXBXSQ-UHFFFAOYSA-N" )
ll <- lapply(inchkeys, function(x) cts_compinfo(x)[1:5])
do.call(rbind, ll)

Run the code above in your browser using DataLab