[Bioperl-l] TermI::get_dblinks inconsistent?

Hilmar Lapp hlapp at gmx.net
Sat May 24 20:41:27 EDT 2003


Ontology::TermI::get_dblinks() returns an array of scalars. I.e., if 
you ask an ontology term for its dblinks, you get an array of strings.

Are people happy with this? Or is the fact that it does not return an 
array of Bio::Annotation::DBLink objects rather confusing and an 
example of inconsistency?

The reason I'm asking is that I ran into this myself in bioperl-db. Not 
having read the POD carefully, I wrote TermAdaptor such that it assumes 
the return values are objects, not scalars. I can fix this in 
TermAdaptor (create DBLink objects on the fly), or I can change the 
interface definition and accordingly the implementations. The third 
option is to introduce another method that would return the dblinks as 
objects.

Any opinions on what sounds most attractive? Personally, I'm leaning 
towards being drastic and change the interface definition as it's 
really inconsistent. Unfortunately I don't know how one would be able 
to provide backwards compatibility. I can also go for any of the other 
options.

	-hilmar
-- 
-------------------------------------------------------------
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