This function takes an identifier from a given database (`from`) and converts it to the desired database (`to`). It uses either the `cts.fiehnlab` or `chemspider` services for conversion.
trans_ID(
query = "C00001",
from = "KEGG",
to = "PubChem SID",
top = 1,
server = c("cts.fiehnlab", "chemspider")
)
A character string of the chemical identifier to be converted.
A character string of the database from which the query is.
A character string of the desired database to which the identifier should be converted.
Numeric value indicating the top results to be returned.
A character string indicating which server to use. Possible values are "cts.fiehnlab" or "chemspider".
A character string of the converted identifier, or `NA` if the conversion was unsuccessful.
if (FALSE) {
trans_ID(
query = "C00001",
from = "KEGG",
to = "PubChem SID",
top = 1,
server = "cts.fiehnlab"
)
trans_ID(
query = "C00001",
to = "Human Metabolome Database",
server = "cts.fiehnlab"
)
}