The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

RNA::HairpinFigure - Draw hairpin-like text figure from RNA sequence and its secondary structure in dot-bracket notation.

DESCRIPTION

miRNA database miRBase maintains miRNAs and their precursors -- pre-miRNAs which have hairpin-like secondary structures. They provide the hairpin-like text figure along with sequences and secondary structures in dot-bracket notation which could produced by ViennaRNA package.

However, neither miRBase nor ViennaRNA provide any scripts or programs to transfrom dot-bracket notation to hairpin-like text figure, which was needed in our miRNA prediction project.

RNA::HairpinFigure draws hairpin-like text figure from RNA sequence and its secondary structure in dot-bracket notation. If the hairpin have multi loops, they will be deleted and treated as a big loop, the longest stem will be the final stem.

This module is part of the FOMmiR miRNA predictor on http://bioinf.shenwei.me or http://bioinf.xnyy.cn/.

May this module be helpful for you.

VERSION

Version 0.141212 released at 12th Dec. 2014.

SYNOPSIS

Usage:

    use RNA::HairpinFigure qw/draw/;

    my $name   = 'hsa-mir-92a-1 MI0000093 Homo sapiens miR-92a-1 stem-loop';
    my $seq    = 'CUUUCUACACAGGUUGGGAUCGGUUGCAAUGCUGUGUUUCUGUAUGGUAUUGCACUUGUCCCGGCCUGUUGAGUUUGG';
    my $struct = '..(((...((((((((((((.(((.(((((((((((......)))))))))))))).)))))))))))).))).....';
       
    my $figure = draw( $seq, $struct );

    print ">$name\n$seq\n$struct\n$figure\n";

Output:

    >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 

EXPORT

draw make_pair_table make_pair_table_deleting_multi_loops

SUBROUTINES/METHODS

draw SCALAR SCALAR

Returns the hairpin-like text figures. Sequence and its secondary structure in dot-bracket notation are both required as arguments.

When a hairpin has multi-loops, only the longest stem remains according to miRBase's practice.

make_pair_table SCALAR

Returns hash reference which represent the dot-bracket notation. Table{i} is j if (i, j) pair.

Secondary structure in dot-bracket notation is required.

make_pair_table_deleting_multi_loops SCALAR

It makes pair table for dot-bracket notation with multi loops, which will be deleted and treated as a big loop, the longest stem will be the final stem.

Returns hash reference which represent the dot-bracket notation. Table{i} is j if (i, j) pair.

Secondary structure in dot-bracket notation is required.

AUTHOR

Wei Shen, <shenwei356 at gmail.com>

BUGS

Please report any bugs or feature requests to bug-rna-hairpinfigure at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RNA-HairpinFigure. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc RNA::HairpinFigure

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

Copyright 2013 Wei Shen.

This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:

http://www.perlfoundation.org/artistic_license_2_0

Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license.

If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license.

This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder.

This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed.

Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.