/
cts_convert.Rd
53 lines (47 loc) · 1.64 KB
/
cts_convert.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cts.R
\name{cts_convert}
\alias{cts_convert}
\title{Convert Ids using Chemical Translation Service (CTS)}
\usage{
cts_convert(query, from, to, first = FALSE, verbose = TRUE, ...)
}
\arguments{
\item{query}{character; query ID.}
\item{from}{character; type of query ID, e.g. \code{'Chemical Name'} , \code{'InChIKey'},
\code{'PubChem CID'}, \code{'ChemSpider'}, \code{'CAS'}.}
\item{to}{character; type to convert to.}
\item{first}{logical; return only first result be returned?}
\item{verbose}{logical; should a verbose output be printed on the console?}
\item{...}{currently not used.}
}
\value{
a list of characters. If first = TRUE a vector.
}
\description{
Convert Ids using Chemical Translation Service (CTS), see \url{http://cts.fiehnlab.ucdavis.edu/conversion/index}
}
\details{
See also \url{http://cts.fiehnlab.ucdavis.edu/conversion/index}
for possible values of from and to.
}
\examples{
\donttest{
# 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')
}
}
\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.
}
\seealso{
\code{\link{cts_from}} for possible values in the 'from' argument and
\code{\link{cts_to}} for possible values in the 'to' argument.
}
\author{
Eduard Szoecs, \email{eduardszoecs@gmail.com}
}