Description Usage Arguments Details Value Author(s) References See Also Examples
Generates fingerprints from descriptor vectors such as atom pairs stored in APset
or list
containers. The obtained fingerprints can be used for structure similarity comparisons, searching and clustering. Due to their compact size, computations on fingerprints are often more time and memory efficient than on their much more complex atom pair counterparts.
1 |
x |
Object of classe |
descnames |
Descriptor set to consider for fingerprint encoding. If a single value from 1-4096 is provided then the function uses the corresponding number of the most frequent atom pairs stored in the |
type |
return fingerprint set as |
...
matrix
or character
vectors
Thomas Girke
Chen X and Reynolds CH (2002). "Performance of similarity measures in 2D fragment-based similarity searching: comparison of structural descriptors and similarity coefficients", J Chem Inf Comput Sci.
Functions: sdf2ap
, SDF2apcmp
, apset2descdb
, cmp.search
, cmp.similarity
Related classes: SDF, SDFset, SDFstr, APset.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## Instance of SDFset class
data(sdfsample)
sdfset <- sdfsample[1:10]
## Compute atom pair library
apset <- sdf2ap(sdfset)
## Compute atom pair fingerprint matrix using internal atom pair
## selection containing 4096 most common atom pairs in DrugBank.
## For details see ?apfp. The following example uses from this
## set the 1024 most frequent atom pairs:
fpset <- desc2fp(x=apset, descnames=1024, type="FPset")
## Alternatively, one can provide any custom atom pair selection. Here
## 1024 most common ones in apset object.
fpset1024 <- names(rev(sort(table(unlist(as(apset, "list")))))[1:1024])
fpset2 <- desc2fp(x=apset, descnames=fpset1024, type="FPset")
## A more compact way of storing fingerprints is as character values
fpchar <- desc2fp(x=apset, descnames=1024, type="character")
## Convert character fingerprints back to FPset or matrix
fpset <- as(fpchar, "FPset")
fpma <- as.matrix(fpset)
## Similarity searching returning Tanimoto similarity coefficients
fpSim(x=fpset[1], y=fpset)
## Clustering example
simMAap <- sapply(cid(fpset), function(x) fpSim(x=fpset[x], fpset, sorted=FALSE))
hc <- hclust(as.dist(1-simMAap), method="single")
plot(as.dendrogram(hc), edgePar=list(col=4, lwd=2), horiz=TRUE)
|
CMP1 CMP4 CMP2 CMP3 CMP5 CMP9 CMP7 CMP8
1.0000000 0.5000000 0.3947368 0.3250000 0.3076923 0.2941176 0.2763158 0.2525253
CMP10 CMP6
0.2054795 0.1911765
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.