Description Usage Arguments See Also Examples
View source: R/oxy-db_extended.R
Wrapper function that takes a base database, an existing (or not) external database, and fills the extended database with adduct and isotope variants of the compounds in the base database.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | buildExtDB(
outfolder,
ext.dbname = "extended",
base.dbname,
cl = 0,
blocksize = 600,
mzrange = c(60, 600),
adduct_table = adducts,
adduct_rules = adduct_rules,
silent = silent,
use.rules = TRUE,
count.isos = F,
all.isos = T
)
|
outfolder |
Which folder are your databases in? |
ext.dbname |
Extended database name (without .db suffix), Default: 'extended' |
base.dbname |
Base database name (without .db suffix) |
cl |
parallel::makeCluster object for multithreading, Default: 0 |
blocksize |
How many compounds to process simultanaously? Higher means more memory spikes but faster building, Default: 600 |
mzrange |
Range of m/zs to include in database, Default: c(60, 600) |
adduct_table |
Adduct table, Default: adducts |
adduct_rules |
Adduct rule table, Default: adduct_rules |
silent |
Silence warnings?, Default: silent |
use.rules |
Use adduct rules?, Default: TRUE |
count.isos |
Add columns for amounts of 2H, 13C, 15N atoms? Useful for heavy isotope experiments. |
all.isos |
Include and calculate all isotopes? (if FALSE, only takes the 100/main isotope). |
SQLite
fn
as.data.table
,rbindlist
,fwrite
,fread
dbWriteTable
pbapply
check_chemform
1 2 3 4 5 6 7 8 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.