[Bioperl-l] typed sequence features

Allen Day allenday at ucla.edu
Fri Oct 1 13:53:57 EDT 2004


you can't do this because an ontology term is an ontology term, it is not
a simple value.  even though you can parse the text and make a simple
value from it, the intent behind giving the value as an Ontology_term
attribute in GFF3 is clear: this is an identifier for an ontology term.  
If the document author had wanted you to use it as just a text value, he
would have given it as a Note/Name/Alias/whatever.

the point of the Bio::SeqFeature::Annotated object is that it is annotated
as well as possible by using Bio::AnnotationCollection -- it doesn't
(only) store attributes as simple strings.

-allen


On Fri, 1 Oct 2004, Scott Cain wrote:

> Allen,
> 
> I apparently don't get mail addressed to scain at pub.open-bio.org, so I
> didn't get this message until this morning when I read the bioperl
> digest.
> 
> So, why can't I handle it this way?  It seems to work just fine for the
> bulk loader.
> 
> Scott
> 
> On Fri, 2004-10-01 at 10:02, bioperl-l-request at portal.open-bio.org
> wrote:
> > Date: Wed, 29 Sep 2004 13:52:39 -0700 (PDT)
> > From: Allen Day <allenday at ucla.edu>
> > Subject: [Bioperl-l] Re: [Bioperl-guts-l] bioperl commit
> > To: Scott Cain <scain at pub.open-bio.org>
> > Cc: Bioperl <bioperl-l at bioperl.org>
> > Message-ID: <Pine.LNX.4.58.0409291351410.27667 at sumo.ctrl.ucla.edu>
> > Content-Type: TEXT/PLAIN; charset=US-ASCII
> > 
> > Scott,
> > 
> > You can't handle Ontology_term as a SimpleValue, that's why I didn't
> > implement it that way.  You need to rather create a
> > Bio::Annotation::OntologyTerm.
> > 
> > -Allen
> > 
> > On Sat, 25 Sep 2004, Scott Cain wrote:
> > 
> > > 
> > > scain
> > > Sat Sep 25 07:41:29 EDT 2004
> > > Update of /home/repository/bioperl/bioperl-live/Bio/FeatureIO
> > > In directory pub.open-bio.org:/tmp/cvs-serv2444/Bio/FeatureIO
> > > 
> > > Modified Files:
> > > 	gff.pm 
> > > Log Message:
> > > two things:
> > >   * adding SOFA as an available ontology to DocumentRegistry.pm
> > >   * modifying FeatureIO::gff to use SOFA to validate, and to parse Ontology_term
> > > 
> > > bioperl-live/Bio/FeatureIO gff.pm,1.9,1.10
> > > ===================================================================
> > > RCS file: /home/repository/bioperl/bioperl-live/Bio/FeatureIO/gff.pm,v
> > > retrieving revision 1.9
> > > retrieving revision 1.10
> > > diff -u -r1.9 -r1.10
> > > --- /home/repository/bioperl/bioperl-live/Bio/FeatureIO/gff.pm	2004/09/21 23:15:22	1.9
> > > +++ /home/repository/bioperl/bioperl-live/Bio/FeatureIO/gff.pm	2004/09/25 11:41:29	1.10
> > > @@ -91,8 +91,9 @@
> > >    }
> > >    $self->_pushback($directive);
> > >  
> > > +  #need to validate against SOFA, no SO
> > >    $self->so(
> > > -            Bio::Ontology::OntologyStore->get_ontology('Sequence Ontology')
> > > +            Bio::Ontology::OntologyStore->get_ontology('Sequence Ontology Feature Annotation')
> > >             );
> > >  }
> > >  
> > > @@ -315,9 +316,9 @@
> > >    }
> > >  
> > >    #Handle Ontology_term attributes
> > > -  if($attr{Ontology_term}){
> > > -    $self->warn("Warning for line:\n$feature_string\nOntology_term attribute handling not yet implemented, skipping it");
> > > -  }
> > > +#  if($attr{Ontology_term}){
> > > +#    $self->warn("Warning for line:\n$feature_string\nOntology_term attribute handling not yet implemented, skipping it");
> > > +#  }
> > >  
> > >    #Handle Gap attributes
> > >    if($attr{Gap}){
> > > @@ -351,7 +352,7 @@
> > >      $ac->add_Annotation('Name',$a);
> > >    }
> > >  
> > > -  foreach my $other_canonical (qw(Alias Parent Note)){
> > > +  foreach my $other_canonical (qw(Alias Parent Note Ontology_term)){
> > >      if($attr{$other_canonical}){
> > >        foreach my $value (@{ $attr{$other_canonical} }){
> > >          my $a = Bio::Annotation::SimpleValue->new();
> > > 
> > > _______________________________________________
> > > Bioperl-guts-l mailing list
> > > Bioperl-guts-l at portal.open-bio.org
> > > http://portal.open-bio.org/mailman/listinfo/bioperl-guts-l
> > > 
> 
> 


More information about the Bioperl-l mailing list