Skip to main content

A CLI for downloading SAbDab data.

Project description

SAbDab CLI

PyPI version Python versions License: MIT Ruff

A fast, multithreaded CLI for downloading data from SAbDab (the Structural Antibody Database). This tool is an alternative to the SAbDab downloader script.

Here is sabdab-cli in action:

Image of progress bars triggered by a download command

Highlights

  • Concurrent Downloads: High-performance async I/O for rapid data acquisition.
  • 🛡️ Robust Retries: Built-in exponential backoff for transient network issues.
  • 📊 Rich Progress: Beautiful terminal progress bars and informative feedback.
  • 📦 Atomic Writes: Prevents data corruption by using temporary files during downloads.

Installation

With uv (recommended):

uv add sabdab-cli

With pip:

pip install sabdab-cli

Or run directly without installing:

uvx sabdab-cli download -s summary.csv -o ./data --original-pdb

HTTP/2 Support (Optional)

For potentially faster downloads using HTTP/2, install with the http2 extra:

uv add "sabdab-cli[http2]"

Usage

You can invoke with sabdab-cli or sabdabc.

Download selected data types for entries in a SAbDab summary file:

sabdab-cli download \
  --summary-file summary.csv \
  --output-path ./data \
  --original-pdb \
  --chothia-pdb \
  --sequences \
  --annotation \
  --threads 10

Available Data Types

Flag Description
--original-pdb Original PDB structures
--chothia-pdb Chothia-renumbered PDB structures
--sequences Sequence FASTA files
--annotation Chothia-numbered sequence annotations
--abangle AbAngle orientation angles
--imgt IMGT annotations

Summary File Format

The --summary-file (or -s) argument should be a tab-separated or comma-separated file containing at least the following columns: pdb, Hchain, Lchain, and model. The CLI automatically detects the delimiter based on the file content.

See the test summary file for an example.

Performance Tuning

By default, sabdab-cli uses adaptive concurrency based on your CPU count. You can manually adjust this for your environment:

# High-concurrency mode (e.g., 20 threads)
sabdabc download -s summary.csv -o ./data --original-pdb --threads 20

# Synchronous mode (single thread)
sabdabc download -s summary.csv -o ./data --original-pdb --threads 1

# Enable HTTP/2 for faster downloads (requires sabdab-cli[http2])
sabdabc download -s summary.csv -o ./data --original-pdb --http2

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sabdab_cli-0.2.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sabdab_cli-0.2.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file sabdab_cli-0.2.0.tar.gz.

File metadata

  • Download URL: sabdab_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sabdab_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a2b1f93b0798e052475ae18797366a8784c43d4023a457865792f045b4ea4394
MD5 51eb0041bff968baf0a7a2287c164931
BLAKE2b-256 cd1d7d4511a9418a55d811c9df1f247037b8cc6e1a4b5b278d9746f02b2193fd

See more details on using hashes here.

File details

Details for the file sabdab_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sabdab_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sabdab_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8e0880ed84f668f014a4f5bcf41cb921ce53b02d437ff14f984c9628003fc09
MD5 0de5db9acfe528e2c23e6bdb471e90fe
BLAKE2b-256 4ee05f9b37128ac71353277fd9f96c1f51e4bd611d5029c8d840eb034a8e70e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page