[Bioperl-l] bioperl-db woes

Chris Fields cjfields at uiuc.edu
Thu Apr 17 16:26:41 UTC 2008


On Apr 17, 2008, at 9:47 AM, Hilmar Lapp wrote:

>
> On Apr 17, 2008, at 10:18 AM, Stefan Kirov wrote:
>> In any case I debugged and tracked that down to the RichSeq adaptor  
>> module missing.
>
>
> That almost can't be the problem. Every Bio::Seq::RichSeq is-a  
> Bio::Seq and a SeqAdaptor is present.
>
> I'm afraid it gets stuck somewhere else and frankly I didn't see the  
> RichSeqAdaptor failing to load in your stack trace:
>
>>       ------------- EXCEPTION: Bio::Root::Exception -------------
>>
>>    MSG: Annotation of class Bio::Annotation::Collection not
>>    type-mapped. Internal error?
>>    STACK: Error::throw
>>    STACK: Bio::Root::Root::throw
>>    /home/kirovs/bioperl-live/Bio/Root/Root.pm:357
>>    STACK:
>>    Bio::DB::BioSQL::AnnotationCollectionAdaptor::_annotation_map_key
>>    Bio/DB/BioSQL/AnnotationCollectionAdaptor.pm:695
>>    STACK:  
>> Bio::DB::BioSQL::AnnotationCollectionAdaptor::store_children
>>    Bio/DB/BioSQL/AnnotationCollectionAdaptor.pm:204
>>    STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::create
>>    Bio/DB/BioSQL/BasePersistenceAdaptor.pm:214
>>    STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::store
>>    Bio/DB/BioSQL/BasePersistenceAdaptor.pm:251
>>    STACK: Bio::DB::Persistent::PersistentObject::store
>>    Bio/DB/Persistent/PersistentObject.pm:271
>>    STACK: Bio::DB::BioSQL::SeqAdaptor::store_children
>>    Bio/DB/BioSQL/SeqAdaptor.pm:224
>>    STACK: Bio::DB::BioSQL::BasePersistenceAdaptor::create
>>    Bio/DB/BioSQL/BasePersistenceAdaptor.pm:214
>>    STACK: Bio::DB::Persistent::PersistentObject::create
>>    Bio/DB/Persistent/PersistentObject.pm:244
>>    STACK: t/04swiss.t:36
>>    -----------------------------------------------------------
>
> What that tells me is that when bioperl-db tries to store the  
> annotation bundle of the (SwissProt) sequence, one of the  
> annotations that it encounters is of type  
> Bio::Annotation::Collection. At present bioperl-db doesn't know what  
> to do with it; i.e., bioperl-db can't yet handle hierarchical  
> annotation collections (collections within collections).
>
> I believe this is due to recent changes in how the GN line is parsed  
> in BioPerl - Chris does this ring the right bell? I thought though  
> you had built in a method would allow flattening out

This appears to be using an older bioperl-live checkout, one where  
Heikki changed GN parsing to use a nested Annotation::Collection.  I  
reverted that back in a later commit to svn specifically b/c of  
bioperl-db problems.  bioperl-live's swiss.pm now uses a new subclass  
of Bio::Annotation::SimpleValue (Bio::Annotation::TagTree) that  
represents nested values via Data::Stag's itext output (we can change  
that to alternatives if needed).

Here are the last few relevant revisions in bioperl-live's main trunk  
(mine is the latest):

------------------------------------------------------------------------
r14562 | cjfields | 2008-02-28 08:30:05 -0600 (Thu, 28 Feb 2008) | 1  
line

bug 1825: updating swiss.pm/tests to try out TagTree (passes all  
tests).  Need to update Handler.t and related modules still...
------------------------------------------------------------------------
r14541 | heikki | 2008-02-25 00:10:48 -0600 (Mon, 25 Feb 2008) | 1 line

documentation for the GN line parsing and management
------------------------------------------------------------------------
r14538 | heikki | 2008-02-23 08:48:23 -0600 (Sat, 23 Feb 2008) | 1 line

GN (Gene Name) line parsing rewrite. Breaks backward compatibility.  
Can now deal with >1 gene per entry and four categories of names per  
gene. Parses old style syntax (...OR ... OR ... ) into one gene name  
and synonyms for each gene. Docs to follow.

....

I just updated all code from dev and reran bioperl-db tests w/o  
problems.  Maybe someone else could do the same to see what happens?

> It's worth noting that BioSQL itself can't really represent nested  
> annotation collections other than by using ontology terms and their  
> hierarchy, which at present I think isn't really appropriate, but I  
> have to think through the issue more. In other words, in BioSQL you  
> can't directly tie together a bunch of qualifier value pairs into a  
> "bag" and then nest this bag within another. The way to make this  
> work with the current schema is to flatten out the nesting.
>
> 	-hilmar
> -- 
> ===========================================================
> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
> ===========================================================

Might be worth looking into for a future BioSQL release, but we have a  
decent workaround in place for now, as long as it works cross-platform  
and cross-RDB.

chris




More information about the Bioperl-l mailing list