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.2.tar.gz (15.8 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.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nuc2d-0.1.2.tar.gz
  • Upload date:
  • Size: 15.8 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.2.tar.gz
Algorithm Hash digest
SHA256 d616d53da07700b1eb72220ac93b58786caf87a0e194e7f21c4aaecc22db7b66
MD5 d2698f97fc4b047ee58943b8f3c498a7
BLAKE2b-256 a0fdbf251c0f5fe28a78208d104f8f148c8e6e09a954f04e2f90efbc278228e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nuc2d-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4c221a6984ad271215095f2666e23ec35288487bf8fafca493baf0f6a636dc54
MD5 4e5a201922ab00d35cc5f5f0c124d29b
BLAKE2b-256 9f40a1aac2706eec256baee21dfc5cb4d94b55cb017df866ae2e9a58e6bb8b4f

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