Skip to main content

DNA curvature analysis

Project description

Dnacurve is a Python library, console script, and web application to calculate the global 3D structure of a B-DNA molecule from its nucleotide sequence according to the dinucleotide wedge model. Local bending angles and macroscopic curvature are calculated at each nucleotide.

Author:

Christoph Gohlke

License:

BSD 3-Clause

Version:

2024.5.24

DOI:

10.5281/zenodo.7135499

Quickstart

Install the dnacurve package and all dependencies from the Python Package Index:

python -m pip install -U "dnacurve[all]"

Print the console script usage:

python -m dnacurve --help

Run the web application:

python -m dnacurve --web

See Examples for using the programming interface.

Source code and support are available on GitHub.

Requirements

This revision was tested with the following requirements and dependencies (other versions may work):

Revisions

2024.5.24

  • Fix docstring examples not correctly rendered on GitHub.

2024.5.10

  • Fix mypy errors.

2023.8.30

  • Fix linting issues.

  • Add py.typed marker.

2023.4.30

  • Improve type hints.

  • Drop support for Python 3.8 and numpy < 1.21 (NEP29).

2022.10.4

  • Rename dnacurve_web.py to web.py (breaking).

  • Deprecate save functions (use write functions).

  • Add options to specify URL of web application and not opening web browser.

  • Run web application using Flask if installed.

  • Convert to Google style docstrings.

  • Add type hints.

  • Remove support for Python 3.7 and numpy < 1.19 (NEP29).

2021.6.29

  • Improve export to PDB.

2021.6.18

  • Remove support for Python 3.6 (NEP 29).

  • Fix dnacurve_web.py failure on WSL2.

2021.3.6

  • Update copyright and formatting.

2020.1.1

  • Remove support for Python 2.7 and 3.5.

  • Update copyright.

2018.8.15

  • Move modules into dnacurve package.

2018.5.29

  • Add option to start web interface from console.

  • Use matplotlib OOP interface.

2018.5.25

  • Add functions to return PDB and CSV results as string.

2018.2.6

  • Style and doctest fixes.

2014.6.16

  • DNAse I Consensus model.

2013.11.21

  • Overlapping chunks iterator.

2013.11.17

  • Limit maximum sequence length to 510 nucleotides.

  • Read simple FASTA sequence files.

  • Save positive coordinates to PDB files.

  • Fix sequence display for matplotlib 1.3.

2005.x.x

  • Initial release.

Notes

The algorithms, plots, and PDB format are not meant to be used with very long sequences. By default, sequences are truncated to 510 nucleotides, which can be overridden by the user.

The generated PDB files can be visualized interactively using UCSF Chimera.

Dnacurve.py was derived from DNACG.PAS (c) 1993, and DNACURVE.CPP (c) 1995.

References

  1. Bending and curvature calculations in B-DNA. Goodsell DS, Dickerson RE. Nucleic Acids Res 22, 5497-503, 1994. See also http://mgl.scripps.edu/people/goodsell/research/bend/index.html.

  2. Curved DNA without A-A: experimental estimation of all 16 DNA wedge angles. Bolshoy A et al. Proc Natl Acad Sci USA 88, 2312-6, 1991.

  3. A comparison of six DNA bending models. Tan RK and Harvey SC. J Biomol Struct Dyn 5, 497-512, 1987.

  4. Curved DNA: design, synthesis, and circularization. Ulanovsky L et al. Proc Natl Acad Sci USA 83, 862-6, 1986.

  5. The ten helical twist angles of B-DNA. Kabsch W, Sander C, and Trifonov EN. Nucleic Acids Res 10, 1097-1104, 1982.

  6. Rod models of DNA: sequence-dependent anisotropic elastic modelling of local bending phenomena. Munteanu MG et al. Trends Biochem Sci 23(9), 341-7, 1998.

Examples

>>> from dnacurve import CurvedDNA
>>> cdna = CurvedDNA('ATGCAAATTG' * 5, 'trifonov', name='Example')
>>> cdna.curvature[:, 18:22]
array([[0.58062, 0.58163, 0.58278, 0.58378],
       [0.0803 , 0.11293, 0.07676, 0.03166],
       [0.57924, 0.5758 , 0.57368, 0.5735 ]])
>>> cdna.write_csv('_test.csv')
>>> cdna.write_pdb('_test.pdb')
>>> cdna.plot('_test.png', dpi=120)

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

dnacurve-2024.5.24.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

dnacurve-2024.5.24-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file dnacurve-2024.5.24.tar.gz.

File metadata

  • Download URL: dnacurve-2024.5.24.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for dnacurve-2024.5.24.tar.gz
Algorithm Hash digest
SHA256 6ebfe3a841f84d1f35fa14239f0b6eaa2d18988d6094c82bd29e4f794f641004
MD5 7c6a9a34f9507447ac916be3c5702504
BLAKE2b-256 c255e8834d992d35fa1f15b95d75edef6f84a9ac3ba606822ab5469bd807b95e

See more details on using hashes here.

File details

Details for the file dnacurve-2024.5.24-py3-none-any.whl.

File metadata

  • Download URL: dnacurve-2024.5.24-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for dnacurve-2024.5.24-py3-none-any.whl
Algorithm Hash digest
SHA256 27fdbb460d1f3ff58f471c6182e6be0c9b55740e09e900054402eb14e8a0b538
MD5 047c67cf99bf85308a313ed17dc5a59e
BLAKE2b-256 2aea651d4441ac0b2ef8965d9221dadfb71ae4e381b6c389aac1db62e679419f

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