[Bioperl-l] parsing blast output

Jason Stajich jason.stajich at duke.edu
Mon Jun 20 19:51:58 EDT 2005


done.

Propigating query name and desc as well

Try:
  $hsp->query->seq_id;
  $hsp->query->seqdesc;
  $hsp->hit->seq_id;
  $hsp->hit->seqdesc;

-jason
On Jun 20, 2005, at 3:46 AM, Will Spooner wrote:

> Hi Jason,
>
> I have, in the past, wanted to work with HSP objects out of context  
> of the
> Hit object. There is currently no way to fetch the description in this
> case. How easy would it be to propogate the $hit->description to the
> $hsp->seqdesc attribute during the report parsing?
>
> Will
>
> On Sat, 18 Jun 2005, Jason Stajich wrote:
>
>
>> 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/
>>
>>
>> _______________________________________________
>> 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