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

Sendu Bala bix at sendu.me.uk
Thu Oct 11 06:40:24 EDT 2007


Following Chris's changes to SF::Annotated et al., lots of existing user 
code breaks. Also, at least some Bioperl code breaks, notably 
Bio::DB::SeqFeature::Store, which in mysql mode calls 
_get_location_and_bin() which calls $feature->seq_id which ends up 
storing something like 'Bio::Annotation::SimpleValue=HASH(0x1f435d0)' in 
the database, instead of an actual sequence id (which completely breaks 
searching by seq_id).

I propose its API be changed to be more consistent with 
Bio::SeqFeatureI, eg. instead of:

seq_id()
  Usage   : $obj->seq_id($newval)
  Function: holds a string corresponding to the unique
            seq_id of the sequence underlying the feature
            (e.g. database accession or primary key).
  Returns : a Bio::Annotation::SimpleValue object representing the
            seq_id.
  Args    : on set, some string or a Bio::Annotation::SimpleValue object.

we have:

seq_id()
  Usage   : $obj->seq_id($newval)
  Function: holds a string corresponding to the unique
            seq_id of the sequence underlying the feature
            (e.g. database accession or primary key).
  Returns : string representing the seq_id.
  Args    : on set, some string or a Bio::Annotation::SimpleValue object.

This would apply to seq_id(), name(), type(), source(), phase() and 
frame(). Internally the implementation could store the string value in a 
SimpleValue object.


However, I'm obviously missing something, because I have no idea what 
the justification for returning SimpleValue objects was in the first 
place (what other module needs them?), nor even what the point of 
SimpleValue objects is in the first place.



More information about the Bioperl-l mailing list