[Bioperl-l] Feature/Annotation rollback finished

Chris Fields cjfields at uiuc.edu
Thu Aug 30 14:03:29 EDT 2007


On Aug 30, 2007, at 11:20 AM, Hilmar Lapp wrote:

>> ...It describes one method, ontology_term(), which returns a  
>> Bio::Ontology::TermI.  This is similar to  
>> SeqFeature::Annotated::type(), which returns a  
>> Bio::Annotation::OntologyTerm (a Bio::Ontology::TermI).  My  
>> thought is to simply deprecate type() in favor of  
>> TypedSeqFeatureI::ontology_term().
>
> I think we'll want to think about that. type() gives me some  
> indication of what the returned value might represent, whereas  
> ontology_term() only tells me about the type of the returned object.
>
> You could make ontology_term() accept a context argument, such as
>
> 	my $feature_type = $typedFeat->ontology_term(-context => -type);
>
> Or you could name the method(s) more explicitly, such as
>
> 	my $feature_type = $typedFeat->type_term();
> 	my $feature_source = $typedFeat->source_term();
> 	my @annTerms = $typedFeat->get_Annotations('Gene Ontology');
>
> Am I making sense?
>
> 	-hilmar

I think so; I'll have to look at what is returned from type() in some  
more detail.

It appears that the two main culprits for passing strings off to  
Ontology::Term are the Bio::OntologyIO::obo and  
Bio::OntologyIO::dagflat parsers.  I can add some code in there to  
change those to DBLinks prior to creating Ontology::Term instances,  
which should clean that up.

chris


More information about the Bioperl-l mailing list