[Bioperl-l] Runnig bl2seq throws error + Failure to parse BlastResult
Jason Stajich
jason.stajich at gmail.com
Tue Jun 28 21:39:00 UTC 2011
To answer your question "there might be a bug"
But there won't be any hsps or hits so why do you care if the counter is wrong?
On Jun 28, 2011, at 2:32 PM, Das, Abhiram wrote:
> Jason, thanks for your reply.
>
> I have two issues:
>
> 1. While running the program it shows up the following message:
>
> "Use of uninitialized value in numeric le (<=) at /Library/Perl/5.8.8/Bio/SearchIO/IteratedSearchResultEventBuilder.pm line 367, <GEN4> line 26."
>
> 2. Even though there is no hit; $results->num_hits get's me 1 hit.
>
>
> What I am trying to do:
>
> "Find number of pairwise similar sequences from a set of sequences."
>
> Please find attached the sequence file.
>
> Thanks again
> -Abhi
>
> ----- Original Message -----
> From: "Jason Stajich" <jason.stajich at gmail.com>
> To: "Abhiram Das" <abhiram.das at gatech.edu>
> Cc: bioperl-l at bioperl.org
> Sent: Tuesday, June 28, 2011 5:02:39 PM
> Subject: Re: [Bioperl-l] Runnig bl2seq throws error + Failure to parse BlastResult
>
> I'm sorry but I don't understand your question, are you worried that the num_hits is 1 simply? I think this is a function of a forced result from bl2seq -- can you better explain what you are trying to do or provide your sequence file so the issue you are concerned with can be replicated.
>
> Are you trying to construct an all-vs-all pairwise distances based on bl2seq?
>
> On Jun 28, 2011, at 1:26 PM, Das, Abhiram wrote:
>
>> Hi,
>>
>> Running the following code throws the message:
>>
>> "Use of uninitialized value in numeric le (<=) at /Library/Perl/5.8.8/Bio/SearchIO/IteratedSearchResultEventBuilder.pm line 315, <GEN6> line 26."
>>
>> Even though the output file shows no hit's, the BlastResult->num_hits returns 1.
>>
>>
>>
>> CODE:
>>
>> use strict;
>> use Bio::Seq;
>> use Bio::SeqIO;
>> use Bio::DB::GenBank;
>> use Bio::Tools::Run::StandAloneBlastPlus;
>> use Bio::Search::Result::BlastResult;
>> use Bio::Search::Hit::HitI;
>>
>> my $fac = Bio::Tools::Run::StandAloneBlastPlus->new();
>>
>> my $seq_obj = Bio::SeqIO->new(-file => "all_reads.fasta", -format => "fasta", -alphabet => "dna");
>>
>> #loop through each seq in the seq-obj and blast it with the next sequence
>> my @seq_list;
>> while(my $seq = $seq_obj->next_seq()){
>> push(@seq_list, $seq);
>> }
>>
>> my $eval = 0.000001;
>> my $word = 16;
>> my $match = 0;
>> no strict;
>> for(my $i = 0; $i < @seq_list; $i++){
>> for(my $j = $i+1; $j < @seq_list; $j++){
>> $fac->bl2seq(-method=>'blastn', -query => $seq_list[$j], -subject => $seq_list[$i], -outfile=>'test.out');
>> $fac->rewind_results;
>> if($result = $fac->next_result){
>> print "# hits found:: ", $result->num_hits,"\n";
>> if(my $hit = $result->next_hit){
>> $match++;
>> }
>> }
>> }
>> }
>> $fac->cleanup();
>>
>>
>> Appreciate any help.
>>
>>
>>
>>
>>
>>
>>
>> Thanks
>> -Abhi
>>
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
> <all_reads.fasta>
More information about the Bioperl-l
mailing list