Skip to main content

A Python library for parsing, annotating, laying out, and rendering nucleic acid secondary structures.

Project description

nuc2d

nuc2d is a Python library for parsing, annotating, laying out, and rendering nucleic acid secondary structures.

Installation

pip install nuc2d

Example

from nuc2d import draw_svg

dpp_string = "(((..+...)))"

svg = draw_svg(
    dpp_string=dpp_string,
)

svg.saveas("output.svg")

The dpp_string argument should be specified in dot-parens-plus notation.

If you are using Jupyter Notebook or JupyterLab, you can also display the generated SVG directly:

from IPython.display import SVG, display

display(SVG(svg.tostring()))

Optional sequence and base-pair probability annotations can be provided through the sequences and probs arguments:

svg = draw_svg(
    dpp_string=dpp_string,
    sequences=sequences,
    probs=probs,
)

License

This project is licensed under the MIT License.

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

nuc2d-0.1.3.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

nuc2d-0.1.3-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file nuc2d-0.1.3.tar.gz.

File metadata

  • Download URL: nuc2d-0.1.3.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.7

File hashes

Hashes for nuc2d-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4bf4901086ddff19493e1dd5dc071a68ea12fdc11e703f15089f7a8c5738340b
MD5 f25477cf6706922b68191d0eb620c8bd
BLAKE2b-256 c6949d9173263bf1afeb282bccd80c823a20654e8f988e3b860d60e204a8398a

See more details on using hashes here.

File details

Details for the file nuc2d-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: nuc2d-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.7

File hashes

Hashes for nuc2d-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2cf080fdedd1ccc4c952380362bcb0030b90c0a9701bba77728d2fd656714c19
MD5 041172d32c1c16ea84c32f55610c5743
BLAKE2b-256 bac9f90fb0acbb503c6eca45370875e1092614a7e0d1ef2b147e899833a66d05

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