| 1 | # -*-CPerl-*- | ||
| 2 | # Last changed Time-stamp: <2018-01-09 23:56:32 mtw> | ||
| 3 | |||
| 4 | package Bio::ViennaNGS::MinimalFeature; | ||
| 5 | |||
| 6 | 1 | ▶ | use Bio::ViennaNGS; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 1 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | 1 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1 | ▶ | use Bio::ViennaNGS::Subtypes; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use version; our $VERSION = version->declare("$Bio::ViennaNGS::VERSION"); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 1 | extends 'Bio::ViennaNGS::FeatureInterval'; | |
| 13 | |||
| 14 | 1 | has 'strand' => ( | |
| 15 | is => 'rw', | ||
| 16 | isa => 'Bio::ViennaNGS::PlusOrMinus', | ||
| 17 | default => '.', | ||
| 18 | predicate => 'has_strand', | ||
| 19 | ); | ||
| 20 | |||
| 21 | override 'dump' => sub { | ||
| 22 | 0 | ▶ | my $self = shift; |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 23 | 0 | print join("\t", | |
| 24 | $self->chromosome, | ||
| 25 | $self->start, | ||
| 26 | $self->end, | ||
| 27 | $self->strand), | ||
| 28 | "\n"; | ||
| 29 | 1 | }; | |
| 30 | |||
| 31 | 1 | ▶ | no Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 32 | |||
| 33 | 1 | 1; | |
| 34 | |||
| 35 | __END__ | ||
| 36 | |||
| 37 | |||
| 38 | =head1 NAME | ||
| 39 | |||
| 40 | Bio::ViennaNGS::MinimalFeature - A Moose wrapper for stranded genomic | ||
| 41 | intervals. | ||
| 42 | |||
| 43 | =head1 SYNOPSIS | ||
| 44 | |||
| 45 | use Bio::ViennaNGS::MinimalFeature; | ||
| 46 | |||
| 47 | my $feat = Bio::ViennaNGS::MinimalFeature->new(chromosome => "chr1", | ||
| 48 | start => "1200", | ||
| 49 | end => "4300", | ||
| 50 | strand => "+", | ||
| 51 | ); | ||
| 52 | $feat->dump(); | ||
| 53 | |||
| 54 | =head1 DESCRIPTION | ||
| 55 | |||
| 56 | This module provides an object-oriented interface for storing | ||
| 57 | elementary stranded genomic intervals characterized via chromosome, | ||
| 58 | start position, end position and strand. As such, it can be regarded a | ||
| 59 | simple wrapper for BED4 elements. | ||
| 60 | |||
| 61 | This class inherits from L<Bio::ViennaNGS::FeatureInterval> and is the | ||
| 62 | base classs for L<Bio::ViennaNGS::Feature>. | ||
| 63 | |||
| 64 | =head1 METHODS | ||
| 65 | |||
| 66 | =over | ||
| 67 | |||
| 68 | =item dump() | ||
| 69 | |||
| 70 | Title : dump | ||
| 71 | |||
| 72 | Usage : C<$obj-E<gt>dump;> | ||
| 73 | |||
| 74 | Function: Print a tab-separated representation of C<$obj> (a BED4 | ||
| 75 | line). | ||
| 76 | |||
| 77 | =back | ||
| 78 | |||
| 79 | =head1 SEE ALSO | ||
| 80 | |||
| 81 | =over | ||
| 82 | |||
| 83 | =item L<Bio::ViennaNGS> | ||
| 84 | |||
| 85 | =item L<Bio::ViennaNGS::FeatureInterval> | ||
| 86 | |||
| 87 | =item L<Bio::ViennaNGS::Feature> | ||
| 88 | |||
| 89 | =back | ||
| 90 | |||
| 91 | =head1 AUTHORS | ||
| 92 | |||
| 93 | Michael T. Wolfinger E<lt>michael@wolfinger.euE<gt> | ||
| 94 | |||
| 95 | =head1 COPYRIGHT AND LICENSE | ||
| 96 | |||
| 97 | Copyright (C) 2014-2018 Michael T. Wolfinger E<lt>michael@wolfinger.euE<gt> | ||
| 98 | |||
| 99 | This library is free software; you can redistribute it and/or modify | ||
| 100 | it under the same terms as Perl itself, either Perl version 5.10.0 or, | ||
| 101 | at your option, any later version of Perl 5 you may have available. | ||
| 102 | |||
| 103 | This program is distributed in the hope that it will be useful, but | ||
| 104 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 105 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 106 | General Public License for more details. | ||
| 107 | |||
| 108 | =cut | ||