Learn R Programming

webchem (version 0.4.0)

cts_convert: Convert Ids using Chemical Translation Service (CTS)

Description

Convert Ids using Chemical Translation Service (CTS), see http://cts.fiehnlab.ucdavis.edu/

Usage

cts_convert(query, from, to, first = FALSE, verbose = TRUE, ...)

Arguments

query

character; query ID.

from

character; type of query ID, e.g. 'Chemical Name' , 'InChIKey', 'PubChem CID', 'ChemSpider', 'CAS'.

to

character; type to convert to.

first

logical; return only first result be returned?

verbose

logical; should a verbose output be printed on the console?

...

currently not used.

Value

a list of characters. If first = TRUE a vector.

Details

See also http://cts.fiehnlab.ucdavis.edu/ for possible values of from and to.

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<U+2013>2648.

See Also

cts_from for possible values in the 'from' argument and cts_to for possible values in the 'to' argument.

Examples

Run this code
# NOT RUN {
# might fail if API is not available
cts_convert('XEFQLINVKFYRCS-UHFFFAOYSA-N', 'inchikey', 'Chemical Name')

### multiple inputs
comp <- c('XEFQLINVKFYRCS-UHFFFAOYSA-N', 'BSYNRYMUTXBXSQ-UHFFFAOYSA-N')
cts_convert(comp, 'inchikey', 'Chemical Name')
# }

Run the code above in your browser using DataLab