Skip to main content

Store, manage and query the local copy of the PDB (Protein Data Bank) resources.

Project description

localpdb

localpdb codecov Python 3.6

  • Store a local copy of the PDB data and related protein resources,
  • Access and query the data convinently through pandas DataFrame structures,
  • Update with weekly releases of a new data with full history versioning,
  • Customize to your needs or add other data sources with simple plugin system.

Quick start

  • Install localpdb with pip and run setup script to download PDB data and protein structures in the PDB format:
pip3 install localpdb
localpdb_setup.py -db_path /path/to/your/localpdb --fetch_pdb
  • Simple pipeline that selects for further analysis a representative set of protein structures:
    • solved with X-ray crystallography,
    • with resolution better than 2.5 angstroms,
    • deposited in 2010 or later,
    • with redundancy removed at the sequence level.
from localpdb import PDB
import gzip

lpdb = PDB(db_path='/path/to/your/localpdb')

# Select protein structures solved with X-ray diffraction (resolution above 2.5 A)
lpdb.entries = lpdb.entries.query('type == "prot"')
lpdb.entries = lpdb.entries.query('method == "diffraction"')
lpdb.entries = lpdb.entries.query('resolution <= 2.5')
lpdb.entries = lpdb.entries.query('deposition_date.dt.year >= 2010')

# Remove redundancy (select only representative structure from each sequence cluster)
lpdb.load_clustering_data(cutoff=90)
lpdb.chains = lpdb.chains[lpdb.chains['clust-90'].notnull()]

representative = lpdb.chains.groupby(by='clust-90')['resolution'].idxmin()
lpdb.chains = lpdb.chains.loc[representative]

for pdb_fn in lpdb.chains.pdb_fn:
    # your analysis here

Additional resources

(In development)

Plugins

(In development)

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

localpdb-0.1.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

localpdb-0.1.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: localpdb-0.1.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for localpdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 35a0203d0a2c80cf70025eff530ec8555046c9566e94ce3a95f354d373b8830b
MD5 3b36caf474fce07491cc1eabb57de81e
BLAKE2b-256 3146e1c710f39836991cf5cb4c7ad7180dea9969bb5f3ca3c938a35c637da83c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: localpdb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for localpdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e50fa8f47747462cd1cb5c66608e479036d69656a8296d1ac44317f39e95fd0
MD5 47c28e661c772055a772336599156440
BLAKE2b-256 19de9eac9ef54361dd46e1bd11a3bba2358b4c3fa4f93fdd89a666f3ed610074

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