Paper/Review

[Paper review] ScaffoldGraph 개념 및 코드

비빔밥계란찜 2025. 7. 28. 23:59



ScaffoldGraph?

Paper
Scott, Oliver B., and A. W. Edith Chan. "ScaffoldGraph: an open-source library for the generation and analysis of molecular scaffold networks and scaffold trees." Bioinformatics 36.12 (2020): 3930-3931.

 

ScaffoldGraph는 open source로 scaffold를 쉽게 추출하고 분석하기 위한 python library 및 CLI tool 입니다. 

 

GitHub - UCLCheminformatics/ScaffoldGraph: ScaffoldGraph is an open-source cheminformatics library, built using RDKit and NetworkX, for the generation and analysis of scaffold networks and scaffold trees.

 

논문의 내용도 중요하지만 빠르게 사용하고 싶으시다면 github를 먼저 참조하시는 것을 추천드립니다. 진짜 사용하기 편한 점은 install이 정말 쉽다는 점..기존 기능들을 잘 정리하고 업데이트 해서 다목적으로 활용하기 좋습니다. 

 

 


Installation

  • ScaffoldGraph currently supports Python 3.6 and above.

Install with conda (recommended)

conda config --add channels conda-forge
conda install -c uclcheminformatics scaffoldgraph
 

Install with pip

# Basic installation.
pip install scaffoldgraph

# Install with ipycytoscape.
pip install scaffoldgraph[vis]

# Install with rdkit-pypi (Linux, MacOS).
pip install scaffoldgraph[rdkit]

# Install with all optional packages. 
pip install scaffoldgraph[rdkit, vis]

 


Fig. 1. Scaffold network and tree representations of amodiaquine.

 

논문에서는 딱 한 개의 figure만 존재합니다. Scaffold는 분자의 중심 구조를 나타내는 의약화학 분야에서 널리 사용되는 개념인데, 분자의 어느 부분을 중심 구조로 정할 것인지 컴퓨터 기반으로 연구할 때 주관적이거나 모호할 수 있습니다. 

 

Paper
Bemis, Guy W., and Mark A. Murcko. "The properties of known drugs. 1. Molecular frameworks." Journal of medicinal chemistry 39.15 (1996): 2887-2893. 

 

Scaffold 하면 가장 유명한 논문 중 하나입니다. Bemis와 Murcko의 정의는 이러한 모호성을 무시하고, scaffold를 ring들과 이들을 연결하는 link atom으로 정의합니다. 그 뒤로 scaffold tree, scaffold network 등 계속해서 scaffold에 관한 연구는 계속되어 왔습니다. Figure 1을 살펴보면 Level 3는 Bemis와 Murcko 정의에 따른 scaffold입니다. 그 뒤로 점선으로 표시된 경로는 scaffold tree 방식을 의미하고, scaffold network는 전체를 포함합니다. HierS Network 방식도 그림에는 나타나있지 않지만 ScaffoldGraph 옵션에 있습니다. HierS는 fused ring을 분해하지 않습니다. (code처럼 break_fused_rings = False 해주면 된다.)

# We can also force the fragmenter not to break fused ring systems

frags = sg.get_all_murcko_fragments(mol, break_fused_rings=False)
Draw.MolsToGridImage(frags)

 

 

[Scaffold network 와 scaffold tree 참고 그림]

 

Figure 1. Example of scaffold trees and scaffold networks generated from three 5-HT3 antagonists: Ondasetron ( 1 ), Alosetron ( 2 ), and Ramosetron ( 3 ). Blue scaffolds were generated by both the scaffold tree and scaffold network approaches, whereas green scaffolds were generated uniquely by the scaffold network approach. In this example, indoles (highlighted with brown boxes) would be generated only by the SN decomposition and, therefore, would not be recognized as conserved scaffolds by the scaffold tree approach. For imidazoles (highlighted with orange boxes), one of the three occurrences is detected by the scaffold tree approach (for Ramosetron,  3 ); however, the ST approach does not recognize the presence of imidazoles in Ondasetron and Alosetron. Considering all occurrences of a scaffold in a library (i.e., using more samples) enables a better statistical assessment of a scaffolds’ activity and might identify weaker signals than using fewer examples.

 

 

