validSDF: Validity check of SDFset

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

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.

Usage

1
validSDF(x, Nabcol = 3, Nbbcol = 3, logic = "&", checkNA=TRUE)

Arguments

x

x object of class SDFset

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

Details

The function is important to remove invalid compounds from SDFset containers.

Value

logical vector of length x with TRUE for valid compounds and FALSE for invalid compounds.

Author(s)

Thomas Girke

References

...

See Also

Functions: read.SDFset

Examples

1
2
3
4
5
6
7
8
## 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.

girke-lab/ChemmineR-git-svn-bridge documentation built on May 17, 2019, 5:25 a.m.