Skip to main content

No project description provided

Project description

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)

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

rnapykin-0.3.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

rnapykin-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

File details

Details for the file rnapykin-0.3.0.tar.gz.

File metadata

  • Download URL: rnapykin-0.3.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.15.1

File hashes

Hashes for rnapykin-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5a82936be4cc4a3cdeea4dc031f2fb304bafa20418bc1187ab6105638c003f7e
MD5 2e06b9591654b8084c2ce7b715f1e52f
BLAKE2b-256 0f656a81a2de72b4a14a71ab68a88981d2ab9f3e6f0b335933a9086d69ebc87e

See more details on using hashes here.

File details

Details for the file rnapykin-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rnapykin-0.3.0-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 493b61f3399837b16e1f3c6b65e90e7b9878c7070837ccfebcca7294496650ed
MD5 651b340630d3f61615c98232c0ed1e14
BLAKE2b-256 3cbaf4450aabf3384953121e27caf831aaaecc1058d204e1e178fd8872b49f42

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