Turn a huge BindingDB TSV file (millions of rows, 640 columns) into one self-contained HTML report that you can open in any browser, with no Python knowledge needed to read it.

Live example: https://turfstack.github.io/bindingdb-report/example_report/bindingdb_report.html (works once GitHub Pages is switched on for this repo)
Most of this code was generated with the help of a large language model (Claude, by Anthropic), then run and checked by the author. It may contain mistakes. Please verify any number that matters to your work (see “Checking the numbers” below).
pandas 1.3 or newer and numpy (listed in requirements.txt)1. Get the code and install the packages
git clone https://github.com/turfstack/bindingdb-report.git
cd bindingdb-report
python -m venv .venv
Activate the environment:
source .venv/bin/activate # Linux / macOS / WSL
.venv\Scripts\Activate.ps1 # Windows PowerShell
pip install -r requirements.txt
2. Try it on a small slice first (about a minute)
python bindingdb_report.py "path/to/BindingDB_All.tsv" --max-rows 100000 --out trial.html
3. Run it on the whole file
python bindingdb_report.py "path/to/BindingDB_All.tsv" --out bindingdb_report.html
Then open bindingdb_report.html in your browser.
| Option | Default | Meaning |
|---|---|---|
tsv (required) |
Path to the BindingDB TSV file | |
--out |
bindingdb_report.html |
Output HTML file |
--chunk |
50000 |
Rows read at a time. Lower it (for example 25000) if you run out of memory |
--max-rows |
all rows | Only profile the first N rows (trial run) |
--title |
BindingDB data assessment |
Report title |
--human-labels |
Homo sapiens, Human, Homo sapiens (Human) |
Organism spellings counted as human |
> or <), or text; pKd / pKi / pIC50 histograms.Two independent checks you can run yourself (Linux, macOS or WSL):
wc -l BindingDB_All.tsv
This counts lines. Subtract 1 for the header and compare with the row count in the report.
awk -F'\t' 'NR==1{for(i=1;i<=NF;i++) if($i=="Target Source Organism According to Curator or DataSource") c=i; next} $c=="Homo sapiens"||$c=="Human"||$c=="Homo sapiens (Human)"{n++} END{print n}' BindingDB_All.tsv
This counts rows with one of the three human labels. It should match the “Rows matching human labels” card, give or take a few rows where whitespace was trimmed.
Validation done so far:
BindingDB_All.tsv (release 202610, 3,243,660 rows): the awk count of human-labelled rows was 2,695,170, matching the report, and the line count matched the rows parsed (nothing skipped). Run time: about 3 minutes on a Windows laptop with 16 GB RAM (observed, not formally timed).This repository contains code and an example report only, not BindingDB data.
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
202610 (BindingDB_All.tsv).LICENSE). The license covers the code only, not BindingDB’s data.