[Bioperl-l] Problems parsing PSI-BLAST results

David García Cortés davidg at lsi.upc.edu
Thu Jan 13 17:21:26 EST 2005


Hello.

I'm trying to parse the hits of all the iterations in a PSI-BLAST result 
(which I have in a variable, not in a file), but I can't  make it work.
It gives me the following error:

Use of uninitialized value in index at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Sbjct.pm line 271, 
<GEN2> line 54.
Use of uninitialized value in length at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Sbjct.pm line 272, 
<GEN2> line 54.
Use of uninitialized value in join or string at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Sbjct.pm line 283, 
<GEN2> line 54.
Use of uninitialized value in join or string at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Sbjct.pm line 284, 
<GEN2> line 54.
Use of uninitialized value in numeric gt (>) at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/HSP.pm line 185, <GEN2> 
line 54.
Use of uninitialized value in numeric gt (>) at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/HSP.pm line 197, <GEN2> 
line 54.

-------------------- WARNING ---------------------
MSG: Possible error (2) while parsing BLAST report!
---------------------------------------------------
Use of uninitialized value in substitution (s///) at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Iteration.pm line 207, 
<GEN2> line 54.
Use of uninitialized value in substitution (s///) at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Iteration.pm line 208, 
<GEN2> line 54.
Use of uninitialized value in substitution (s///) at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Iteration.pm line 209, 
<GEN2> line 54.
Use of uninitialized value in pattern match (m//) at 
/usr/opt/perl5/lib/site_perl/5.6.0/Bio/Tools/BPlite/Iteration.pm line 211, 
<GEN2> line 54.


I don't know why it doesn't work... I looked at the bioperl API and there is 
a method "nextSbjct()" for Bio::Tools::BPlite::Iteration !
This is the part of the code:

 my $seqsfich  = Bio::SeqIO->new(-file=>"$proteasa"
 , '-format' => 'Fasta');

 # blast parameters
 my @pars = (
 'database' => "nr"
 , 'j' => '2'
 );

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

while (my $seq = $seqsfich->next_seq()) {
    my $report = $factory->blastpgp($seq);
    my $max_iter = $report->number_of_iterations;
    my $iter = $report->round($max_iter);

     while (my $sbjct = $iter->nextSbjct()){
          while (my $hsp = $sbjct->nextHSP()){
                       printf("%-70s   %s\n", substr($hsp->hit->seqname, 0, 
70), $hsp->score);
          }
     }
}


The error must be in this part:

  while (my $sbjct = $iter->nextSbjct()){
          while (my $hsp = $sbjct->nextHSP()){
                       printf("%-70s   %s\n", substr($hsp->hit->seqname, 0, 
70), $hsp->score);
          }
     }

because when I remove it from the code, the errors don't appear.
What am I doing wrong?

Thank you very much.






More information about the Bioperl-l mailing list