Johnston, Caroline | 24 Sep 16:17
Favicon

Using Storable with SeqFeatures

Hello.

I'm trying to use Storable to save a Bio::Seq object and Storable seems to be having a weird problem dealing
with freezing and thawing the code ref to Bio::SeqFeature::Generic cleanup_generic. If I change one
line (931) in that function from

    foreach my $t ( keys %{$self->{'_gsf_tag_hash'} || {} } ) {
                                                    ------
 to

    foreach my $t ( keys %{$self->{'_gsf_tag_hash'} } ) {

it works fine. I've pasted an example script at http://sial.org/pbot/32320.

Any ideas why this syntax would break Storable? Would wrapping the foreach in an if(defined
$self->{'_gsf_tag_hash'}) serve to replace the || {} ?

I get the same problem using Bio::Root::Storable.

Cxx 
Hilmar Lapp | 26 Sep 00:24

Re: Using Storable with SeqFeatures


On Sep 24, 2008, at 10:19 AM, Johnston, Caroline wrote:

> Hello.
>
> I'm trying to use Storable to save a Bio::Seq object and Storable  
> seems to be having a weird problem dealing with freezing and thawing  
> the code ref to Bio::SeqFeature::Generic cleanup_generic. If I  
> change one line (931) in that function from
>
>    foreach my $t ( keys %{$self->{'_gsf_tag_hash'} || {} } ) {
>                                                    ------
> to
>
>    foreach my $t ( keys %{$self->{'_gsf_tag_hash'} } ) {
>
> it works fine. I've pasted an example script at http://sial.org/pbot/32320 
> .
>
> Any ideas why this syntax would break Storable? Would wrapping the  
> foreach in an if(defined $self->{'_gsf_tag_hash'}) serve to replace  
> the || {} ?

This should have exactly the same behavior as far as I can see.

Would you mind filing this as a bug repot with patch?

	-hilmar

>
(Continue reading)

Caroline | 26 Sep 05:19
Favicon

Re: Using Storable with SeqFeatures

On Thu, 2008-09-25 at 18:24 -0400, Hilmar Lapp wrote:

> Would you mind filing this as a bug repot with patch?
> 
> 	-hilmar
> 

Done, I think. I haven't used Bugzilla before, so give me a shout if I
haven't submitted it properly.

Cxx

Gmane