[Bioperl-l] Bio::Graphics off by one?
Lincoln Stein
lstein at cshl.edu
Tue Feb 21 15:55:30 UTC 2006
Hi,
When you are looking at the resolution of individual bases, a base pair at
position one occupies the half-open interval from 1->2, meaning that it comes
up to, but doesn't quite touch, the 2. For the purposes of display,
Bio::Graphics draws the end of the half-open interval.
Lincoln
On Tuesday 21 February 2006 05:47, Dave Howorth wrote:
> 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
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
--
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu
More information about the Bioperl-l
mailing list