Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 938 Bytes

README.md

File metadata and controls

34 lines (21 loc) · 938 Bytes

draw_rna

This script generates secondary structure diagrams for nucleic acids.

Dependencies

The default behavior is to output the secondary structure visualization to both svg and png. The png requires Inkscape, whose directory must be set by environmental variable INKSCAPEDIR.

Usage

Input file

An input file is used to specify the sequence, secondary structure, and coloring of the desired drawing. The format is as follows

filename      # image will be written to filename.svg
GTGANNNNNTCAC # nucleic acid sequence
((((.....)))) # nucleic acid secondary structure in dot-bracket notation
rrrrbbbbbgggg # optional: coloring of each base (e.g. r for red, g for green, b for blue)

Multiple sequences can be specified in one file as in example_input.txt.

Execution

The draw script can be run with

python draw_all.py example_input.txt

Sample secondary structure diagram