Python bindings for rnapkin! :snake: :crab:
Rnapkin is a fast, convenient CLI utility for drawing RNAs that produces stylish SVGs. These Python bindings provide an easy way to use rnapkin's functionality directly from your Python scripts.
This is an early implementation that currently only exposes the rna2svg function. It takes an RNA fold in rnapkin compliant format and returns the corresponding SVG as a string.
Installation
pip install rnapykin
Quick Example
from rnapykin import rna2svg
gorgeous_rna = """
UUAUAGGCGAUGGAGUUCGCCAUAAACGCUGCUUAGCUAAUGACUCCUACCAGUAUCACUACUGGUAGGAGUCUAUUUUUUU
.....(((((......)))))......(((....)))....((((((((((((((....)))))))))))))).........
"""
# rna / theme / rotation in degrees / background opacity / horizontal flip / vertical flip
svg = rna2svg(gorgeous_rna, "dark", 0, 1., False, False)
# do with it what you want. Save it, embed it in HTML, whatevs c:
with open("gorgeous_rna.svg", "w") as f:
f.write(svg)
Release files for rnapykin 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rnapykin-0.3.0.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rnapykin-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.28+ x86-64 | Details |
Total release size: 1.1 MB
Release files / rnapykin-0.3.0.tar.gz
| Download URL | rnapykin-0.3.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a82936be4cc4a3cdeea4dc031f2fb304bafa20418bc1187ab6105638c003f7e
|
|
BLAKE2b-256 checksum How to use checksums |
0f656a81a2de72b4a14a71ab68a88981d2ab9f3e6f0b335933a9086d69ebc87e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.15.1
|
Release files / rnapykin-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl
| Download URL | rnapykin-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
493b61f3399837b16e1f3c6b65e90e7b9878c7070837ccfebcca7294496650ed
|
|
BLAKE2b-256 checksum How to use checksums |
3cbaf4450aabf3384953121e27caf831aaaecc1058d204e1e178fd8872b49f42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
maturin/0.15.1
|