Learn R Programming

MetaDBparse (version 2.0.0)

searchRev: Reverse searching

Description

Takes a SMILES structure and finds m/z values for all adducts and isotopes matching that structure.

Usage

searchRev(structure, ext.dbname = "extended", outfolder)

Arguments

structure

SMILES structure string

ext.dbname

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

outfolder

Which folder are your databases in?

Value

Data table with m/z values, additionally molecular formula, charge, adduct, isotope

See Also

SQLite

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
myFolder = tempdir()
# }
# NOT RUN {
 
# }
# NOT RUN {
buildBaseDB(outfolder = myFolder, "lmdb", test = TRUE)
# }
# NOT RUN {
 
# }
# NOT RUN {
file.remove(file.path(myFolder, "extended.db"))
# }
# NOT RUN {
 
# }
# NOT RUN {
data(adducts)
# }
# NOT RUN {
 
# }
# NOT RUN {
data(adduct_rules)
# }
# NOT RUN {
 
# }
# NOT RUN {
buildExtDB(outfolder = myFolder, base.dbname = "lmdb",
 silent=FALSE, adduct_table = adducts, adduct_rules = adduct_rules)
# }
# NOT RUN {
 
# }
# NOT RUN {
searchRev("O=C(O)C(N)CC=1N=CN(C1)C", outfolder = myFolder)
# }

Run the code above in your browser using DataLab