validSDF | R Documentation |
Performs validity check of SDFs stored in SDFset
objects. Currently, the function tests whether the atom block and the bond block in each SDF
component of an SDFset
have at least Nabcol
and Nbbcol
columns (default is 3 for both). In additions, it tests for the presence of NA values in the atom and bond blocks. The function returns a logical vector with TRUE
values for valid compounds and FALSE
values for invalid ones.
validSDF(x, Nabcol = 3, Nbbcol = 3, logic = "&", checkNA=TRUE)
x |
|
Nabcol |
minimum number of columns in atom block |
Nbbcol |
minimum number of columns in bond block |
logic |
logical connection (& or |) among Nabcol and Nbbcol cutoffs |
checkNA |
checks for NA values in atom and bond blocks |
The function is important to remove invalid compounds from SDFset
containers.
logical
vector of length x
with TRUE
for valid compounds and FALSE
for invalid compounds.
Thomas Girke
...
Functions: read.SDFset
## SDFset instance
data(sdfsample)
sdfset <- sdfsample
## Detect and remove invalid SDFs in SDFset.
valid <- validSDF(sdfset)
which(!valid) # Returns index for invalid SDFs
sdfset <- sdfset[valid] # Returns only valid SDFs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.