[Bioperl-l] Re: More unresolved issues with Bio::AnnotatableI

Hilmar Lapp hlapp at gmx.net
Thu Jun 23 01:41:20 EDT 2005

Graph::Directed is part of the Graph.pm package. In fact, the graph 
used by SimpleGOEngine is an instance of Graph::Directed.

If accessing $seq->annotation would now need Graph::Directed installed 
and functional, then the reason almost certainly is due to the changes 
Aaron pinpoints. More precisely, any ontology term needs to be in an 
ontology, and the ontology needs a backing ontology engine to support 
the graph-based algorithms like traversal etc.

SimpleGOEngine is the default engine being used if you don't specify 
another one, and it itself is merely a wrapper around an instance 
Graph.pm (the superclass of Graph::Directed).

This breaks down on a seemingly simple use case because the modules 
using Graph.pm have been programmed (by ChrisZ and myself) with the 
concept that if you use them you'll almost always also want the engine 
API functional. Now with the transition to a much more pervasive use of 
ontology terms, you easily have a situation in which all you'll ever 
want from a term's ontology is its name.

So I suggest that I (or any taker is welcome) make this more robust by 
loading Graph.pm and friends only on demand within SimpleGOEngine when 
the methods depending on it are actually used.

As for adapting the go-perl API to Bioperl, yes that's what I've done 
but have yet to test. As soon as I'm convinced that it works I'll 
commit it though. Note that this isn't really the panacea to all 
ontology-related problems in Bioperl though. The issue Aaron's hit is 
due to assumptions being made too quick about what a user has installed 
and what she's going to call, hence can be fixed accordingly. Also, 
Graph.pm is not a necessarily dispensible dependency; it implements 
many algorithms on graphs (connected subgraphs, shortest path, etc) 
that go-perl doesn't but which can be very useful. I decided to adapt 
go-perl to Bioperl primarily to finally delegate responsibility for 
dealing with the oddities of the dag-edit and obo-family of file 
formats to those who claim they solved all that :)


On Jun 22, 2005, at 8:43 PM, Allen Day wrote:

> Hi,
> Where is the dependency on Graph::Directed introduced?  A grep through
> Bio/* in bioperl-live on HEAD reveals several references in the POD to
> Graph.pm, but I don't see it anywhere in the code.
> I don't know if Chris Mungall's GO-Perl API removes the dependency on
> Graph::Directed, but it is certainly easier to use than 
> Bio::OntologyIO as
> a means to access the OBO ontologies.  I'm willing to look into 
> converting
> Bio::Annotation::OntologyTerm to use GO::Model::* instead of
> Bio::Ontology::Term, but it may interfere with other projects using the
> class (e.g. bioperl-db).
> Hilmar, I know you were looking at the GO-Perl codebase recently, can 
> you
> comment on any of the above?
> -Allen
> On Wed, 22 Jun 2005, Aaron J. Mackey wrote:
>> Because AnnotatableI has implementations for add_tag and get_tag that
>> invoke Bio::Annotation::OntologyTerm, and therefore Graph::Directed,
>> which relies on Scalar::Util::weaken(), therefore I cannot even use
>> basic Bio::Seq functionality on any perl that doesn't have weak
>> references (oddly, this cropped up in a 5.8.0 install via an RPM that
>> was evidently compiled without support for weak references, so this
>> isn't just an "ancient perl" problem).
>> This is something of a showstopper for any 1.6; in effect, we'd need
>> to disable Annotation::OntologyTerm use for any Perl without weak
>> reference support.
>> We've said it before, and we need to say it again: the changes made
>> to the feature/annotation object model are seriously impeding our
>> ability to move forward to a release (and frighteningly, the GBrowse
>> distribution now includes those parts of 1.5 that it relies on, so a
>> user's BioPerl install could be a hodge-podge of 1.4/1.5 code).  This
>> seems important to all GMOD projects, so why hasn't there been any
>> work on it?
>> Thanks,
>> -Aaron
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757

More information about the Bioperl-l mailing list