File Coverage

blib/lib/Bio/ViennaNGS/MinimalFeature.pm
Criterion Covered Total %
statement 18 23 78.2
branch n/a
condition n/a
subroutine 6 7 85.7
pod 0 1 0.0
total 24 31 77.4


line stmt bran cond sub pod time code
1             # -*-CPerl-*-
2             # Last changed Time-stamp: <2015-02-06 16:28:01 mtw>
3              
4             package Bio::ViennaNGS::MinimalFeature;
5              
6 1     1   477 use version; our $VERSION = qv('0.12_15');
  1         2  
  1         5  
7 1     1   70 use namespace::autoclean;
  1         2  
  1         9  
8              
9 1     1   55 use Moose::Util::TypeConstraints;
  1         2  
  1         9  
10             subtype 'PlusOrMinus',
11             as 'Str',
12             where { /[\+\-\.]/ },
13             message { "$_ is neither +/- nor ."};
14 1     1   1370 no Moose::Util::TypeConstraints;
  1         2  
  1         4  
15              
16 1     1   158 use Moose;
  1         2  
  1         3  
17             with 'MooseX::Clone';
18              
19             has 'chromosome' => (
20             is => 'rw',
21             isa => 'Str',
22             required => 1,
23             predicate => 'has_chromosome',
24             );
25              
26             has 'start' => (
27             is => 'rw',
28             isa => 'Int',
29             required => 1,
30             predicate => 'has_start',
31             );
32              
33             has 'end' => (
34             is => 'rw',
35             isa => 'Int',
36             required => 1,
37             predicate => 'has_end',
38             );
39              
40             has 'strand' => (
41             is => 'rw',
42             isa => 'PlusOrMinus',
43             default => '.',
44             predicate => 'has_strand',
45             );
46              
47             sub set_minimalFeature{
48 0     0 0   my ($self,$chr,$start,$end,$strand) = @_;
49 0           $self->chromosome($chr);
50 0           $self->start($start);
51 0           $self->end($end);
52 0           $self->strand($strand);
53             }
54              
55 1     1   4717 no Moose;
  1         2  
  1         3  
56              
57             1;
58