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

Sendu Bala bix at sendu.me.uk
Fri Jan 19 21:06:43 UTC 2007


Cook, Malcolm wrote:
> 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?

> !   $self->score('.') unless ($self->get_Annotations('score')); # make
> sure we always have something

vs

> !   $self->score('.') unless $self->has_tag('score'); # make sure we
> always have something 

I didn't look into how this is setup, but could something have a score 
tag without the score being defined? I'd have thought it safest to call 
$self->get_Annotations('score') and check if the answer was defined.

So really the solution would seem to be:

$self->score('.') unless @{[$self->get_Annotations('score')]};
(or similar)



More information about the Bioperl-l mailing list