[Bioperl-l] parsing blast output

Jason Stajich jason.stajich at duke.edu
Sat Jun 18 09:34:26 EDT 2005


Except that hits() returns a list.
while( my $result = $blast_report->next_result ) {
  while( my $hit= $result->next_hit ) {
   print $hit->name, " ", $hit->description, "\n";
  }
}

See the HOWTO as well.

On Jun 18, 2005, at 6:41 AM, Irshad Khan 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
>>>
>>>
>>
>>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
http://www.duke.edu/~jes12/




More information about the Bioperl-l mailing list