[BioSQL-l] adding non-positional features via bioperl to a biosql database

James Procter jimp at compbio.dundee.ac.uk
Tue Feb 10 14:14:01 EST 2009

Hi. Apologies if this is not the right place to post Bioperl/BioSQL
issues, feel free to tell me where to go, after you've read the following:

I have been using a sequence pipeline to add in non-positional features
to sequences whilst uploading to a bioSQL database. A fragment of the
code I tried to use is below:

sub process_seq {
  my ($self, $seq) = @_;
  my ($dbid, $id) = extract_dbid($seq);
  my $tags = {'label'=>"".$dbid."_$id",
  my $feat = Bio::SeqFeature::Generic->new(
                                                -primary_tag => 'dbref',
                                                 -strand => 0,
                                                 -source_tag => 'ATB');
  return $seq;

When I use this, the sequences are uploaded fine, and they have the
correct non-positional features when I look at the tables, and when I
access the database via Biojava. However, when I try to dump any of the
features with Bioperl I get the following warning :

--------------------- WARNING ---------------------
MSG: Calling end without a defined start position

And if I try to add any more features to the sequence and then store the
updated object I get the following exception in addition to the above

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: number of slots must equal the number of values
STACK: Error::throw
STACK: Bio::Root::Root::throw
STACK: Bio::DB::BioSQL::BaseDriver::update_object
STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::store
STACK: Bio::DB::Persistent::PersistentObject::store
STACK: Bio::DB::BioSQL::SeqFeatureAdaptor::store_children

Can someone help me out here ?  It seems that bioperl doesn't like
features with a start/end of '0' - in which case, how do I create
non-positional sequence features in a way that bioperl likes ?

I'm using a nightly build from December 2008 - but there have been
(afaict) no patches to the biosql or Feature::Generic which would fix
this behaviour.


J. B. Procter  (ENFIN/VAMSAS)  Barton Bioinformatics Research Group
Phone/Fax:+44(0)1382 388734/345764  http://www.compbio.dundee.ac.uk
The University of Dundee is a Scottish Registered Charity, No. SC015096.

More information about the BioSQL-l mailing list