[Bioperl-l] Each_DBLink : only returning 1 entry ?

Ewan Birney birney@ebi.ac.uk
Thu, 30 Aug 2001 15:12:47 +0100 (BST)


On Thu, 30 Aug 2001, Ewan Birney wrote:

> 
> I've submitted a bug to the bug tracking system and will try to fix it
> this afternoon...
> 


Actually the bug is not in the parser but in the line


	   $seq->annotation->add_DBLink(@links);

add_DBLink only looks at the first dblink (doh!)


The right place to fix this is in Bio::Annotation



=head2 add_DBLink

 Title   : add_DBLink
 Usage   : $self->add_DBLink($ref)
 Function: adds a link object
 Example :
 Returns : 
 Args    : a Bio::Annotation::DBLink or derived object


=cut

sub add_DBLink{
   my ($self,@list) = @_;

   foreach my $com ( @list ) {
       if( ! $com->isa('Bio::Annotation::DBLink') ) {
	   $self->throw("Is not a link object but a  [$com]");
       }
   }

   push(@{$self->{'link'}},$com);
}



Fixed on main trunk. 







> 
> 
> 
> -----------------------------------------------------------------
> Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
> <birney@ebi.ac.uk>. 
> -----------------------------------------------------------------
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------