[Bioperl-guts-l] bioperl-live/Bio/SeqFeature Annotated.pm, 1.36, 1.37

Malcom Cook mcook at dev.open-bio.org
Fri Jan 19 18:32:52 EST 2007


Update of /home/repository/bioperl/bioperl-live/Bio/SeqFeature
In directory dev.open-bio.org:/tmp/cvs-serv18480

Modified Files:
	Annotated.pm 
Log Message:
allow for setting score to 0 without auto-resetting it to '.'


Index: Annotated.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/SeqFeature/Annotated.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** Annotated.pm	16 Oct 2006 16:20:38 -0000	1.36
--- Annotated.pm	19 Jan 2007 23:32:50 -0000	1.37
***************
*** 426,431 ****
    }
  
!   $self->score('.') unless ($self->get_Annotations('score')); # make sure we always have something
!   
    return $self->get_Annotations('score');
  }
--- 426,445 ----
    }
  
!   #$self->score('.') unless ($self->get_Annotations('score')); # make sure we always have something
! 
!   # malcolm.cook at stowers-institute.org is not sure why we want to
!   # 'make sure we always have something', but, in any case, the above
!   # sets the score to '.' when there is an explicit $val passed of 0, which
!   # can't be correct, so, re-writing to test for 'defined' as is done
!   # elsewhere in this module...
! 
!   $self->score('.') unless (defined($self->get_Annotations('score'))); # make sure we always have something
! 
!   # ... though it could have been written as either of:
! 
!   #$self->score('.') unless @{[$self->get_Annotations('score')]};# make sure we always have something
!   #$self->score('.') unless $self->has_tag('score'); # make sure we always have something (but has_tag is deprecated) 
! 
! 
    return $self->get_Annotations('score');
  }



More information about the Bioperl-guts-l mailing list