[Bioperl-l] Bio::SeqFeature::Annotated API change

Chris Fields cjfields at uiuc.edu
Fri Oct 12 10:49:25 EDT 2007

On Oct 12, 2007, at 8:04 AM, Sendu Bala wrote:

> Chris Fields wrote:
>> B::SF::A violated the SeqFeatureI interface from the get-go by  
>> returning
>> objects.
> On that note, the other major change I'd propose is to make B::SF::A
> inherit from B::SeqFeatureI. I really need this for RangeI methods.

It should already be SeqFeatureI; B::SF::A is-a TypedSeqFeatureI,  
which itself is-a SeqFeatureI.  We might want to run the tests on  
that but a quick inheritance tree check on my ends seems to confirm  
that.  If the Range methods don't work there may be an issue within  
B::SF::A (which wouldn't surprise me).

> Or, heck, since it's such a mess, do we just want to drop Annotated
> entirely and recommend using AnnotationAdaptor with Generic? What does
> Annotated bring to the table?

I agree about getting rid of B::SF::A, but if we do we will need a  
reasonable replacement for SFs in FeatureIO, as it relies directly on  
B::SF::A.  As for AnnotationAdaptor, it runs a simple type check on  
the data within a SF but I don't think it checks the primary_tag  
against the current SO or other ontologies for GFF3.

My inclination is to hold back FeatureIO from 1.6 and retool it to  
use any SeqFeatureI, then find a way to optionally type a  
SeqFeatureI.  This is so we don't have to completely retool every  
Bio::Tools* class.  For instance:

# a SF::Generic with a few type-related methods added to SeqFeatureI
$sf->type(); # undef, not checked
$sf->ontology_term; # undef, not checked

# call proper methods to type check
# or use a utility class dedicated to this function

$sf->validate_sf_type(); # or...

$sf->type(); # returns string
$sf->ontology_term; # returns Bio::Ontology::TermI

My feeling is that FeatureIO needs the ability to validate SFs and  
maybe have it turned on by default, but it should be optional.  The  
TermI would be a Bio::Annotation::OntologyTerm if we insist on using  
AnnotationAdaptor for richly typed SFs, which may not be necessary  
(Hilmar?).  As not all SeqFeatureI are also AnnotatableI that should  
probably be optional anyway.

> (Since its one of the modules added in 1.5 I think it's fair to  
> drop it
> from the 1.6 release: stuff that doesn't work can and should be moved
> out of the path of stable branches.)

Agreed.  If anyone wants to use experimental stuff they can always  
use bioperl-live.


More information about the Bioperl-l mailing list