Skip to main content

A package for DNA/RNA visualization

Project description

DNAviz 🧬

An simple interactive DNA/RNA sequence visualization tool. Useful to check the structures or binding of complex sequences to ensure the correct pairing.

PyPI version Python versions

Features

  • 🧬 Interactive DNA/RNA sequence visualization
  • 🔄 Real-time base pairing detection
  • 🖱️ Drag-and-drop base manipulation
  • 📏 Dynamic scaling with grid snapping
  • 💾 Save/load visualization states
  • 📸 Export as PNG

Installation

pip install dnaviz

Quick Start

# Basic DNA sequence visualization
dnaviz ATGC GCTA

# RNA sequence with specified directions
dnaviz AUGC GCAU -d 53 -d 35

# Multiple strands
dnaviz ATGC GCTA TACG -d 53 -d 35 -d 53

Interactive Controls

Mouse Controls

  • Click and Drag: Move bases
  • Shift + Click: Select multiple bases
  • Click and Drag Scale Bar: Adjust visualization scale
  • Click and Drag Empty Space: Selection box

Keyboard Shortcuts

  • Arrow Keys: Scroll the view
  • R: Reset selected strand positions
  • Cmd/Ctrl + S: Save current state
  • Shift + Cmd/Ctrl + S: Save as PNG
  • Cmd/Ctrl + L: Load last saved state
  • ESC: Quit

File Management

  • Save files are stored in ~/.dna_visualizer/
  • PNG exports include timestamps
  • State files are saved as JSON with timestamps

Base Pairing Rules

  • A pairs with T (DNA) or U (RNA)
  • G pairs with C
  • Correct pairing is shown in green
  • Incorrect direction pairing is shown in orange
  • Unpaired bases are shown in gray

Examples

Basic DNA Visualization

dnaviz ATGC GCTA

RNA Sequence

dnaviz AUGC GCAU

Multiple Strands with Directions

dnaviz ATGC GCTA TACG -d 53 -d 35 -d 53

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

dnaviz-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

File details

Details for the file dnaviz-0.1.1.tar.gz.

File metadata

  • Download URL: dnaviz-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.2

File hashes

Hashes for dnaviz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4d62e66384186c3199f6e16771812457ce5bc05e1d8311a2efc797860411656e
MD5 437c1d45790cfa39387b6733005d758f
BLAKE2b-256 05a9cd9459088184c1d91d4ec2eae640177b5d4d75e948f15c0523b32c906923

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