Fix op.translate HCOP URL after EBI FTP drop (#303)#304
Merged
Conversation
HGNC removed the entire /pub/databases/genenames/ subtree from the EBI FTP mirror, so every op.translate call (and every op.resource call for a non-human organism) was failing with HTTP 404. Point the download at the new HGNC Google Cloud Storage bucket, which is where HGNC now publishes the HCOP fifteen-column files. Also drop a stray pd.read_csv(url, ...) that was re-downloading the file a second time right after _download + _bytes_to_pandas had already produced map_df, silently doubling the network cost and bypassing the retry logic in _download. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #304 +/- ##
==========================================
- Coverage 94.31% 94.31% -0.01%
==========================================
Files 78 78
Lines 4079 4078 -1
==========================================
- Hits 3847 3846 -1
Misses 232 232
🚀 New features to boost your workflow:
|
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.
Summary
/pub/databases/genenames/subtree from the EBI FTP mirror, so everyop.translatecall — and everyop.resource(..., organism=...)call for a non-human organism — was failing withHTTPError: 404. The HCOP fifteen-column files are now fetched from HGNC's public Google Cloud Storage bucket (https://storage.googleapis.com/public-download-files/hcop/...), which is where HGNC currently publishes them (confirmed via bucket listing;anole_lizardobject was last updated 2026-03-27). The move is only documented on https://www.genenames.org/help/hcop/ — there's no dedicated announcement on the HGNC news page, which is likely why this went unnoticed until the FTP directory was actually taken down.pd.read_csv(url, ...)at the end ofop.translate's download block that was silently re-downloading the HCOP file a second time immediately after_download+_bytes_to_pandashad already producedmap_df, doubling the network cost per call and bypassing the retry logic in_download.2.1.6and adds a CHANGELOG entry.Test plan
PYTHONPATH=src pytest tests/op/test_translate.py— 7 passed (includingtest_translateparametrized overmouse,anole_lizard, andfruitfly, which hits the live bucket)🤖 Generated with Claude Code