Skip to content

Add AlphaFold DB download functions - #95

Merged
jgreener64 merged 1 commit into
masterfrom
teh/alphafold
Oct 27, 2026
Merged

jgreener64 merged 1 commit into
masterfrom
teh/alphafold

Conversation

@timholy

@timholy timholy commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

I extracted this from https://github.com/HolyLab/GPCRAnalysis.jl/, as it is general to any protein. But if you don't think this is the right home, I can find an alternate.

This agent-generated commit extends the version I had written in GPCRAnalysis with better metadata-fetching, a downloadalphafold(f::Function, args...; kwargs...) form, and a download-and-read command. I assume the functional form was inspired by downloadpdb(f, ...); Claude wanted me to tell you 😆 that this version downloads to a temporary directory and thus will never overwrite and then delete a file you already have saved in a local directory.

Claude's commit message follows.


alphafoldentry returns the AlphaFold DB API metadata for a model, downloadalphafold downloads the latest model version, and retrievealphafold downloads and reads it, following the corresponding PDB functions. Requests send a BioStructures user agent because the AlphaFold DB file server rejects the Downloads.jl default. JSON is added as a dependency to parse API responses.

Example J in the docs now uses retrievealphafold, since AlphaFold DB no longer serves the v4 model it downloaded.

Assisted-by: Claude Opus 5.5 noreply@anthropic.com

`alphafoldentry` returns the AlphaFold DB API metadata for a model,
`downloadalphafold` downloads the latest model version, and
`retrievealphafold` downloads and reads it, following the
corresponding PDB functions. Requests send a BioStructures user
agent because the AlphaFold DB file server rejects the Downloads.jl
default. JSON is added as a dependency to parse API responses.

Example J in the docs now uses `retrievealphafold`, since AlphaFold DB
no longer serves the v4 model it downloaded.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.61702% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.23%. Comparing base (ecad276) to head (edf3b0e).

Files with missing lines Patch % Lines
src/download.jl 93.61% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #95      +/-   ##
==========================================
- Coverage   95.26%   95.23%   -0.04%     
==========================================
  Files          16       16              
  Lines        2239     2286      +47     
==========================================
+ Hits         2133     2177      +44     
- Misses        106      109       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jgreener64
jgreener64 merged commit bf18ff4 into master Oct 27, 2026
8 of 10 checks passed
@jgreener64

Copy link
Copy Markdown
Member

Looks good. Adding JSON as a dependency is probably fine as it is lightweight.

@jgreener64
jgreener64 deleted the teh/alphafold branch October 27, 2026 10:42
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.

2 participants