[Bioperl-guts-l] [15681] bioperl-live/trunk/Bio/SearchIO/blasttable.pm: In characters(): set $self->{'_last_data'} to undef if $$data{Data}
Mark Allen Jensen
maj at dev.open-bio.org
Sat May 16 01:30:37 EDT 2009
Revision: 15681
Author: maj
Date: 2009-05-16 01:30:37 -0400 (Sat, 16 May 2009)
Log Message:
-----------
In characters(): set $self->{'_last_data'} to undef if $$data{Data}
is a valid slot, whose value is undef:
Allows an undef to be propagated to object constructors and
handled there as desired; in particular, when Hsp_postive => -conserved
is undef (in BLASTN, e.g.), the value of hsp's {CONSERVED} property is
set to the value of {IDENTICAL} in B:S:HSP:GenericHSP::new().
(see thread at
http://lists.open-bio.org/pipermail/bioperl-l/2009-May/029941.html)
Modified Paths:
--------------
bioperl-live/trunk/Bio/SearchIO/blasttable.pm
Modified: bioperl-live/trunk/Bio/SearchIO/blasttable.pm
===================================================================
--- bioperl-live/trunk/Bio/SearchIO/blasttable.pm 2009-05-15 20:44:32 UTC (rev 15680)
+++ bioperl-live/trunk/Bio/SearchIO/blasttable.pm 2009-05-16 05:30:37 UTC (rev 15681)
@@ -404,7 +404,19 @@
sub characters{
my ($self,$data) = @_;
- return unless ( defined $data->{'Data'} );
+# deep bug fix: set $self->{'_last_data'} to undef if $$data{Data} is
+# a valid slot, whose value is undef --
+# allows an undef to be propagated to object constructors and
+# handled there as desired; in particular, when Hsp_postive => -conserved
+# is not defined (in BLASTN, e.g.), the value of hsp's {CONSERVED} property is
+# set to the value of {IDENTICAL}.
+#/maj
+# return unless ( defined $data->{'Data'} );
+ return unless ( grep /Data/, keys %$data );
+ if ( !defined $data->{'Data'} ) {
+ $self->{'_last_data'} = undef;
+ return;
+ }
if( $data->{'Data'} =~ /^\s+$/ ) {
return unless $data->{'Name'} =~ /Hsp\_(midline|qseq|hseq)/;
}
More information about the Bioperl-guts-l
mailing list