[Bioperl-l] Getting 'features' from SearchIO?

Dan Bolser dan.bolser at gmail.com
Mon May 11 15:07:47 UTC 2009


2009/5/11 Dan Bolser <dan.bolser at gmail.com>:
> Hi,
>
> I am parsing a blasttable and extracting Bio::Search::HSP::GenericHSP
> objects as a result. I read somewhere that HSP objects inherit Feature
> objects... How can I get a 'standard' representation of the HSP as a
> feature? Basically I'd like to simply load the blast results into a
> feature database...
>
> When I call feature methods on the HSP objects I just get blank or
> undef results... I think this is because I'm trying to get at the
> sequences existing (non existent) features, rather than get the HSP
> object as a feature... If that makes sense... How can I confirm that I
> have a feature object containing the details of the HSP?
>
> I thought of trying to just pass the HSP object to the
> Bio::DB::SeqFeature::Store, but I need to get that up and running
> first (I'm looking into it). In the mean time I thought I'd ask if
> this sounds like the right thing to do.

Well it works... I am seeing things fill into the database as I call

$db->store($p)
	or die "Couldn't store!";

(I needed to upgrade bioperl to get Bio::DB::SeqFeature working).


Here is my code;

while(my $r = $s->next_result ){
  print $r->query_name, "\n";
  while(my $h = $r->next_hit){
    print "\t", $h->name, "\n";
    while(my $p = $h->next_hsp){
      $db->store($p)
	or die "Couldn't store!";
    }
  }
}


How can I visualize the resulting set of HSPs? i.e.  If I point
gbrowse at this location, will it automatically pick up the entry
points and their features from the database? Or how much manual
configuration will I need? Is there some boilerplate config I can use
to visualize this?

Cheers,
Dan.


> More generally I want to have features attached to sequences that are
> themselves annotations of larger sequences (but with unknown
> position). Is Bio::DB::SeqFeature::Store a way to go? I need to manage
> various different bits of information coming from a sequencing
> project, and I need a solution to the whole 'assembly life cycle
> management' problem.
>
> Thanks for any help,
> Dan.
>



More information about the Bioperl-l mailing list