[Bioperl-l] Bio::SeqFeature::Annotated API change, problem with Genewise.t
Sendu Bala
bix at sendu.me.uk
Fri Oct 26 12:52:59 EDT 2007
Sendu Bala wrote:
> 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.
I've now done this except for type() and source(), since these aren't in
Generic. Instead we have source_tag() and primary_tag() accepting and
returning strings.
source() and type() return objects as before, but now only accept
objects when setting for consistency.
One test that pops up with an error is t/Genewise.t
I don't understand what's causing the problem. Can anyone help?
More information about the Bioperl-l
mailing list