Skip to main content

A Biopython based package that constructs and represent all nucleic acids in a PDB structure, with a special focus on base-pair representation.

Project description

https://img.shields.io/pypi/v/pdbnucleicacids.svg Documentation Status Updates

A Biopython based package that constructs and represent all nucleic acids in a PDB structure, with a special focus on base-pair representation.

Installation

The official release is found in the Python Package Index (PyPI)

$ pip install pdbnucleicacids

If you want, you can download this repository, change directory into this repository and run

$ make install

If make is not installed, you can run

$ pip install -e .

Get Started

This is a little tutorial on how to use the PDBNucleicAcids module.

You can construct and represent single stranded and double stranded nucleic acids.

>>> from Bio.PDB.PDBList import PDBList
>>> from Bio.PDB.MMCIFParser import MMCIFParser
>>> from PDBNucleicAcids.NucleicAcid import DSNABuilder
>>>
>>> # retrive file from PDB using Biopython
>>> pdbl = PDBList()
>>> pdbl.retrieve_pdb_file(pdb_code="10MH", pdir=".")
>>> pdbl.retrieve_assembly_file(pdb_code="10MH", assembly_num=1, pdir=".")
>>> # ... or else use your own
>>>
>>> # parse and build structure with Biopython
>>> parser = MMCIFParser()
>>> structure = parser.get_structure(
>>>     structure_id="10MH", filename="10mh-assembly1.cif"
>>> )
>>>
>>> # extract DataFrame with basepairs data
>>> builder = DSNABuilder()
>>> dsna_list = builder.build_double_strands(structure)
>>>
>>> # take the first double strand nucleic acid as an example
>>> dsna = dsna_list[0]
>>> dsna.get_dataframe()
    i_chain_id  i_residue_index i_residue_name j_residue_name  j_residue_index j_chain_id
0          B              402             DC             DG              433          C
1          B              403             DC             DG              432          C
2          B              404             DA             DT              431          C
3          B              405             DT             DA              430          C
4          B              406             DG             DC              429          C

In this case we have a gap in the basepairs at i_residue_index 407 and 408. This results in two distinct paired segments of dsDNA.

In reality only 408 is a mispair. 407 is a non-standard 5CM-Guanine pair. It’s ignored by PDBNucleicAcids because it currently supports only standard Watson-Crick basepairs.

TODO

  • regarding BasePairsRules:

    • Distinguish between DNA and RNA bases (i.e. Deodyribose Adenine can pair with both Deoxyribose Thyamine or Ribose Thyamine)

    • Code other rules

  • Proper tests (WIP)

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

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

pdbnucleicacids-0.2.0.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

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

pdbnucleicacids-0.2.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdbnucleicacids-0.2.0.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pdbnucleicacids-0.2.0.tar.gz
Algorithm Hash digest
SHA256 07e6dc83c8a1cefb82e0ebd93d68e8c180e2fed975d09be1167f0bbb50ea58d9
MD5 08b79499c69fa554ad2b1627bcead58a
BLAKE2b-256 347b07fafb9f99028a4146b7925f69b62d3f0a56b9cfe11ce57c307e2802f621

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pdbnucleicacids-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08a27b5e20c06f1436b45a2d57c07f9cd418170c84639b0cd867393d297341a5
MD5 315278149fb89eb3a8f13e2eb0a304ee
BLAKE2b-256 fccc2234d72e70790617056c33fd95a212d5bf2b7056e93fe40007a7d592c671

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