This package allows interface with the AlphaFold Protein Structure Database. This package allows the download of entries' metadata an AlphaFold files (e.g. mmCIF, PAE, PDB...)
Project description
AlphaFetcher
AlphaFetcher
facilitates fetching and downloading protein metadata and related files from the
AlphaFold Protein Structure Database
using Uniprot access codes.
🌟 Features
-
Batch Import: Input single or multiple Uniprot access codes seamlessly.
-
Parallel Processing: Efficiently fetch metadata using multithreading.
-
Flexible Downloads: Choose among various file types - PDB, CIF, BCIF, PAE image, and PAE data files.
-
Optimal Performance: Easily adjust the number of workers for threaded tasks.
🔧 Installation
We recommend PyPI installation:
pip install alphafetcher
💡 Usage
from alphafetcher import AlphaFetcher
# Instantiate the fetcher
fetcher = AlphaFetcher()
# Add desired Uniprot access codes
fetcher.add_proteins(["A1KXE4", "H0YL14", "B2RXH2", "A8MVW5"])
# Retrieve metadata
fetcher.fetch_metadata(multithread=True, workers=4)
# Commence download of specified files
fetcher.download_all_files(pdb=True, cif=True, multithread=True, workers=4)
📜 Documentation
Methods
-
add_proteins(proteins: Union[str, List[str]])
- Description: Add the provided Uniprot access codes for fetching. A single string or a list of strings are accepted.
-
fetch_metadata(multithread: bool = False, workers: int = 10)
- Description: Extracts metadata corresponding to the supplied Uniprot access codes. This metadata is used to
download the relevant files and is stored in
fetcher.metadata_dict
, assuming the notation of the example above is followed.
- Description: Extracts metadata corresponding to the supplied Uniprot access codes. This metadata is used to
download the relevant files and is stored in
-
download_all_files(uniprot_access: str, pdb: bool = False, cif: bool = False, bcif: bool = False, pae_image:bool = False, pae_data: bool = False)
- Description: Initiates download for the specified file types linked to the given Uniprot codes.
- Specify the types of files to be downloaded by changing the values of their parameters to True.
For a comprehensive guide, users are encouraged to view the docstrings incorporated within the source code.
⚠️ Limitations
Always respect the AlphaFold Protein Structure Database terms of service, ensuring not to flood it with excessive concurrent requests. Consider adjusting the number of workers to reduce the requests density.
🙌 Contributing
We welcome your contributions! To collaborate:
- Fork this repository.
- Commit your changes.
- Open a pull request with your updates.
📖 Authors and Acknowledgment
- Jose Gavalda-Garcia - Author - jose.gavalda.garcia@vub.be
- Wim Vranken - Supervisor - wim.vranken@vub.be
📄 License
This project is licensed under the GNU General Public License v3 (GPLv3).
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
Hashes for AlphaFetcher-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a201e02f3de2f75fb58d963da3361ebd7442c61e03edc1d2f8a1a3170f57c6d1 |
|
MD5 | 2ff10e88ed8b64b901a97e6812d4332f |
|
BLAKE2b-256 | 4cdcc5d84fa41a0a68a39b943c77b9dcf37296e494b80a515d9007575c085b3f |