(by claude) Fix PDB sequence clusters: migrate off deprecated RCSB bc-*.out files#2239
Merged
jamesmkrieger merged 2 commits intoJun 19, 2026
Conversation
RCSB removed the legacy bc-{sqid}.out cluster files (now HTTP 404), so
fetchPDBClusters retrieved no usable data and a subsequent loadPDBClusters
crashed in os.path.getmtime with FileNotFoundError.
- fetchPDBClusters: download from the current clusters-by-entity-{sqid}.txt
endpoint, and refuse to save empty bodies or HTML error pages (so a failed
download is never reported as success).
- loadPDBClusters: re-check the cache file after fetching and raise a clear
IOError instead of crashing in getmtime; parse on the last underscore so
identifiers containing underscores (computed structure models, e.g.
AF_AFP12345F1) still yield clean (identifier, entity) pairs.
- listPDBCluster: the data now clusters by polymer entity rather than chain, so
the second argument is an entity id; update matching and docstrings.
- Add tests for fetch/list and the failed-download error path.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
In a fresh environment prody's package path is unset, so getPackagePath() (reached via fetchPDBClusters) prompts with input(); under pytest's captured output this raised "OSError: reading from stdin while output is captured!". Point the package path at the writable test TEMPDIR in setUpModule and restore it in tearDownModule. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
karolamik13
approved these changes
Jun 19, 2026
karolamik13
left a comment
Contributor
There was a problem hiding this comment.
I have tested it. Everything is working fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2238 (discovered and written by claude too)
RCSB removed the legacy bc-{sqid}.out cluster files (now HTTP 404), so fetchPDBClusters retrieved no usable data and a subsequent loadPDBClusters crashed in os.path.getmtime with FileNotFoundError.