[Bioperl-l] Re: [Bioperl-guts-l] [Bug 1742] New: GFF parser messes attributes (fwd)

Allen Day allenday at ucla.edu
Mon Jan 31 19:56:21 EST 2005


This bug isn't coming from SeqFeature::Annotated, it's from the refactor
of SeqFeatureI to inherit from AnnotatableI.  Meaning get_tag_values() and
similar functions are now get/setting attributes to a
Bio::AnnotationColleciton store.  Simple strings passed in are turned into
objects when added to the store, and given back in object form.

It was never specified in Bio::SeqFeatureI, even before refactoring, that
the returned values of annotation tags should be strings.  Code using the
interface just assumed this was the case, and it wasn't a bad assumption
given that Bio::SeqFeature::Generic was the only instantiable class and
did use strings as values rather than objects.

-Allen


On Mon, 31 Jan 2005, Hilmar Lapp wrote:

> This is coming from SeqFeature::Annotated, right? What's wrong with 
> making SeqFeature::Annotated return a tag's value as a string as 
> demanded by the contract instead of returning an object?
> 
> IMNSHO stringification overload band-aids rather than fixes the 
> problem, and also introduces a trip wire that sooner or later will be 
> triggered by someone unsuspecting. I.e., it makes the code more 
> brittle, not more robust. You won't like me for this, but I do think 
> it's the wrong strategy.
> 
> 	-hilmar
> 
> On Jan 31, 2005, at 2:27 PM, Allen Day wrote:
> 
> > Here's the stringification problem being discussed in another thread.  
> > It
> > came up in a 1.5 branch bug report.  Objections to putting the
> > stringification overload back?
> >
> > -Allen
> >
> > ---------- Forwarded message ----------
> > Date: Mon, 31 Jan 2005 15:24:19 -0500
> > From: bugzilla-daemon at portal.open-bio.org
> > To: bioperl-guts-l at bioperl.org
> > Subject: [Bioperl-guts-l] [Bug 1742] New: GFF parser messes attributes
> >
> > http://bugzilla.open-bio.org/show_bug.cgi?id=1742
> >
> >            Summary: GFF parser messes attributes
> >            Product: Bioperl
> >            Version: 1.5 branch
> >           Platform: Macintosh
> >         OS/Version: MacOS X
> >             Status: NEW
> >           Severity: major
> >           Priority: P2
> >          Component: Core Components
> >         AssignedTo: bioperl-guts-l at bioperl.org
> >         ReportedBy: jldai at yahoo.com
> >
> >
> > In BioPerl 1.5.0, use Bio::Tools::GFF and Bio::SeqIO to paser GFF 
> > string:
> >
> > 8255763	tigrscan	final-exon	67	558	56.8	-	2	transgrp "1001";
> >
> >  into an Bio::SeqIO object and later print out as embl file, resulting 
> > in:
> >
> > FT   final-exon      complement(67..558)
> > FT                   
> > /transgrp="Bio::Annotation::SimpleValue=HASH(0x93a5d8)"
> > FT                   /note="score=56.8"
> > FT                   /note="frame=2"
> >
> > The value of tag "transgrp" should be 1001.
> >
> > Same script worked fine in BioPerl-1.4
> >
> >
> >
> > ------- You are receiving this mail because: -------
> > You are the assignee for the bug, or are watching the assignee.
> > _______________________________________________
> > 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