[Bioperl-l] Bio::Graphics off by one?

Dave Howorth dhoworth at mrc-lmb.cam.ac.uk
Tue Feb 21 10:47:41 UTC 2006


I'm drawing a simple graphic and seeing something I didn't expect. I'm 
not sure whether I've misunderstood the docs or found a bug. If I run a 
program containing:

     my $name   = 'O68601';
     my $length = 44;
     my $panel  = Bio::Graphics::Panel->new(
                 -length    => $length,
                 -width     => 800,
                 -pad_left  => 10,
                 -pad_right => 10,
                 -key_style => 'between',
                 );

     my $feature = new Bio::SeqFeature::Generic(
                 -start  => 1,
                 -end    => $length,
                 -display_name => $name . " ($length)",
                 );

     $panel->add_track($feature,
                 -glyph   => 'arrow',
                 -tick    =>  1,
                 -fgcolor => 'black',
                 -double  => 1,
                 -label   => 1,
                 );

Then I see a tick strip labelled at its left end with '1' and at its 
right end with '45'. I expected to see '44'. Should I be looking for a 
bug in Bio::Graphics or fixing my program?

Thanks, Dave



More information about the Bioperl-l mailing list