searchMZ: Find matches for m/z value in given database

Description Usage Arguments Value See Also Examples

View source: R/oxy-db_search.R

Description

This function takes user m/z, ppm error, base database and the extended database to return hits of interest.

Usage

1
2
3
4
5
6
7
8
9
searchMZ(
  mzs,
  ionmodes,
  outfolder,
  base.dbname,
  ppm,
  ext.dbname = "extended",
  append = FALSE
)

Arguments

mzs

Vector of m/z values

ionmodes

Vector of pos/negative mode for each m/z value

outfolder

Which folder are your databases stored in?

base.dbname

Which base database do you want to retrieve info from? (without .db suffix)

ppm

Parts per million accepted error range

ext.dbname

Name of extended database (without .db suffix), Default: 'extended'

append

Use this when searching muiltiple base databases, so only one result table is created, Default: FALSE

Value

Data table with match results

See Also

SQLite rbindlist dbExecute,dbGetQuery,dbDisconnect fn

Examples

1
2
3
4
5
6
7
8
9
 ## Not run: myFolder = tempdir()
 ## Not run: buildBaseDB(outfolder = myFolder, "lmdb", test = TRUE)
 ## Not run: file.remove(file.path(myFolder, "extended.db"))
 ## Not run: data(adducts)
 ## Not run: data(adduct_rules)
 ## Not run: buildExtDB(outfolder = myFolder, base.dbname = "lmdb",
 silent=FALSE, adduct_table = adducts, adduct_rules = adduct_rules)
## End(Not run)
 ## Not run: searchMZ(c("104.3519421"), "positive", outfolder = myFolder, "lmdb", ppm = 3)

MetaDBparse documentation built on May 3, 2021, 5:09 p.m.