blib/lib/Bio/ViennaNGS/Feature.pm

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