bindingdb-database について
bindingdb-databaseは、薬物とタンパク質の実測結合親和性を収録する公開データベースBindingDBを検索・分析するスキルです。APIやダウンロードデータを利用し、創薬や計算化学研究を支援します。
主な機能
- 01タンパク質標的別の親和性検索
- 02名称やSMILESによる化合物検索
- 03構造活性相関の分析
- 04化合物の標的選択性プロファイリング
- 05ML用親和性データの準備
活用シーン
- 01標的に結合するリガンドと親和性の検索
- 02類縁体間の効力比較
- 03潜在的なオフターゲット結合の確認
- 04タンパク質・リガンド学習データの作成
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ leonchaox/ qinyan-academic-skills --skill bindingdb-databaseインストール後、Claude Code で/bindingdb-databaseを入力して読み込まれたか確認します。
同梱ファイルreferences/affinity_queries.md
詳細
BindingDB データベース
概要
BindingDB(https://www.bindingdb.org/)は、実測された薬物とタンパク質の結合親和性を収録する主要な公開データベースです。科学論文や特許文献から精選されたデータを含み、約140万種の化合物について、約9,200種のタンパク質ターゲットに対する結合データを300万件以上収録しています。BindingDB には、創薬、薬理学、計算化学の研究に不可欠な定量的結合測定値(Ki、Kd、IC50、EC50)が保存されています。
主なリソース:
- BindingDB のウェブサイト:https://www.bindingdb.org/
- REST API:https://www.bindingdb.org/axis2/services/BDBService
- ダウンロード:https://www.bindingdb.org/bind/chemsearch/marvin/Download.jsp
- GitHub:https://github.com/drugilsberg/bindingdb
このスキルを使用する場面
以下の場合に BindingDB を使用します。
- ターゲットベースの創薬:あるターゲットタンパク質に結合する既知の化合物と、その親和性を調べる場合
- SAR 解析:類縁体の一連の化合物において、構造の変更が結合親和性にどのような影響を与えるかを調べる場合
- リード化合物のプロファイリング:ある化合物がどのターゲットに結合するか(選択性/ポリファーマコロジー)を調べる場合
- ベンチマークデータセット:機械学習モデルのトレーニング用に、精選されたタンパク質とリガンドの親和性データを取得する場合
- ドラッグリポジショニング解析:承認済み薬剤が意図しないターゲットに結合するかを調べる場合
- 競合分析:あるターゲットクラスについて、報告されている最良の親和性を調べる場合
- フラグメントスクリーニング:あるターゲットに対するフラグメントの検証済み結合データを検索する場合
主な機能
1. BindingDB REST API
ベース URL:https://www.bindingdb.org/axis2/services/BDBService
import requests
BASE_URL = "https://www.bindingdb.org/axis2/services/BDBService"
def bindingdb_query(method, params):
"""Query the BindingDB REST API."""
url = f"{BASE_URL}/{method}"
response = requests.get(url, params=params, headers={"Accept": "application/json"})
response.raise_for_status()
return response.json()
2. ターゲット(UniProt ID)で検索
def get_ligands_for_target(uniprot_id, affinity_type="Ki", cutoff=10000, unit="nM"):
"""
Get all ligands with measured affinity for a UniProt target.
Args:
uniprot_id: UniProt accession (e.g., "P00519" for ABL1)
affinity_type: "Ki", "Kd", "IC50", "EC50"
cutoff: Maximum affinity value to return (in nM)
unit: "nM" or "uM"
"""
params = {
"uniprot_id": uniprot_id,
"affinity_type": affinity_type,
"affinity_cutoff": cutoff,
"response": "json"
}
return bindingdb_query("getLigandsByUniprotID", params)
# Example: Get all compounds binding ABL1 (imatinib target)
ligands = get_ligands_for_target("P00519", affinity_type="Ki", cutoff=100)
3. 化合物名または SMILES で検索
def search_by_name(compound_name, limit=100):
"""Search BindingDB for compounds by name."""
params = {
"compound_name": compound_name,
"response": "json",
"max_results": limit
}
return bindingdb_query("getAffinitiesByCompoundName", params)
def search_by_smiles(smiles, similarity=100, limit=50):
"""
Search BindingDB by SMILES string.
Args:
smiles: SMILES string of the compound
similarity: Tanimoto similarity threshold (1-100, 100 = exact)
"""
params = {
"SMILES": smiles,
"similarity": similarity,
"response": "json",
"max_results": limit
}
return bindingdb_query("getAffinitiesByBEI", params)
# Example: Search for imatinib binding data
result = search_by_name("imatinib")
4. ダウンロードによる解析(大規模な検索に推奨)
包括的な解析を行うには、BindingDB のデータを直接ダウンロードします。
import pandas as pd
def load_bindingdb(filepath="BindingDB_All.tsv"):
"""
Load BindingDB TSV file.
Download from: https://www.bindingdb.org/bind/chemsearch/marvin/Download.jsp
"""
# Key columns
usecols = [
"BindingDB Reactant_set_id",
"Ligand SMILES",
"Ligand InChI",
"Ligand InChI Key",
"BindingDB Target Chain Sequence",
"PDB ID(s) for Ligand-Target Complex",
"UniProt (SwissProt) Entry Name of Target Chain",
"UniProt (SwissProt) Primary ID of Target Chain",
"UniProt (TrEMBL) Primary ID of Target Chain",
"Ki (nM)",
"IC50 (nM)",
"Kd (nM)",
"EC50 (nM)",
"kon (M-1-s-1)",
"koff (s-1)",
"Target Name",
"Target Source Organism According to Curator or DataSource",
"Number of Protein Chains in Target (>1 implies a multichain complex)",
"PubChem CID",
"PubChem SID",
"ChEMBL ID of Ligand",
"DrugBank ID of Ligand",
]
df = pd.read_csv(filepath, sep="\t", usecols=[c for c in usecols if c],
low_memory=False, on_bad_lines='skip')
# Convert affinity columns to numeric
for col in ["Ki (nM)", "IC50 (nM)", "Kd (nM)", "EC50 (nM)"]:
if col in df.columns:
df[col] = pd.to_numeric(df[col], errors='coerce')
return df
def query_target_affinity(df, uniprot_id, affinity_types=None, max_nm=10000):
"""Query loaded BindingDB for a specific target."""
if affinity_types is None:
affinity_types = ["Ki (nM)", "IC50 (nM)", "Kd (nM)"]
# Filter by UniProt ID
mask = df["UniProt (SwissProt) Primary ID of Target Chain"] == uniprot_id
target_df = df[mask].copy()
# Filter by affinity cutoff
has_affinity = pd.Series(False, index=target_df.index)
for col in affinity_types:
if col in target_df.columns:
has_affinity |= target_df[col] <= max_nm
result = target_df[has_affinity][["Ligand SMILES"] + affinity_types +
["PubChem CID", "ChEMBL ID of Ligand"]].dropna(how='all')
return result.sort_values(affinity_types[0])
5. SAR 解析
import pandas as pd
def sar_analysis(df, target_uniprot, affinity_col="IC50 (nM)"):
"""
Structure-activity relationship analysis for a target.
Retrieves all compounds with affinity data and ranks by potency.
"""
target_data = query_target_affinity(df, target_uniprot, [affinity_col])
if target_data.empty:
return target_data
# Add pIC50 (negative log of IC50 in molar)
if affinity_col in target_data.columns:
target_data = target_data[target_data[affinity_col].notna()].copy()
target_data["pAffinity"] = -((target_data[affinity_col] * 1e-9).apply(
lambda x: __import__('math').log10(x)
))
target_data = target_data.sort_values("pAffinity", ascending=False)
return target_data
# Most potent compounds against EGFR (P00533)
# sar = sar_analysis(df, "P00533", "IC50 (nM)")
# print(sar.head(20))
6. ポリファーマコロジープロファイル
def polypharmacology_profile(df, ligand_smiles_or_name, affinity_cutoff_nM=1000):
"""
Find all targets a compound binds to.
Uses PubChem CID or SMILES for matching.
"""
# Search by ligand SMILES (exact match)
mask = df["Ligand SMILES"] == ligand_smiles_or_name
ligand_data = df[mask].copy()
# Filter by affinity
aff_cols = ["Ki (nM)", "IC50 (nM)", "Kd (nM)"]
has_aff = pd.Series(False, index=ligand_data.index)
for col in aff_cols:
if col in ligand_data.columns:
has_aff |= ligand_data[col] <= affinity_cutoff_nM
result = ligand_data[has_aff][
["Target Name", "UniProt (SwissProt) Primary ID of Target Chain"] + aff_cols
].dropna(how='all')
return result.sort_values("Ki (nM)")
検索ワークフロー
ワークフロー 1:あるターゲットに対する最良の阻害剤を検索する
import pandas as pd
def find_best_inhibitors(uniprot_id, affinity_type="IC50 (nM)", top_n=20):
"""Find the most potent inhibitors for a target in BindingDB."""
df = load_bindingdb("BindingDB_All.tsv") # Load once and reuse
result = query_target_affinity(df, uniprot_id, [affinity_type])
if result.empty:
print(f"No data found for {uniprot_id}")
return result
result = result.sort_values(affinity_type).head(top_n)
print(f"Top {top_n} inhibitors for {uniprot_id} by {affinity_type}:")
for _, row in result.iterrows():
print(f" {row['PubChem CID']}: {row[affinity_type]:.1f} nM | SMILES: {row['Ligand SMILES'][:40]}...")
return result
ワークフロー 2:選択性プロファイリング
- すべてのターゲットに対する、対象化合物の親和性データをすべて取得します
- オンターゲットとオフターゲット間の親和性比を比較します
- 選択性のクリフ(選択性を向上させる構造変化)を特定します
- 追加の選択性データについて ChEMBL と照合します
ワークフロー 3:機械学習データセットの準備
def prepare_ml_dataset(df, uniprot_ids, affinity_col="IC50 (nM)",
max_affinity_nM=100000, min_count=50):
"""Prepare BindingDB data for ML model training."""
records = []
for uid in uniprot_ids:
target_df = query_target_affinity(df, uid, [affinity_col], max_affinity_nM)
if len(target_df) >= min_count:
target_df = target_df.copy()
target_df["target"] = uid
records.append(target_df)
if not records:
return pd.DataFrame()
combined = pd.concat(records)
# Add pAffinity (normalized)
combined["pAffinity"] = -((combined[affinity_col] * 1e-9).apply(
lambda x: __import__('math').log10(max(x, 1e-12))
))
return combined[["Ligand SMILES", "target", "pAffinity", affinity_col]].dropna()
主なデータフィールド
| フィールド | 説明 |
|---|---|
Ligand SMILES | 化合物の2D構造 |
Ligand InChI Key | 一意の化学識別子 |
Ki (nM) | 阻害定数(平衡、機能的) |
Kd (nM) | 解離定数(熱力学的、結合) |
IC50 (nM) | 50%阻害濃度 |
EC50 (nM) | 50%有効濃度 |
kon (M-1-s-1) | 結合速度定数 |
koff (s-1) | 解離速度定数 |
UniProt (SwissProt) Primary ID | ターゲットの UniProt アクセッション |
Target Name | タンパク質名 |
PDB ID(s) for Ligand-Target Complex | 結晶構造 |
PubChem CID | PubChem 化合物 ID |
ChEMBL ID of Ligand | ChEMBL 化合物 ID |
親和性の解釈
| 親和性 | 分類 | 薬剤らしさ |
|---|---|---|
| < 1 nM | サブナノモル | 非常に強力(ピコモル域) |
| 1–10 nM | ナノモル | 強力。承認薬で一般的な範囲 |
| 10–100 nM | 中程度 | リード化合物でよく見られる範囲 |
| 100–1000 nM | 弱い | フラグメント/出発点 |
| > 1000 nM | 非常に弱い | 一般に薬剤としての関連性の基準を下回る |
ベストプラクティス
- 直接結合には Ki を使用する:Ki は酵素の作用機序に左右されず、真の結合親和性を反映します
- IC50 は状況に依存します:IC50 値は基質濃度に依存します(Cheng-Prusoff 式)
- 単位を統一する:BindingDB の報告単位は nM です。研究間で比較する際は単位を確認してください
- 標的生物種でフィルタリングする:
Target Source Organismを使用して、ヒトタンパク質のデータであることを確認してください - 欠損値に対処する:すべての化合物にすべての測定タイプのデータがあるわけではありません
- ChEMBL と相互参照する:ChEMBL には、医薬品化学向けにキュレーションされた活性データがより多く含まれています
追加リソース
- BindingDB のウェブサイト:https://www.bindingdb.org/
- データのダウンロード:https://www.bindingdb.org/bind/chemsearch/marvin/Download.jsp
- API ドキュメント:https://www.bindingdb.org/bind/BindingDBRESTfulAPI.jsp
- 引用文献:Gilson MK et al. (2016) Nucleic Acids Research. PMID: 26481362
- 関連リソース:ChEMBL (https://www.ebi.ac.uk/chembl/)、PubChem BioAssay
コメント
Markdown 対応