It updates the RHermesExp object and sets the formula database and adduct list to use in the following steps of the workflow. The adduct list used is based on the EnviPat package

setDB(
  struct,
  db = "hmdb",
  adcharge = 1,
  admult = 1,
  filename = "",
  adductfile = "",
  keggpath = ""
)

# S4 method for RHermesExp
setDB(
  struct,
  db = "hmdb",
  adcharge = 1,
  admult = 1,
  filename = "",
  adductfile = "",
  keggpath = ""
)

Arguments

struct

The RHermesExp object to update

db

A character defining which database to use. You can test a sample of HMDB or Norman using "hmdb" and "norman", respectively. Set it to "custom" to use your own database. You can also specify some kegg pathways with "kegg_p" and then a list of pathway IDs in the keggpath parameter.

adcharge

The maximum charge (in absolute value, so polarity does not matter) the adducts in the list can have. Defaults to 1.

admult

The maximum multiplicity (M, 2M, 3M and so on) the adducts can have. Defaults to 1.

filename

Address to where the database is located. Can be either a csv or a xls/xlsx.

adductfile

Address to where the adduct list is located. Can only be a csv file and should adhere to EnviPat adduct list format (run data(adducts, package = "enviPat") to see how it's like).

keggpath

A list of KEGG pathway IDs

Value

An RHermesExp object with the formula and adduct database set.

Examples

if(FALSE){ myHermes <- setDB(myHermes, 'hmdb') #Adcharge and admult default to 1 myHermes <- setDB(myHermes, 'norman', 2, 1) #Charge 2, multiplicity 1 }