[Bioperl-l] Re: [Fwd: [Bug 1366] New: Bio::Graphics::Panel fails on call to BioSeq start() method]

Lincoln Stein lstein@cshl.org
Thu Jan 16 20:47:19 EST 2003


This is the result of the RangeI interface being removed from Bio::Seq; an 
action that I strongly objected to at the time.  I thought I had changed all 
my scripts and modules to deal with this, but apparently one slipped through.

The attached patch, which I'm checking into bioperl-live now, will fix the 
problem.

Lincoln

Index: Panel.pm 
=================================================================== 
RCS file: /home/repository/bioperl/bioperl-live/Bio/Graphics/Panel.pm,v 
retrieving revision 1.33 
diff -c -r1.33 Panel.pm 
*** Panel.pm    2002/12/30 17:54:04     1.33 
--- Panel.pm    2003/01/16 20:33:51 
*************** 
*** 42,49 **** 
    my $empty_track_style   = $options{-empty_tracks} || 'key'; 
    my $truecolor    = $options{-truecolor}  || 0; 
   
!   $offset   ||= $options{-segment}->start-1 if $options{-segment}; 
!   $length   ||= $options{-segment}->length  if $options{-segment}; 
   
    $offset   ||= $options{-start}-1 if defined $options{-start}; 
    $length   ||= $options{-stop}-$options{-start}+1  
--- 42,51 ---- 
    my $empty_track_style   = $options{-empty_tracks} || 'key'; 
    my $truecolor    = $options{-truecolor}  || 0; 
   
!   if (my $seg = $options{-segment}) { 
!     $offset = eval {$seg->start-1} || 1; 
!     $length = $seg->length; 
!   } 
   
    $offset   ||= $options{-start}-1 if defined $options{-start}; 
    $length   ||= $options{-stop}-$options{-start}+1  




On Thursday 16 January 2003 03:03 pm, Donald G. Jackson wrote:
> Hi Lincoln,
>
> I'm not sure if the bug report I'm forwarding is a Bio::Graphics bug or
> a Bio::Seq bug.  Bugzilla would only let me choose one of the two, hence
> this email.
>
> Briefly, in BioPerl 1.2 if I pass a sequence object to
> Bio::Graphics::Panel as a segment I get an error because Panel calls the
> 'start' method from the sequence object.
> In the 1.02 distro, that method was provided by Bio::Seq, but that's no
> longer true in 1.2
>
> Wanted to give you a heads-up; should I be calling Panel differently?
>
> Thanks,
>
> Don Jackson
> BMS Bioinformatics

-- 
========================================================================
Lincoln D. Stein                           Cold Spring Harbor Laboratory
lstein@cshl.org			                  Cold Spring Harbor, NY
========================================================================





More information about the Bioperl-l mailing list