Skip to main content

A swiss-knife for PDB files.

Project description

pdb-tools

Build Status Build status

Set of Python scripts designed to be a dependency-free cross-platform swiss-knife for PDB files.

Looking for the other pdb-tools?

The Harms lab maintains a set of tools also called pdbtools, which perform a slightly different set of functions. You can find them here.

About

Manipulating PDB files is often painful. Extracting a particular chain or set of residues, renumbering residues, splitting or merging models and chains, or just ensuring the file is conforming to the PDB specifications are examples of tasks that can be done using any decent parsing library or graphical interface. These, however, almost always require 1) scripting knowledge, 2) time, and 3) installing one or more programs.

pdb-tools were designed to be a swiss-knife for the PDB format. They have no external dependencies, besides obviously the Python programming language. They are the descendant of a set of old FORTRAN77 programs that had the particular advantage of working with streams, i.e. the output of one script could be piped into another. Since FORTRAN77 is a pain too, I rewrote them in Python and added a few more utilities.

The philosophy of the scripts is simple: one script, one task. If you want to do two things, pipe the scripts together. Requests for new scripts will be taken into consideration - use the Issues button or write them yourself and create a Pull Request.

Installation Instructions

pdb-tools are available on PyPi and can be installed though pip. This is the recommended way as it makes updating/uninstalling rather simple:

pip install pdb-tools

If you want to install the latest development version, which might give you new features but also some bugs, see here.

What can I do with them?

The names of the tools should be self-explanatory. Their usage is also pretty consistent. Therefore, here is a couple of examples to get you started:

  • Downloading a structure

    ./pdb_fetch.py 1ctf > 1ctf.pdb
    ./pdb_fetch.py -biounit 1brs > 1brs_biounit.pdb
    
  • Renumbering a structure

    ./pdb_reres.py -1 1ctf.pdb > 1ctf_renumbered.pdb
    
  • Extracting a particular chain

    ./pdb_selchain.py -A 1brs_biounit.pdb > 1brs_A.pdb
    
  • Downloading, extracting a chain, and extracting its aa sequence

    ./pdb_fetch.py 1brs | ./pdb_selchain.py -A | ./pdb_toseq.py > 1brs_A.fasta
    

What can't I do with them?

mmCIF files are not supported. There might be a sister repository mmcif-tools one day. Also, operations that involve coordinates or numerical calculations are usually not in the scope of pdb-tools. Use a proper library for that, it will be much faster and scalable.

Citation

There is no publication (yet!) for pdb-tools, but if you use them and want to cite them use this DOI item.

DOI

Requirements

pdb-tools should run on Python 2.7+ and Python 3.x. We test on Python 2.7, 3.6, and 3.7. There are no dependencies.

Installing from Source

Download the zip archive or clone the repository with git. We recommend the git approach since it makes updating the tools extremely simple.

# To download
git clone https://github.com/JoaoRodrigues/pdb-tools
cd pdb-tools

# To update
git pull origin master

# To install
python setup.py install

Contributing

If you want to contribute to the development of pdb-tools, provide a bug fix, or a new tools, read our CONTRIBUTING instructions here.

License

pdb-tools are open-source and licensed under the Apache License, version 2.0. For details, see the LICENSE file.

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

pdb-tools-2.0.0b1.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

pdb_tools-2.0.0b1-py3-none-any.whl (79.8 kB view details)

Uploaded Python 3

File details

Details for the file pdb-tools-2.0.0b1.tar.gz.

File metadata

  • Download URL: pdb-tools-2.0.0b1.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pdb-tools-2.0.0b1.tar.gz
Algorithm Hash digest
SHA256 f358b06f6193c555160e315de4864125add910452d4a6857afc96673e95fb2f9
MD5 bd7f94980785b0d119717570de43eaf9
BLAKE2b-256 54b5d43597b244fffe5c4c52dd1414ba070efde15f4a724336b3c6c403f30c63

See more details on using hashes here.

File details

Details for the file pdb_tools-2.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: pdb_tools-2.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 79.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for pdb_tools-2.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 e2b0f57487a1795bffc90c42aaf34ebba7af948fac851b94ead8a231c9a4f816
MD5 566a80218e63cda3aca2d9ca1bac0b5c
BLAKE2b-256 92da36c58eb320b6e7cb8c16929569b46cff3159ed870d8c09d8f87beaab4c92

See more details on using hashes here.

Supported by

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