This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to get RNAfold (structure) output in text format

Hi List,

Is there any way to get RNAfold predicted secondary structure in text format? It provides a PDF and PNG file but is it possible to get something like structures in this figure: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3787264/figure/F3/

Bade

rnafold mfold secondary structure

Do you want something like an ASCII-art 'image', or do you just mean a textual representation of the folding pattern that you can programatically parse?

The ASCII-art is what I meant. - Bade

Hm, i've never seen that before. Well I guess you could try using an OCR tool.

For example, the free www.onlineocr.net will accept an image file, and then if you output the result as plain text you can get something that looks half-way there. I ran the image you posted and the result looks fairly good. Make sure you download the file though and don't just copy whats in that box to get a proper 2D layout.

Perhaps something more sophisticated could be done with an illustrator/photoshop plugin, but to be honest this is not my area of expertise.

1 answer

I had a Perl Module to output ASCII text of miRNA precursor secondary structure.

RNA::HairpinFigure - Draw hairpin-like text figure from RNA sequence and its secondary structure in dot-bracket notation. http://search.cpan.org/dist/RNA-HairpinFigure/lib/RNA/HairpinFigure.pm#synopsis

   >hsa-mir-92a-1 MI0000093 Homo sapiens miR-92a-1 stem-loop
    CUUUCUACACAGGUUGGGAUCGGUUGCAAUGCUGUGUUUCUGUAUGGUAUUGCACUUGUCCCGGCCUGUUGAGUUUGG
    ..(((...((((((((((((.(((.(((((((((((......)))))))))))))).)))))))))))).))).....
    ---CU   UAC            C   U           UU 
         UUC   ACAGGUUGGGAU GGU GCAAUGCUGUG  U
         |||   |||||||||||| ||| |||||||||||   
         GAG   UGUCCGGCCCUG UCA CGUUAUGGUAU  G
    GGUUU   --U            U   -           GU

Log in to answer this question.