
Last chance! 50% off unlimited learning
Sale ends in
Calculate Drug Molecule Similarity Derived by Molecular Fingerprints
calcDrugFPSim(fp1, fp2, fptype = c("compact", "complete"),
metric = c("tanimoto", "euclidean", "cosine", "dice", "hamming"))
The first molecule's fingerprints,
could be extracted by extractDrugMACCS()
,
extractDrugMACCSComplete()
etc.
The second molecule's fingerprints.
The fingerprint type, must be one of "compact"
or
"complete"
.
The similarity metric,
one of "tanimoto"
, "euclidean"
, "cosine"
,
"dice"
and "hamming"
.
The numeric similarity value.
This function calculate drug molecule fingerprints similarity.
Define a
as the features of object A, b
is the
features of object B, c
is the number of common features to A and B:
Tanimoto: aka Jaccard -
Euclidean:
Dice: aka Sorensen, Czekanowski, Hodgkin-Richards -
Cosine: aka Ochiai, Carbo -
Hamming: aka Manhattan, taxi-cab, city-block distance -
Gasteiger, Johann, and Thomas Engel, eds. Chemoinformatics. Wiley.com, 2006.
# NOT RUN {
mols = readMolFromSDF(system.file('compseq/tyrphostin.sdf', package = 'BioMedR'))
fp1 = extrDrugEstate(mols[[1]])
fp2 = extrDrugEstate(mols[[2]])
calcDrugFPSim(fp1, fp2, fptype = 'compact', metric = 'tanimoto')
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab