calcDrugMCSSim: Calculate Drug Molecule Similarity Derived by Maximum Common...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/702-calcDrugMCSSim.R

Description

Calculate Drug Molecule Similarity Derived by Maximum Common Substructure Search

Usage

1
2
calcDrugMCSSim(mol1, mol2, type = c("smile", "sdf"), plot = FALSE,
  al = 0, au = 0, bl = 0, bu = 0, matching.mode = "static", ...)

Arguments

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: 'static', 'aromatic', and 'ring'.

...

Other graphical parameters

Details

This function calculate drug molecule similarity derived by maximum common substructure search. The maximum common substructure search algorithm is provided by the fmcsR package.

Value

A list containing the detail MCS information and similarity values. The numeric similarity value includes Tanimoto coefficient and overlap coefficient.

Author(s)

Nan Xiao <https://nanx.me>

References

Wang, Y., Backman, T. W., Horan, K., & Girke, T. (2013). fmcsR: mismatch tolerant maximum common substructure searching in R. Bioinformatics, 29(21), 2792–2794.

Examples

1
2
3
4
5
6
7
8
9
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

Example output

OpenJDK 64-Bit Server VM warning: Can't detect primordial thread stack location - find_vma failed
Tanimoto_Coefficient 
           0.5925926 
Overlap_Coefficient 
          0.6666667 

Rcpi documentation built on Nov. 8, 2020, 8:23 p.m.