[Bioperl-l] Bio::DB::SeqFeature::Store problem with transcripts

Lincoln Stein lstein at cshl.edu
Fri Feb 16 08:35:19 EST 2007


Hi,

Older versions of Storable can't deal with features that contain subroutine
refs. You should get the current version from CPAN. Note that there is a
slight security problem here if you don't trust the objects stored in the
database. If they contain code refs, the code will be evaluated during
deserialization.

Lincoln

On 2/13/07, Sendu Bala <bix at sendu.me.uk> wrote:
>
> I have some raw sequences in a Bio::DB::SeqFeature::Store mysql database
> and wanted to associated some basic information with them, like exon
> positions. I thought of creating Bio::SeqFeature::Gene::Transcript
> objects and storing them so I could later use features() to see what
> other features overlapped exons. I ran into a fatal error that can be
> replicated with the following simplified one-liner:
>
> perl -MBio::DB::SeqFeature::Store -MBio::SeqFeature::Gene::Transcript -e
> '$db = Bio::DB::SeqFeature::Store->new(-adaptor => "DBI::mysql", -dsn =>
> "dbi:mysql:test"); $trans =
> Bio::SeqFeature::Gene::Transcript->new(-start => 1, -end => 2, -seq_id
> => "test"); $db->store($trans); @trans = $db->features(-seqid => $id,
> -type => "transcript"); print "@trans\n";'
>
> code sub {
>      package Bio::SeqFeature::Generic;
>      use strict 'refs';
>      my $self = shift @_;
>      foreach my $f (@{[] unless $$self{'_gsf_sub_array'};}) {
>          $f = undef;
>      }
>      $$self{'_gsf_seq'} = undef;
>      foreach my $t (keys %{{} unless $$self{'_gsf_tag_hash'};}) {
>          $$self{'_gsf_tag_hash'}{$t} = undef;
>          delete $$self{'_gsf_tag_hash'}{$t};
>      }
> } did not evaluate to a subroutine reference, at
> /.../Bio/DB/SeqFeature/Store.pm line 2280
>
>
> Is this a bug? Or am I taking the wrong approach?
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu


More information about the Bioperl-l mailing list