Description Usage Arguments Details Value See Also Examples
'sdf.subset' will take a descriptor database generated by 'cmp.parse' and an array of indices, and return an SDF string consisting of SDFs for compounds corresponding to that list of indices. The returned value is a character string.
1 | sdf.subset(db, cmps)
|
db |
The database generated by 'cmp.parse' |
cmps |
An array of indecies that correspond to a set of selected compounds from the database |
'sdf.subset' depends on information embedded in the descriptor database returned by 'cmp.parse'. It also relies on the availability of the original SDF where the database has been generated from. Basically, when 'cmp.parse' parses the original SDF file, it will store the path of that SDF file as well as offset information for SDF segment in that file. Therefore, if the SDF file has been changed or deleted, 'sdf.subset' cannot function properly.
The result SDF will also have names added to compounds if they are not present in the original SDF.
Return a character string whose content is the concatenation of SDFs for the selected compounds.
1 2 3 4 5 6 7 8 | ## Note: this functionality has become obsolete since the introduction of the
## 'SDFset' and 'apset' S4 classes.
# load sample database from web
# db <- cmp.parse("http://bioweb.ucr.edu/ChemMineV2/static/example_db.sdf")
# select SDF for 1st and 2nd compound in that SDF
# sdf_segments <- sdf.subset(db, c(1, 2))
# now sdf_segments containt the 2 SDFs for those 2 compounds
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.