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

Hilmar Lapp hlapp at gmx.net
Tue Feb 10 20:41:02 UTC 2009


Hi James,

BioPerl (and BioSQL) use 1-based coordinates for features, so  
coordinate 0 risks being treated as undefined, but just not  
consistently so.

If what you want is non-positional features, have you tried not  
specifying the positional attributes at all?

Furthermore, in BioPerl and BioSQL lingo a feature really is an  
annotation that has a position. So, whereas that's not strictly  
enforced I think (and may in fact be different in Biojava), did you  
conclude that natively non-positional sequence annotation using one of  
the Bio::Annotation classes (and adding it through $seq->annotation- 
 >add_Annotation()) wouldn't work for your purposes?

	-hilmar

On Feb 10, 2009, at 2:14 PM, James Procter wrote:

>
> 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",
>                'notes'=>["".$dbid.":$id"]};
>  my $feat = Bio::SeqFeature::Generic->new(
>                                           -start=>'0',-end=>'0',
>                                                -primary_tag =>  
> 'dbref',
>                                                 -tag=>$tags,
>                                                 -strand => 0,
>                                                 -source_tag => 'ATB');
>  $seq->add_SeqFeature($feat);
>  $seq->version('1')
>  $seq->alphabet('protein')
>  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
> warning.
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: number of slots must equal the number of values
> STACK: Error::throw
> STACK: Bio::Root::Root::throw
> /gpfs/gjb_lab/ws-dev1/servers/lib/perl/lib/perl5/Bio/Root/Root.pm:357
> STACK: Bio::DB::BioSQL::BaseDriver::update_object
> /gpfs/gjb_lab/ws-dev1/servers/lib/perl/lib/perl5/Bio/DB/BioSQL/ 
> BaseDriver.pm:1075
> STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::store
> /gpfs/gjb_lab/ws-dev1/servers/lib/perl/lib/perl5/Bio/DB/BioSQL/ 
> BasePersistenceAdaptor.pm:269
> STACK: Bio::DB::Persistent::PersistentObject::store
> /gpfs/gjb_lab/ws-dev1/servers/lib/perl/lib/perl5/Bio/DB/Persistent/ 
> PersistentObject.pm:271
> STACK: Bio::DB::BioSQL::SeqFeatureAdaptor::store_children
> /gpfs/gjb_lab/ws-dev1/servers/lib/perl/lib/perl5/Bio/DB/BioSQL/ 
> SeqFeatureAdaptor.pm:278
>
> 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.
>
> thanks.
> jim
>
>
> -- 
> -------------------------------------------------------------------
> 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.
> _______________________________________________
> BioSQL-l mailing list
> BioSQL-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biosql-l

-- 
===========================================================
: Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
===========================================================






More information about the BioSQL-l mailing list