[R] rcdk package, fingerprint without name?

Freya Klepsch freya.k at gmx.at
Fri Sep 14 15:41:10 CEST 2012


Hi!

I have a question concerning the rcdk package:

I generated a test sdf-file with 3 molecules in it and tried to perform clustering by fingerprints and plot the results in a dendogramm.

This is what I did:

mols <- load.molecules ("molecules.sdf")
fp.list <- lapply (mols, get.fingerprint, 'maccs')

fp.dist <- fp.sim.matrix (fp.list, method='tanimoto')
fp.dist <- as.dist(1-fp.dist=
clus.hier <- hclust (fp.dist, method='ward')
plot (clus.hier, label=FALSE)

When I did so, plot generated a dendogramm, but the "lines" were not labeled - so I could not see which molecule clusters with the other. When I checked the outcome of get.fingerprint, I noticed that the name field was empty. 
The sdf file I generated contained names for the molecules (as seperate field, but also as chain name).
How can I get these names into the mols variable and how can this be included into the fingerprint output?



More information about the R-help mailing list