Example 8.2 — Aggregate counts: the most-studied human targets¶
A reproducible record of an AI-assisted BindingDB analysis: each prompt, the BindingDB tool calls that answered it with their recorded results, the answer, and its figures. Run all cells to show the recorded results, or rerun every call on your own copy of the database and check each result against the recorded one.
- Date: 2026-11-23
- Model: claude-opus-5-5
- Data: BindingDB release 202611 (
BDB-mySQL_All_202611_dmp.zip, SHA-256daea9260d404919a183ce02d91bf4b9c49b410bea7eaaeba105c8e0280510381) - Database build: 2026-11-21T01:08:15+00:00, DuckDB 1.5.6
- Derived data: standard InChIKeys computed from SMILES by RDKit 2026.03.6; compound_property computed from SMILES (largest fragment) by RDKit 2026.03.6
- Server: mcp-bindingdb v0.1.17, commit
79dae5d22c0f - Software: python 3.12.7, duckdb 1.5.6, rdkit 2026.03.6, mcp 2.3.0, gemmi 0.7.5
- Notebook generated: 2026-11-24T04:56:24Z
- Contents: 1 exchange · 1 tool call
How to run¶
Keep the notebook in its folder, which holds everything it needs: requirements.txt (mcp-bindingdb at its commit and the versions of the packages it needs) and the recorded results in data/. With uv, from that folder (replace the path with yours):
cd /path/to/8.2-aggregate-counts-notebook
uv run --no-project --with-requirements requirements.txt --with jupyterlab jupyter lab 8.2-aggregate-counts-notebook.ipynb
then choose Run → Run All Cells. The first start installs the packages, which takes a minute or two; the cells show the recorded results, so no database is needed. Without uv: pip install -r requirements.txt jupyterlab, then jupyter lab 8.2-aggregate-counts-notebook.ipynb in the folder.
How to rerun the calls¶
To rerun every BindingDB call on your own copy of release 202611 and check each result against the recorded one, set RERUN = True in the setup cell and run all cells, or rerun the notebook without opening Jupyter, writing a copy with the new results:
cd /path/to/8.2-aggregate-counts-notebook
BINDINGDB_RERUN=1 uv run --no-project --with-requirements requirements.txt --with nbconvert jupyter nbconvert --to notebook --execute --output 8.2-aggregate-counts-notebook-rerun.ipynb 8.2-aggregate-counts-notebook.ipynb
A rerun needs the database: the one BINDINGDB_DUCKDB=/path/to/bindingdb_202611.duckdb names (put it before uv run), else the newest one mcp-bindingdb built on this computer, for example for Claude Desktop. With neither, the first rerun builds one, which takes about half an hour and 2.4 GB. To build exactly release 202611, with a clone of mcp-bindingdb:
git clone https://github.com/sbl-sdsc/mcp-bindingdb.git
cd mcp-bindingdb
git checkout 79dae5d22c0f15b8ded9b49adc8b105f0463703a
scripts/build_duckdb.sh --release 202611
The setup cell checks the database's release and source checksum against the recorded ones.
Run as it is, each call cell shows its recorded result, read from data/ and checked against the SHA-256 digest recorded in the cell. Rerun, it shows the new result with ✅ when it matches the recorded one (floats to 10 significant digits, ids of viewers and files left out). Calls to PubChem, RCSB or PDBe depend on those services and may differ. The prose answers are the model's and are not recomputed.
# Shows the results recorded during the session (data/), so the notebook runs without a database. Set
# RERUN = True (or start Jupyter with BINDINGDB_RERUN=1) to rerun every BindingDB call on a local copy of
# the database instead and check it against its recorded result: see 'How to rerun the calls' above.
from mcp_bindingdb.notebook import Replay
RERUN = False
replay = Replay(release='202611', source_zip_sha256='daea9260d404919a183ce02d91bf4b9c49b410bea7eaaeba105c8e0280510381', rerun=RERUN)
Recorded with BindingDB release 202611, mcp-bindingdb v0.1.17 (commit 79dae5d22c0f) python 3.12.7, duckdb 1.5.6, rdkit 2026.03.6, mcp 2.3.0, gemmi 0.7.5
Call 1 · run_sql · ran 2026-11-24 04:56:24 UTC (16 lines)
# Call 1 · run_sql · ran 2026-11-24 04:56:24 UTC
sql = """
SELECT uniprot,
arg_min(target_name, length(target_name)) AS target_name,
count(DISTINCT monomerid) AS compounds,
count(*) AS measurements,
count(DISTINCT polymerid) AS target_records
FROM activity
WHERE organism = 'Homo sapiens' AND uniprot IS NOT NULL
GROUP BY uniprot
ORDER BY compounds DESC
LIMIT 10
"""
await replay.call(1, 'run_sql', {'sql': sql},
sha256='1c1853abfa5c0828b2b6cc4b6c41729516827c84b3e1e84fa5b5ca189451a21f')
Call 1 · run_sql · recorded result · sha256 1c1853abfa5c…
10 rows
| uniprot | target_name | compounds | measurements | target_records |
|---|---|---|---|---|
| O60674 | Tyrosine-protein kinase JAK2 | 18186 | 25188 | 13 |
| P00533 | Epidermal growth factor receptor | 16187 | 30307 | 49 |
| Q12809 | Potassium voltage-gated channel subfamily H member 2 | 14872 | 18767 | 1 |
| P23458 | Tyrosine-protein kinase JAK1 | 14768 | 19337 | 7 |
| Q06187 | Tyrosine-protein kinase BTK | 14353 | 25705 | 6 |
| P42336 | Phosphatidylinositol 4,5-bisphosphate 3-kinase catalytic subunit alpha isoform | 13081 | 16270 | 2 |
| O60885 | Bromodomain-containing protein 4 | 13024 | 22896 | 31 |
| P35968 | Vascular endothelial growth factor receptor 2 | 12792 | 15984 | 3 |
| P51449 | Nuclear receptor ROR-gamma | 12007 | 18281 | 6 |
| Q9NWZ3 | Interleukin-1 receptor-associated kinase 4 | 11909 | 14983 | 2 |
🧠 Assistant
These are the 10 human protein targets with the most distinct compounds measured:
| Rank | Target | UniProt | Compounds | Measurements | Target records pooled |
|---|---|---|---|---|---|
| 1 | Tyrosine-protein kinase JAK2 | O60674 | 18,186 | 25,188 | 13 |
| 2 | Epidermal growth factor receptor (EGFR) | P00533 | 16,187 | 30,307 | 49 |
| 3 | Potassium channel hERG (KCNH2) | Q12809 | 14,872 | 18,767 | 1 |
| 4 | Tyrosine-protein kinase JAK1 | P23458 | 14,768 | 19,337 | 7 |
| 5 | Tyrosine-protein kinase BTK | Q06187 | 14,353 | 25,705 | 6 |
| 6 | PI3-kinase catalytic subunit alpha (PIK3CA) | P42336 | 13,081 | 16,270 | 2 |
| 7 | Bromodomain-containing protein 4 (BRD4) | O60885 | 13,024 | 22,896 | 31 |
| 8 | VEGF receptor 2 (KDR) | P35968 | 12,792 | 15,984 | 3 |
| 9 | Nuclear receptor ROR-gamma | P51449 | 12,007 | 18,281 | 6 |
| 10 | IRAK4 | Q9NWZ3 | 11,909 | 14,983 | 2 |
Seven of the ten are kinases (JAK2, EGFR, JAK1, BTK, PIK3CA, KDR, IRAK4), which reflects how much of drug discovery has gone into kinase inhibitors. hERG is the odd one out. It is not a therapeutic target: compounds are tested against it routinely because blocking it can cause dangerous heart-rhythm problems. It ranks third only because so many unrelated compounds are screened against it as a safety check.
A lesson about counting "targets". BindingDB stores every mutant and construct as a separate target record. EGFR has 49 of them, for example "Epidermal growth factor receptor [S768I]". If you GROUP BY polymerid or by target_name, EGFR splits into 49 rows and drops down the ranking. Grouping by uniprot pools them, and count(DISTINCT polymerid) shows how many records were merged. Labelling each group with any_value(target_name) can pick a construct name such as "JAK2 [536-812,W659A,...]"; the query takes the shortest name instead (arg_min(target_name, length(target_name))), which is usually the wild-type record.
Two more choices worth noticing:
count(DISTINCT monomerid)counts compounds, whilecount(*)counts measurements. EGFR has more measurements than JAK2 (30,307 vs 25,188) but fewer distinct compounds.uniprot IS NOT NULLkeeps single proteins and leaves out multi-subunit complexes, which have no single UniProt accession.
How this was answered
One run_sql query on the activity table: filter to human, group by UniProt accession, count distinct compounds, sort and keep the top 10.
SELECT uniprot,
arg_min(target_name, length(target_name)) AS target_name,
count(DISTINCT monomerid) AS compounds,
count(*) AS measurements,
count(DISTINCT polymerid) AS target_records
FROM activity
WHERE organism = 'Homo sapiens' AND uniprot IS NOT NULL
GROUP BY uniprot
ORDER BY compounds DESC
LIMIT 10
Compared with release 202610 the ranking is unchanged; the counts moved by at most a few dozen compounds (PIK3CA gained the most, 38).
Try next
- "Same ranking, but count only compounds with IC50 below 100 nM" — add
AND affinity_type = 'IC50' AND value <= 100 AND relation = '=' - "Which non-human targets have the most compounds?" — change the organism filter
- Example 5.4 looks at hERG liabilities among approved drugs
Verification¶
How each rerun call compared with its recorded result.
replay.summary()
Recorded: 1 tool call. Run all cells to compare.
How to cite¶
Cite this notebook (for example deposited with a DOI) together with the data and software it ran on:
- Data: BindingDB release 202611, https://www.bindingdb.org/rwd/bind/BDB-mySQL_All_202611_dmp.zip (SHA-256 daea9260d404919a183ce02d91bf4b9c49b410bea7eaaeba105c8e0280510381)
- Software: mcp-bindingdb v0.1.17, commit 79dae5d22c0f15b8ded9b49adc8b105f0463703a, https://github.com/sbl-sdsc/mcp-bindingdb
- Analysis: Example 8.2 — Aggregate counts: the most-studied human targets, 2026-11-23, with claude-opus-5-5
- BindingDB: Liu T, Hwang L, Burley SK, Nitsche CI, Southan C, Walters WP, Gilson MK. BindingDB in 2024: a FAIR knowledgebase of protein-small molecule binding data. Nucleic Acids Research 53(D1):D1633-D1644, 2025. https://doi.org/10.1093/nar/gkae1075
As BibTeX, for this server, BindingDB and RDKit (used for structure search, properties and drawings):
@software{rose2026mcp-bindingdb,
title={MCP BindingDB Server},
author={Rose, P.W.},
year={2026},
url={https://github.com/sbl-sdsc/mcp-bindingdb}
}
@article{liu2025bindingdb,
title={BindingDB in 2024: a FAIR knowledgebase of protein-small molecule binding data},
author={Liu, T. and Hwang, L. and Burley, S.K. and Nitsche, C.I. and Southan, C. and Walters, W.P. and Gilson, M.K.},
journal={Nucleic Acids Research},
volume={53},
number={D1},
pages={D1633--D1644},
year={2025},
doi={10.1093/nar/gkae1075}
}
@software{rdkit,
title={RDKit: Open-source cheminformatics},
author={Landrum, G. and others},
version={2026.03.6},
url={https://www.rdkit.org},
doi={10.5281/zenodo.591637}
}