그림에서 파랑색 compound는 scaffold tree 결과물이고 전체는 scaffold network 결과물입니다. 두 방식은 모두 Bemis-Murcko scaffold로 시작합니다. 이 방식은 모든 고리의 치환기를 제거하고 ring system과 이를 연결하는 linker만 남기는 방식이기 때문에 예를 들어, scaffold hopping을 하기 위해서는 너무 많은 sub structure를 포함하고 있다고 볼 수 있습니다. scaffold tree 같은 경우에는 exocyclic과 exolinker의 이중 결합은 유지됩니다. 이렇게 생성된 scaffold 들을 child scaffold로 정하고 주변의 말단 고리를 반복적으로 제거하면서 parent scaffold를 계산하고 더 이상 제거할 고리가 없을 때 해당 scaffold를 level 1로 정의합니다. Scaffold network는 scaffold tree를 기반으로 하지만 각 level에서 하나의 특정 scaffold만 선택하는 규칙을 적용하지 않는 것이 특징입니다. 

 

 

[HierS 참고 그림]

Figure 1 Scaffold structures for the p38 MAP kinase inhibitor BIRB 796: 12  (A) BIRB 796; (B) basis scaffold structures; (C) superscaffold structure; (D) all two ring system scaffolds; (E) all three ring system scaffolds.

 

HierS의 Scaffold tree & network와 가장 큰 차이점은 fused ring을 pruning (가지치기) 과정에서 제거하지 않는다는 점입니다.

 

 

 

[ScaffoldGraph]

Features PMID information
BM scaffold 8709122 Murcko Fragment generation (Bemis, 1996)
scaffold tree 17238248 Scaffold Tree generation (Schuffenhauer, 2007)
scaffold network 21615076 Scaffold Network generation (Varin, 2011)
HierS network 15857124 HierS Network Generation (Wilkens, 2005)

 

 


Github - example - basic function 

# Import scaffoldgraph
import scaffoldgraph as sg

# Import rdkit
from rdkit.Chem import Draw
from rdkit import Chem

 

# Create a molecule from a SMILES string

mol = Chem.MolFromSmiles('O=C(O)c1ccc2c(c1)nc(-c1ccccn1)n2C1CCCCCC1')
mol

 

# We can generate all possible murcko fragments using scaffoldgraph
# returned fragments are rdkit molecules

frags = sg.get_all_murcko_fragments(mol)
Draw.MolsToGridImage(frags)
# We can also force the fragmenter not to break fused ring systems

frags = sg.get_all_murcko_fragments(mol, break_fused_rings=False)
Draw.MolsToGridImage(frags)

 

 

 

# Instead of returning all possible fragments we can just return the next hierarchy
# This method assumes that a murcko scaffold is supplied

scaffold = Chem.Scaffolds.MurckoScaffold.GetScaffoldForMol(mol)
frags = sg.get_next_murcko_fragments(scaffold)
Draw.MolsToGridImage(frags)
# We can also force this method to not break fused ring systems

frags = sg.get_next_murcko_fragments(scaffold, break_fused_rings=False)
Draw.MolsToGridImage(frags)
# Scaffoldgraph can also create murcko fragments using the scaffold tree method
# The rules used to prioritize fragments are the same as the original publication

frags = sg.tree_frags_from_mol(mol)
Draw.MolsToGridImage(frags)

 

 

 

 

 

 

 

 

 

 

 

Reference

 

 


  • 현재 관련 분야를 공부하고 있는 전문가가 아닌 학생이기 때문에 틀린 내용이 있을 수 있습니다.
  • 오타와 틀린 부분을 댓글로 알려주시면 수정하도록 하겠습니다.