[Bioperl-l] Bio/SeqFeature/Annotated proposed patch

Cook, Malcolm MEC at stowers-institute.org
Fri Jan 19 20:30:54 UTC 2007


I ran across this problem:

Setting the score of a feature to 0 (zero) cuases it to really be set to
'.'.

I'm poised to apply the following patch.

Any objections?

Malcolm Cook
Database Applications Manager - Bioinformatics
Stowers Institute for Medical Research - Kansas City, Missouri
 


Index: Annotated.pm
===================================================================
RCS file:
/home/repository/bioperl/bioperl-live/Bio/SeqFeature/Annotated.pm,v
retrieving revision 1.36
diff -c -r1.36 Annotated.pm
*** Annotated.pm	16 Oct 2006 16:20:38 -0000	1.36
--- Annotated.pm	19 Jan 2007 20:25:01 -0000
***************
*** 425,432 ****
        $self->add_Annotation('score', $term);
    }
  
!   $self->score('.') unless ($self->get_Annotations('score')); # make
sure we always have something
!   
    return $self->get_Annotations('score');
  }
  
--- 425,439 ----
        $self->add_Annotation('score', $term);
    }
  
!   #$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 score of 0, which
!   # can't be correct, so, re-writing to use 'has_tag' as follows:
! 
!   $self->score('.') unless $self->has_tag('score'); # make sure we
always have something 
! 
    return $self->get_Annotations('score');
  }
  




More information about the Bioperl-l mailing list