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
PDBNucleicAcids is a Biopython based package that can parse all nucleic acids in a PDB structure, with a special focus on base-pair representation.
Free software: MIT license
Documentation: https://pdbnucleicacids.readthedocs.io.
Get Started
The official release is found in the Python Package Index (PyPI)
$ pip install pdbnucleicacids
You can parse 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.
Check the official documentation for more information.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdbnucleicacids-0.2.1.tar.gz.
File metadata
- Download URL: pdbnucleicacids-0.2.1.tar.gz
- Upload date:
- Size: 34.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f524a003ad27e4d4fc0b1e20ba3c5122a84fd28b5a32af61ea6c2c38a914b88b
|
|
| MD5 |
b8228504af7fc2f9a02a4770ed487050
|
|
| BLAKE2b-256 |
778fa26ecf1b6ecdca9675bd4bd1954522459bd4536ed3eaa2ce213699bb3ff2
|
File details
Details for the file pdbnucleicacids-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pdbnucleicacids-0.2.1-py3-none-any.whl
- Upload date:
- Size: 14.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff359d404fbf0cb9cfd1ea71d5abdbee6d9bbcbc7e921161c95dbf1917d5cc66
|
|
| MD5 |
a7e743cec9ef2e68162a01aa77a0d6a8
|
|
| BLAKE2b-256 |
54dadbf12ed375d157276d334cdd1a11465d48e122d3c9082cef28877b9353cc
|