A tool for downloading AlphaFold structures using UniProt IDs or FASTA files
Project description
AlphaFoldFetch
AlphaFoldFetch is a command-line tool for downloading AlphaFold structure files from UniProt IDs and UniProt FASTA files.
It is meant for fast batch workflows:
- download one or many structure in one command
- choose any combination of PDB, CIF, or gzipped outputs
- tune concurrency for larger downloads
Install
Run it without installing:
uvx --from AlphaFoldFetch affetch P11388
Install the CLI with uv:
uv tool install AlphaFoldFetch
CLI Summary
affetch [OPTIONS] UNIPROT...
Arguments:
UNIPROT...: UniProt IDs, FASTA files, or-for stdin
Options:
--output,-o: output directory--file-type,-f: any combination ofp,c, andz--model,-m: AlphaFold model version1through6--n-sync: concurrent download requests--n-save: file writes submitted per batch
Input Rules
AlphaFoldFetch accepts:
- raw UniProt accessions like
P11388 - text that contains a valid UniProt accession
- FASTA files ending in
.fasta,.fas,.fa, or.faa -to read whitespace-separated input from stdin
FASTA parsing only keeps validated UniProt IDs from header lines.
Output Rules
The default file-type value is pcz, which means:
p: PDB outputc: CIF outputz: gzip compression
So the default behavior downloads both PDB and CIF files as gzip outputs.
Examples
Single AlphaFold structure
affetch P11388
Multiple AlphaFold structures
affetch P11388 Q01320 P41516
Structures from a single UniProt FASTA file
affetch UP000005640_9606.fasta
Multiple UniProt FASTA files
affetch UP000007305_4577.fasta UP000005640_9606.fasta UP000000625_83333.fasta
First obtain these FASTA files from UniProt
Multiple custom FASTA files
affetch plant_pgks.fasta mammalian_pgks.fasta bacterial_pgks.fasta
Input files must be in the UniProt FASTA file format
Unzipped PDB file
affetch -f p P11388
Default will dowload zipped PDB and CIF files for all entries
Redirect output to a directory
mkdir human_top2a && affetch -o ./human_top2a P11388
EBI AlphaFold Download data - Search Results CSV File
tail -n +2 results-csv.csv | while IFS='-' read -r f1 f2 f3; do echo $f2; done | affetch -
Don't know the UniProt ID? Use [getSequence] and pipe into affetch
getseq human top2a, mouse top2a, rat top2a | affetch -
Pipe input arguments must be indicated with a dash -
For more information, read the docs
Credits
Inspired by getSequence.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alphafoldfetch-1.0.1.tar.gz.
File metadata
- Download URL: alphafoldfetch-1.0.1.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45f0e9cd8ae735226247caacc9ec1165a7d83c217ad2774e9d87d73dbe8561f1
|
|
| MD5 |
d1534d69a1e4091cde35d7260aef8e5f
|
|
| BLAKE2b-256 |
631c9cd668ae8eee2fb47df756d4fdd259ecf72f5ba4e202d8143993887922bd
|
Provenance
The following attestation bundles were made for alphafoldfetch-1.0.1.tar.gz:
Publisher:
publish.yml on mansanlab/alphafoldfetch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alphafoldfetch-1.0.1.tar.gz -
Subject digest:
45f0e9cd8ae735226247caacc9ec1165a7d83c217ad2774e9d87d73dbe8561f1 - Sigstore transparency entry: 1440356372
- Sigstore integration time:
-
Permalink:
mansanlab/alphafoldfetch@2fe9f57b99e8cfc3f74a4f1b841d440df367bb9b -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/mansanlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2fe9f57b99e8cfc3f74a4f1b841d440df367bb9b -
Trigger Event:
push
-
Statement type:
File details
Details for the file alphafoldfetch-1.0.1-py3-none-any.whl.
File metadata
- Download URL: alphafoldfetch-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6e184a5f313f2005a1d56e8627fd4c76f2aedc259652253495486dea83299a1
|
|
| MD5 |
91d7db86394faf98d4a57b66ce8491ff
|
|
| BLAKE2b-256 |
6983e65e85efb83bba60ca193f0ecffd3de333215239535a0b5f781f6d327051
|
Provenance
The following attestation bundles were made for alphafoldfetch-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on mansanlab/alphafoldfetch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
alphafoldfetch-1.0.1-py3-none-any.whl -
Subject digest:
b6e184a5f313f2005a1d56e8627fd4c76f2aedc259652253495486dea83299a1 - Sigstore transparency entry: 1440356435
- Sigstore integration time:
-
Permalink:
mansanlab/alphafoldfetch@2fe9f57b99e8cfc3f74a4f1b841d440df367bb9b -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/mansanlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2fe9f57b99e8cfc3f74a4f1b841d440df367bb9b -
Trigger Event:
push
-
Statement type: