And the implementation would just be something like this?
my @features = grep { $_->has_tag('id') && ($_->get_tag_values('id'))[0]
eq 'my_gene' } $seq->get_SeqFeatures();
I think any implementation would be if we moved from the in-memory
arrays & hash-based system to a sqlite db on the back-end for how
Sequence and Feature objects are stored.
This would be a somewhat slower but wouldn't have performance/memory
problems we get for sequences with many annotations.
-jason
Frank Schwach wrote, On 9/7/10 5:09 AM:
> I am working a lot with feature-rich Bio::Seq objects these days and
> thought that it would be really nice if I could do something like:
>> my @features = $bio_seq_obj->get_SeqFeatures(-by_id => 'my_gene');
>> instead of having to grep for the feature every time.
> There could then be 'by_tag' and 'by_region' options as well.
>> According to the Bio::Seq docs, something like this seems to be planned
> at some stage. I would be willing to contribute to this feature if I can
> and if this isn't already being implemented by somebody else.
> Does anybody know the state of this feature?
>> Frank
>>>>>>>