Convert Ids using Chemical Translation Service (CTS), see http://cts.fiehnlab.ucdavis.edu/
cts_convert(
query,
from,
to,
first = FALSE,
choices = NULL,
verbose = TRUE,
...
)
character; query ID.
character; type of query ID, e.g. 'Chemical Name'
, 'InChIKey'
,
'PubChem CID'
, 'ChemSpider'
, 'CAS'
.
character; type to convert to.
deprecated. Use choices = 1 instead.
to return only the first result, use 'choices = 1'. To choose a result from an interative menu, provide a number of choices to choose from or "all".
logical; should a verbose output be printed on the console?
currently not used.
a list of character vectors or if choices
is used, then a single named vector.
See also http://cts.fiehnlab.ucdavis.edu/ for possible values of from and to.
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.
cts_from
for possible values in the 'from' argument and
cts_to
for possible values in the 'to' argument.
# NOT RUN {
# might fail if API is not available
cts_convert("triclosan", "Chemical Name", "inchikey")
### multiple inputs
comp <- c("triclosan", "hexane")
cts_convert(comp, "Chemical Name", "cas")
# }
Run the code above in your browser using DataLab