blib/lib/Bio/Graphics/Glyph/box.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 33 CC 4 SCAR 18.3
CC
4
Cov
0%
draw
12.0
maxdepth
6.0
my_description
2.0
CRAP 6.2
1 package Bio::Graphics::Glyph::box;
2 # DAS-compatible package to use for drawing a box
3  
4 use strict;
5 use base qw(Bio::Graphics::Glyph::generic);
6  
7 sub my_description {
8 return <<END;
9 This glyph draws genomic features as rectangles. If the feature
10 contains subfeatures, then the glyph will draw a single solid box that
11 spans all the subfeatures. Features can be named with a label at the
12 top, and annotated with a descriptive string at the bottom.
13 END
14 }
15  
16  
17 # treat like one big component
18 sub draw {
19 my $self = shift;
20 $self->draw_component(@_);
21 $self->draw_label(@_) if $self->option('label');
22 $self->draw_description(@_) if $self->option('description');
23 }
24  
25 sub maxdepth {
26 my $self = shift;
27 my $maxdepth = $self->option('maxdepth');
28 return $maxdepth if defined $maxdepth;
29 return 0;
30 }
31  
32 sub subseq {
33 return ();
34 }
35  
36 1;
37  
38 __END__