Skip to main content

fetchprotein

PyPi Version License: MIT

A Python package to fetch a protein 3D Structure / MSA / FASTA file from the PDB, UniProt or AlphaFold-DB (depending on the protein_filename extension).

Supports extensions:

  • pdb: for 3D structure from PDB or AlphaFold-DB
  • cif: for 3D structure from PDB or AlphaFold-DB
  • fasta: for FASTA from PDB or UniProt
  • a3m: for MSA from AlphaFold-DB (API is currently unavailable)

Installation and Usage

Install with pip:

pip install fetchprotein

CLI usage:

fetchprotein --help
fetchprotein 6m0j.pdb
fetchprotein Q9LW00.cif
fetchprotein Q9LW00.a3m # might be currently unavailable
fetchprotein Q9LW00.fasta
fetchprotein 6m0j.fasta

Python usage:
WARNING: Fetch for AlphaFold-DB MSA is currently unavailable.

# Imports
from fetchprotein.fetch import fetchprotein
from fetchprotein.fetch import fetch_structure, fetch_sequence, fetch_msa

# Use generic fetch function
path = fetchprotein('6M0J.pdb', output_dir='./test_data/')     # fetch 3D structure from PDB
path = fetchprotein('Q9LW00.cif', output_dir='./test_data/')   # fetch 3D structure from AlphaFold-DB
path = fetchprotein('Q9LW00.a3m', output_dir='./test_data/')   # fetch MSA from AlphaFold-DB
path = fetchprotein('Q9LW00.fasta', output_dir='./test_data/') # fetch FASTA from UniProt
path = fetchprotein('6M0J.fasta', output_dir='./test_data/')   # fetch FASTA from PDB

# Use specific fetch functions
path = fetch_structure('6M0J', extension="cif", output_dir='./test_data/')
path = fetch_structure('Q9LW00', extension="pdb", output_dir='./test_data/')

path = fetch_sequence('6M0J', extension="fasta", output_dir='./test_data/')
path = fetch_sequence('Q9LW00', extension="fasta", output_dir='./test_data/')

path = fetch_msa('Q9LW00', extension="a3m", output_dir='./test_data/')

Metadata

Release files for fetchprotein 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fetchprotein 1.0.0
File Size Uploaded
fetchprotein-1.0.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fetchprotein 1.0.0
File Interpreter ABI Platform
fetchprotein-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / fetchprotein-1.0.0.tar.gz

Download URL fetchprotein-1.0.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c0586d1038b27406a284a76520e710aa9440e27b8525331f49ddfcdba3b27441
BLAKE2b-256 checksum
How to use checksums
d02694772ad492c4f14c0cec30177d7e15b7d3d7b7acdfd894ca927970f968f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / fetchprotein-1.0.0-py3-none-any.whl

Download URL fetchprotein-1.0.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b42d07face5d59e2eb9c87b906aebe10967efe79be38dc2b03e478f0dfb2e25f
BLAKE2b-256 checksum
How to use checksums
8b77f92701de20b56dc045db88afb81ec15b5623622d6bcaa5a263bccc586cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

1.0.1

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page