[Bioperl-l] Searching by source in Bio::DB::SeqFeature::Store?
Lincoln Stein
lstein at cshl.edu
Wed Oct 10 14:20:33 UTC 2007
Hi Sendu,
This may be a glaring omission on my part. Try searching for:
@feats = $db->get_features_by_type(":$source");
Remove the colon in front of $source.
This might not work, but give it a try.
Lincoln
On 10/10/07, Sendu Bala <bix at sendu.me.uk> wrote:
>
> Once I store a feature like so:
>
> $db = Bio::DB::SeqFeature::Store->new( # mysql );
> $db->new_feature(-primary_tag => 'X',
> -seq_id => 'Y',
> #...
> -source => 'Z');
>
> How do I search for it again? I could have sworn that in the past the
> source somehow became one of the feature's attributes so that I could do:
>
> @feats = $db->features(-attributes => {source => 'Z'});
>
> (Or does/did some other feature-related module store source as an
> attribute, and in the past I stored those features in my db?)
>
> The obvious isn't implemented:
>
> @feats = $db->features(-source => 'Z');
>
> Looking at the code I see I can do type and source at the same time:
>
> @feats = $db->features(-type => 'X:Z');
>
> which works, but how do I just search for all Z, regardless of type?
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
--
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu
More information about the Bioperl-l
mailing list