[Bioperl-l] Bio::DB::SeqFeature::Store issues

Sendu Bala bix at sendu.me.uk
Tue Jan 23 10:57:04 EST 2007


Hi,

I'm trying to use Bio::DB::SeqFeature::Store for the first time and have 
come across some issues.

Is the documentation accurate? The synopsis has:

my $db = Bio::DB::SeqFeature::Store->new(-adaptor => 'DBI::mysql',
                                          -dsn     => 'dbi:mysql:test',
                                          -write   => 1 );

but code for new() has:

rearrange(['ADAPTOR',
            'SERIALIZER',
            'INDEX_SUBFEATURES',
            'CACHE',
            'COMPRESS',
            'DEBUG',
            'CREATE',], at _);

Ie. naively -write doesn't do anything, and -create is undocumented. I 
needed to use -create to get it to work.


Doc for store() says:

Args    : list of Bio::SeqFeatureI objects

But when I tried storing Bio::SeqFeature::Annotated objects I get this 
error:

Transaction aborted because Can't locate object method "all_tags" via 
package "Bio::SeqFeature::Annotated" at 
/home/sendu/src/bioperl/core/Bio/DB/SeqFeature/Store/DBI/mysql.pm line 1300.

Ie. mysql.pm _update_attribute_index() method expects a 
Bio::SeqFeature::Generic object (which has the all_tags method), not 
just a Bio::SeqFeatureI. In fact all_tags() is just an alias to 
SeqFeatureI's get_all_tags() which is deprecated. Likewise, the same 
issue applies for the Generic-specific each_tag_value() alias of the 
deprecated get_tag_values().


What might be the best way to resolve this? I'm thinking it would be 
harmless to at least change _update_attribute_index() to call the 
SeqFeatureI methods instead? Don't know if there's a desire to not use 
the deprecated methods at all.



More information about the Bioperl-l mailing list