setDB: setDB

setDBR Documentation

setDB

Description

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

Usage

setDB(
  struct,
  db = "hmdb",
  adcharge = 1,
  admult = 1,
  DBfile = "",
  adductfile = "",
  adlist = NA,
  keggpath = ""
)

## S4 method for signature 'RHermesExp'
setDB(
  struct,
  db = "hmdb",
  adcharge = 1,
  admult = 1,
  DBfile = "",
  adductfile = "",
  adlist = NA,
  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.

DBfile

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).

adlist

Vector of adduct names to use. It is an alternative to setting your own adduct file or using the default lists.

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
}



RogerGinBer/RHermes documentation built on Nov. 6, 2022, 11:34 a.m.