automate creation of size legends for chemical/enzymatic probing glyphs

13 views
Skip to first unread message

Andrew Uzilov

unread,
Nov 11, 2010, 2:06:26 AM11/11/10
to VARNA.RNA
VARNA already does a nice job creating legends (color bars) for
heatmaps. It would be really, really useful if it could create
legends for arrows, triangles, and pins for chemical/enzymatic
probing. Basically, what I am asking is to automate creating the size
legend in the bottom right of Fig 2g of this paper:

http://www.nature.com/nmeth/journal/vaop/ncurrent/full/nmeth.1529.html

I used Adobe Illustrator to make that (VARNA's EPS export is really
nice), but if we make hundreds of these figures, the legend creation
needs to be automated. So in my HTML markup that defines the applet
properties, I should be able to specify:

- The legend title.
- The min and max data values to display in size legend, and which
arrow sizes they correspond to; in my example (Fig 2g), the min and
max of data is 0.5 and 2.0, but the arrow sizes corresponding to those
are 1 and 3.
- The step size, or number of size steps to display. In my example,
the step size is 0.5 (or I could just specify "display 4 arrows").

I would say this feature will get some major use. Ours is not the
only method that can probe hundreds of RNAs at once, here is another
one:

http://www.nature.com/nature/journal/v467/n7311/full/nature09322.html

So I think it is safe to say that there will be very soon a pressing
need to render HUNDREDS of RNA structures with probing data in an
automated way and for example link to them from a genome browser, and
VARNA would be very handy for this.

Thanks!!

Yann Ponty

unread,
Nov 11, 2010, 7:15:44 AM11/11/10
to VARNA.RNA
Hi Andrew,

This is indeed a very reasonable, and useful, suggestion. My only
objection to automating legend creation has to do with its layout:
Where should VARNA put the legend?

Let me elaborate: Looking at Figure 3 in your publication, I see you
tend to put it on an "available corner" in the image which, I guess,
could be automated (kind of a pain, honestly, but well... :) ). On
the other hand, there are situations where none are available (think
of a tRNA "in diagonal"), and this may become a bit more problematic
in the case of multiple legends (You seem to have different strategies
depending on the available space). One could of course add an command
line option to position explicitly the legend, but that would require
at least a partial knowledge of the RNA layout to avoid overlap (thus
kinda defeating the purpose of a fully automated image production
method). What are your thoughts on that?

By the way, you are referring to HTML markups to automate the
production of images.
At the risk of repeating myself (getting old...), you can also use a
command line version of VARNA to produce images automatically. Of
course, producing HTML code is nice since it allows you to post edit
the image...

Thanks for the feedback!

Yann

Andrew V. Uzilov

unread,
Nov 11, 2010, 11:20:49 AM11/11/10
to varn...@googlegroups.com
Hi Yann....

The issues you are describing with the legend positioning --- they
affect the heatmap color bar positioning, too. How are you
determining how to position that?

What if you position the legend outside of the area encompassing the
RNA? (Outside of the bounding box.) It would be a bit far away, but
it is a simple away to guarantee no collisions. If you could allow
the user to drag the legend to wherever they want, the user could then
reposition the legend if they want a publication-quality figure, but
you still get a simple implementation of positioning the legend
automatically. The config could specify which side or corner to put
the legend.

Yes, I know the command-line options and Java API exist and are
useful, but the applet HTML is actually my favorite way to specify
what I want VARNA to do because it produces an instance that the user
can interact with in the web browser. And what I'm aiming for
ultimately is something like Rfam has, where you have hundreds of RNAs
color-coded according to various scoring schemes, and the user can
tweak those to produce figures for talk slides and papers.

Cheers,
Andrew

Reply all
Reply to author
Forward
0 new messages