[Bioperl-l] Bio::Serach::Result::ResultI

Kan Nobuta nobuta at dbi.udel.edu
Tue Apr 27 14:38:07 EDT 2004


Hi Jason,

Thank you for your help.

I added one more line to my script (see below) and tried to print out 
the number of hits in the "$result" object.  However, the answer is 
always 0 even the queries have many hits.  What am I missing?

my $in = Bio::SeqIO->new('-file'=>'./ATH1.pep', '-format'=>'Fasta');
while (my $seq = $in->next_seq() ) {
     my @params = ('program'=>'blastp', 'outfile'=>'blast.out',
                   'database'=>'./ATH1.pep' );

     my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);

     my $blast_report = $factory->blastall($seq);
     print ref($blast_report), "\n";

     my $result = $blast_report->next_result;
     print ref($result), "\n";

     print "Num hits = ", $result->num_hits(), "\n";
}

Kan

On Apr 27, 2004, at 1:36 AM, Jason Stajich wrote:

> Result::BlastResult IS A Result::ResultI -- see biodesign.pod for
> description of object-oriented programming and bioperl.
>
> Anything you can do to a ResultI object yout can do to a BlastResult
> object, and more.
>
> -jason
>
> On Mon, 26 Apr 2004, Kan Nobuta wrote:
>
>> Hi all,
>>
>> I (think) installed bioperl on Mac OSX 10.3.  I wrote a short script
>> (see below) and tested if the installation was successful or not.
>>
>> my $in = Bio::SeqIO->new('-file'=>'./ATH1.pep', '-format'=>'Fasta');
>> while (my $seq = $in->next_seq() ) {
>>      my @params = ('program'=>'blastp', 'outfile'=>'blast.out',
>> 		  'database'=>'./ATH1.pep' );
>>
>>      my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
>>
>>      my $blast_report = $factory->blastall($seq);
>>      print ref($blast_report), "\n";
>>
>>      my $result = $blast_report->next_result;
>>      print ref($result), "\n";
>> }
>>
>>
>> I think "next_result" should return "Bio::Serach::Result::ResultI" but
>> my script returns  "Bio::Serach::Result::BlastResult."  Could anyone
>> help me to fix this problem?  I would greatly appreciate any help.
>>
>> Thank you in advance.
>>
>> Best wishes,
>>
>> Kan
>>
>>
>>
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at portal.open-bio.org
>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>>
>
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu



More information about the Bioperl-l mailing list