Contribution



Color RNA

As a project that revolves around toehold design, we couldn't find a user-friendly pipeline-compatible tool for drawing and coloring RNA secondary structures. We needed to generate images with position colored structures. For example, while optimizing our toeholds we automatically generated reports, and we wanted to add images for visual analysis. As our software utilized different algorithms to optimize different parts of the toehold (stem, loop, kozak sequence, etc.), we wanted to color different parts accordingly to ease the analysis process.

That's when COLOR RNA was born!

COLOR RNA is a python library that could be easily downloaded and operated. It allows the user to generate position colored RNA secondary structures by utilizing forna by Vienna[1]. The user simply specifies the sequence, structure and colors and an image is generated accordingly. This library is useful for projects that need to generate such images as part of a python script, function etc.

For example,

For sequence "ATGCCCCCCATT"

With structure "(..........)"

and colors (by positions): 1-4:red, 5-9:blue, 10-12: yellow (specified as "rrrrbbbbbyyy")

The function will generate the following image:

Example

Instructions

Beta version now available!

Download and Installation

Install package (via cmd prompt):

pip install Color_RNA

Download relevant version of chromedriver:

Download chromedriver

It is recommended to save chromedriver.exe in the working path, but there's an option for chromedriver path specification.

How to Use

For more detailed instruction, see README file - pdf version

After installation and chromedriver download, import package and use function as follows:

from Color_RNA import Color_RNA
      
sequence = "ATGCCCCCCATT"
structure = "(..........)"
colors_string = "rrrrbbbbbyyy"
Color_RNA.create_image(sequence, structure, colors_string)

This code will generate the image shown in the example above

* Requires internet connection and Chrome browser


Try our GUI Version!

Download GUI Version


References

[1] Kerpedjiev P, Hammer S, Hofacker IL (2015). Forna (force-directed RNA): Simple and effective online RNA secondary structure diagrams. Bioinformatics 31(20):3377-9.