Learn R Programming

MetaDBparse (version 2.0.0)

cleanDB: Uniformize database and remove invalid formulas/SMILES

Description

This is a wrapper function to take a 'raw' input data table with compound information, uniformize the SMILES

Usage

cleanDB(db.formatted, cl, silent = TRUE, blocksize, smitype = "Canonical")

Arguments

db.formatted

Data table with columns 'compoundname, structure, baseformula, charge, description'

cl

parallel::makeCluster object for multithreading

silent

Suppress warnings?

blocksize

How many compounds to process per 'block'? Higher number means bigger memory spikes, but faster processing time.

smitype

SMILES format, Default: 'Canonical'

Value

Data table with SMILES in the correct format, and charge/formula re-generated from said SMILES if available.

See Also

clusterApply pbapply check_chemform rbindlist

Examples

Run this code
# NOT RUN {
myDB = build.LMDB(tempdir())
# }
# NOT RUN {
cleanedDB = cleanDB(myDB$db, cl = 0, blocksize = 10)
# }

Run the code above in your browser using DataLab