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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d616d53da07700b1eb72220ac93b58786caf87a0e194e7f21c4aaecc22db7b66
|
|
| MD5 |
d2698f97fc4b047ee58943b8f3c498a7
|
|
| BLAKE2b-256 |
a0fdbf251c0f5fe28a78208d104f8f148c8e6e09a954f04e2f90efbc278228e5
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c221a6984ad271215095f2666e23ec35288487bf8fafca493baf0f6a636dc54
|
|
| MD5 |
4e5a201922ab00d35cc5f5f0c124d29b
|
|
| BLAKE2b-256 |
9f40a1aac2706eec256baee21dfc5cb4d94b55cb017df866ae2e9a58e6bb8b4f
|