Skip to main content

A Python CLI program to run [CASTpFold](https://cfold.bme.uic.edu/castpfold/) code from the command line

Project description

castpfoldpy

A Python script to run CASTpFold code from the command line.

About

CASTpFold (expanded as Computer Atlas of Surface Topography of the universe of protein Folds) is an online tool used for finding surface pockets and internal cavities in proteins which are possibly active sites for ligand binding.

Please note that the CASTpFold analysis is done in the webserver provided by bme.uic.edu and this script is intended to run only from CLI, instead of accessing the website.

The script will take few seconds to run. An initial time delay of 10 seconds is added to avoid sending frequent requests to the website.

The maximum file size to upload is 2 MB.

Instructions to run

  • For help text, run :

    python castp.py -h

Operation modes

This script allows to submit, download results separately as well as altogether using different modes.

  • Submit only: uploads a PDB and prints the job id; no ZIP download and no pocket computation is performed in this mode.
  • Download only: downloads a result ZIP using an existing job id; no submission is performed.
  • Submit and download: uploads a PDB and then downloads the result ZIP.

Arguments

  • -p, --pdb: Protein file path in PDB format. Required for --submit-only or --submit-download.
  • -j, --jobid: CASTpFold job ID to download (required for --download-only).
  • -d, --directory: Directory to save the CASTpFold ZIP and extracted files.
  • -r, --radius: Probe radius (Å) between 0.0 and 5.0 (default: 1.4).
  • -pc, --pocket: If set, compute pocket coordinates and write CSV/TXT file.
  • -w, --wait: Initial wait time (seconds) before the first download attempt (default: 20).
  • -ew, --extra-wait: Extra wait time (seconds) before retrying when ZIP is not yet ready (default: 30).
  • -t, --retries: Number of extra download retries after extra-wait period (default: 1).
  • --email: Optional email passed to server. If provided, CASTpFold will send the download link to the email address. Default is "N/A".

Examples

  1. Download Only (-do, --download-only):

Download the results if the job ID is available. Requires --job-id argument.

python castp.py --download-only -j <JOB_ID> -d /path/to/output
  1. Submit Only (-so, --submit-only):

Uploads the PDB and prints the job ID. Results won't be downloaded. Requires --pdb argument.

python castp.py --submit-only -p path/to/protein.pdb
  1. Submit and Download (-sd, --submit-download): Uploads the PDB and then downloads the results. Requires --pdb argument.
python castp.py --submit-download -p path/to/protein.pdb -d /path/to/output --pocket
  • If the code run successfully, output files will be generated in the output folder provided.
  • Output consists of:
    • Area and volume information.
    • Image of protein structure
    • Active sites and their information.
    • Protein sequence.

References

  • Ye, B., Tian, W., Wang, B., & Liang, J. (2024). CASTpFold: Computed Atlas of Surface Topography of the universe of protein Folds. Nucleic Acids Research, 52(W1), W194–W199. https://doi.org/10.1093/nar/gkae415

  • Fermi, G., & Perutz, M. F. (1984). THE CRYSTAL STRUCTURE OF HUMAN DEOXYHAEMOGLOBIN AT 1.74 ANGSTROMS RESOLUTION [Dataset]. In Worldwide Protein Data Bank. Worldwide Protein Data Bank. https://doi.org/10.2210/pdb4hhb/pdb

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

castpfoldpy-0.1.0.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

castpfoldpy-0.1.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file castpfoldpy-0.1.0.tar.gz.

File metadata

  • Download URL: castpfoldpy-0.1.0.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.0

File hashes

Hashes for castpfoldpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b5b670b05beb25a501e10faf58cb47224c1df9cca35d1622ea927dc751eeea8
MD5 2313178f21bb4910c4005acd557fe960
BLAKE2b-256 239279e9f55a3de4946093a5589ccb82336a9ac90301328ad34ae79e154e7524

See more details on using hashes here.

File details

Details for the file castpfoldpy-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for castpfoldpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3dff4f36fb4a7c874a1b8cfa54285811a7b4676ebf237514e6607dec405ea164
MD5 5dc38e7fc5298075b900b3fd655489a3
BLAKE2b-256 650fbec51970932c9b8e8fd1c84857f9ad1bd9af358100843a0c4c56baaff64c

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