Skip to content

Fix rotted PDB download (#85) and add a MaSIF-site CI smoke test - #93

Open
DoctorDean wants to merge 1 commit into
LPDI-EPFL:masterfrom
DoctorDean:fix-pdb-download-and-ci
Open

Fix rotted PDB download (#85) and add a MaSIF-site CI smoke test#93
DoctorDean wants to merge 1 commit into
LPDI-EPFL:masterfrom
DoctorDean:fix-pdb-download-and-ci

Conversation

@DoctorDean

Copy link
Copy Markdown

What this fixes

source/data_preparation/00-pdb_download.py downloads structures via Biopython's
PDBList.retrieve_pdb_file(...), which relies on legacy wwPDB download paths that RCSB
has since retired. It now fails silently — no file is written — and the whole
data_prepare_one.sh pipeline then dies downstream with a confusing "structure doesn't
exist" / IndexError. This is the root cause behind #85 (and the symptoms in #83).

The fix is a two-line change: fetch the structure directly from the current, stable
RCSB endpoint (https://files.rcsb.org/download/<ID>.pdb) instead of going through
Biopython's retired path. It's Python 2/3 compatible and needs no new dependencies.

Verification

Ran the canonical example end-to-end on the published pablogainza/masif:latest image
with only this change (no --file workaround):

./data_prepare_one.sh 4ZQK_A     # built-in download — now works again
./predict_site.sh 4ZQK_A
./color_site.sh 4ZQK_A
# -> ROC AUC score for protein 4ZQK_A : 0.9137

That matches the value in the paper, so the whole interaction-site path is healthy again.

Also included: a CI smoke test

.github/workflows/masif-site-smoke.yml runs exactly the above on every push/PR (inside
the published image) and asserts the 4ZQK_A ROC-AUC stays ≥ 0.8. The repo currently has
no CI, which is why the download breakage went unnoticed for years — this gives MaSIF a
reproducibility heartbeat so it can't silently rot again.

Changes

  • source/data_preparation/00-pdb_download.py — direct RCSB fetch (the fix)
  • .github/workflows/masif-site-smoke.yml — new CI smoke test

Full disclosure: the diagnosis and fix were produced by Lazarus
(https://github.com/DoctorDean/lazarus), an autonomous agent that resurrects dead research
code, and then verified by hand end-to-end (the ROC-AUC above is a real run). Happy to
adjust anything to fit the project's conventions.

…test

Biopython's PDBList.retrieve_pdb_file relies on legacy wwPDB paths that RCSB retired,
so the built-in download fails silently and breaks the pipeline downstream (LPDI-EPFL#85).
Fetch directly from https://files.rcsb.org/download/ instead. Verified: the built-in
flow now runs end-to-end and scores ROC-AUC 0.9137 on 4ZQK_A. Also adds a CI smoke
test asserting the 4ZQK_A ROC-AUC stays >= 0.8.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant