calcDrugMCSSim {Rcpi} | R Documentation |
Calculate Drug Molecule Similarity Derived by Maximum Common Substructure Search
calcDrugMCSSim(mol1, mol2, type = c("smile", "sdf"), plot = FALSE, al = 0, au = 0, bl = 0, bu = 0, matching.mode = "static", ...)
mol1 |
The first molecule. R character string object containing the molecule. See examples. |
mol2 |
The second molecule. R character string object containing the molecule. See examples. |
type |
The input molecule format, 'smile' or 'sdf'. |
plot |
Logical. Should we plot the two molecules and their maximum common substructure? |
al |
Lower bound for the number of atom mismatches. Default is 0. |
au |
Upper bound for the number of atom mismatches. Default is 0. |
bl |
Lower bound for the number of bond mismatches. Default is 0. |
bu |
Upper bound for the number of bond mismatches. Default is 0. |
matching.mode |
Three modes for bond matching are supported:
|
... |
Other graphical parameters |
This function calculate drug molecule similarity derived by
maximum common substructure search. The maximum common substructure
search algorithm is provided by the fmcsR
package.
A list containing the detail MCS information and similarity values. The numeric similarity value includes Tanimoto coefficient and overlap coefficient.
Nan Xiao <https://nanx.me>
Wang, Y., Backman, T. W., Horan, K., & Girke, T. (2013). fmcsR: mismatch tolerant maximum common substructure searching in R. Bioinformatics, 29(21), 2792–2794.
mol1 = 'CC(C)CCCCCC(=O)NCC1=CC(=C(C=C1)O)OC' mol2 = 'O=C(NCc1cc(OC)c(O)cc1)CCCC/C=C/C(C)C' mol3 = readChar(system.file('compseq/DB00859.sdf', package = 'Rcpi'), nchars = 1e+6) mol4 = readChar(system.file('compseq/DB00860.sdf', package = 'Rcpi'), nchars = 1e+6) sim1 = calcDrugMCSSim(mol1, mol2, type = 'smile') sim2 = calcDrugMCSSim(mol3, mol4, type = 'sdf', plot = TRUE) print(sim1[[2]]) # Tanimoto Coefficient print(sim2[[3]]) # Overlap Coefficient