[Bioperl-l] parsing blast output

Irshad Khan iak13000 at gmail.com
Sat Jun 18 10:15:19 EDT 2005


hi Tuan,

To parse blast reports i use to use Bio::SearchIO; so Try jason's loop
by using SearchIO

putting together you can write like

use Bio::SearchIO;

while( my $result = $blast_report->next_result ) {
 while( my $hit= $result->next_hit ) {
  print $hit->name, " ", $hit->description, "\n";
 }
}

let me know if it works.


On 6/18/05, Tuan A. Tran <tuantran167 at gmail.com> wrote:
> Hi Irshad,
> 
> I did try it before and got an error
> Can't locate object method "description" via package
> "Bio::Search::HSP::GenericHSP"
> 
> I also looked at instructions of the above package. I could not find
> method "description". Do you know where I can find an example?
> 
> Tuan
> 
> 
> On 6/18/05, Irshad Khan <iak13000 at gmail.com> wrote:
> > On 6/18/05, Irshad Khan <iak13000 at gmail.com> wrote:
> > > Hi,
> > >
> > > If it is in the description part may be you can try this
> > >
> > > $blast_report->next_result->hits()->description;
> > >
> > > let me know if it works
> > >
> > > Irshad
> > >
> > > On 6/18/05, Tuan A. Tran <tuantran167 at gmail.com> wrote:
> > > > Hi,
> > > >
> > > > When I blasted my query sequence against a database, the got the
> > > > following line (for example)
> > > >
> > > > >3R type=chromosome; loc=3R:1..27905053; ID=3R; release=r4.1; species=dmel
> > > >
> > > > Using bioperl module,
> > > >  $blast_report = $factory->blastall($query);
> > > > I can extract some information like ID = 3R using
> > > >  $blast_report->next_result->hits()->name;
> > > >
> > > >  If I want to keep the entire line as show above what should I do? Is
> > > > there a module in bioperl? I really appreciate if someone can tell me
> > > > how to do it.
> > > >
> > > > Thanks,
> > > > TAT
> > > >
> > > > _______________________________________________
> > > > Bioperl-l mailing list
> > > > Bioperl-l at portal.open-bio.org
> > > > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> > > >
> > >
> >
>



More information about the Bioperl-l mailing list