[Bioperl-l] Parsing BLAST 2.2.14 output

Susan J. Miller sjmiller at email.arizona.edu
Thu Jun 15 21:43:59 UTC 2006


Chris Fields wrote:
> 
> However, like Sendu, I get BLASTP 2.2.14 output (saved from NCBI directly)
> to parse using bioperl-live; Bio::Tools::Run::RemoteBlast also seems to work
> as well using BLASTP (and that's still set up to parse text output using
> SearchIO I believe).  Could you give us an example of the type of BLAST you
> were running, the sequence you used, and the error you had?  It could be
> program-specific output that may be causing the problems.  The last time
> text parsing broke it was changes specifically to only BLASTN/TBLASTX output
> or something along those lines.

Hi Chris and Sendu,

Thanks for your replies.  I am using blastp from the NCBI BLAST page, 
with this input sequence:

MSRLLWRKVAGATVGPGPVPAPGRWVSSSVPASDPSDGQRRRQQQQQQQQQQQQQPQQPQVLSSEGGQLR
HNPLDIQMLSRGLHEQIFGQGGEMPGEAAVRRSVEHLQKHGLWGQPAVPLPDVELRLPPLYGDNLDQHFR
LLAQKQSLPYLEAANLLLQAQLPPKPPAWAWAEGWTRYGPEGEAVPVAIPEERALVFDVEVCLAEGTCPT
LAVAISPSAWYSWCSQRLVEERYSWTSQLSPADLIPLEVPTGASSPTQRDWQEQLVVGHNVSFDRAHIRE
QYLIQGSRMRFLDTMSMHMAISGLSSFQRSLWIAAKQGKHKVQPPTKQGQKSQRKARRGPAISSWDWLDI

I have tried saving HTML (with and without the graphical overview), 
plain text, and XML.  I am parsing with this script:

#!/usr/local/bin/perl -w

use Bio::SearchIO;

while ($fil = shift(@ARGV)) {

   $srchio = new Bio::SearchIO ('-format' => 'blast', '-file' => $fil);
   while ($result = $srchio->next_result) {

         $db = $result->database_name;
         $alg = $result->algorithm;
         print "DB $db\n ALG $alg\n";

         $qid = $result->query_name;
         print "QRY $qid\n";

         while ($hit = $result->next_hit) {

           $hitnam = $hit->name;
           print "\t$hitnam\n";

           $nhsp = 0;
           while ($hit->next_hsp) {
                 $nhsp++;
           }
           print "\tHSPS: $nhsp\n";
         } # end next_hit
   }
}

Interestingly, the results are different (but never correct) for the 
different types of output I've tried.  For xml, the script runs but 
produces no output, for plain text the script hangs with no output, and 
for html, I get these errors:


-------------------- WARNING ---------------------
MSG: No HSPs for this Hit (gi|27502689|gb|AAH42571.1|)
---------------------------------------------------
Use of uninitialized value in numeric le (<=) at 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/SearchIO/IteratedSearchResultEventBuilder.pm 
line 349, <GEN1> line 308.
Use of uninitialized value in numeric le (<=) at 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/SearchIO/IteratedSearchResultEventBuilder.pm 
line 304, <GEN1> line 308.

-------------------- WARNING ---------------------
MSG: No HSPs for this Hit (gi|21779923|gb|AAM77583.1|)
---------------------------------------------------
Use of uninitialized value in numeric le (<=) at 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/SearchIO/IteratedSearchResultEventBuilder.pm 
line 349, <GEN1> line 333.
Use of uninitialized value in numeric le (<=) at 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/SearchIO/IteratedSearchResultEventBuilder.pm 
line 304, <GEN1> line 333.

-------------------- WARNING ---------------------
MSG: No HSPs for this Hit (gi|1644239|dbj|BAA12223.1|)
---------------------------------------------------
Use of uninitialized value in numeric le (<=) at 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/SearchIO/IteratedSearchResultEventBuilder.pm 
line 349, <GEN1> line 358.
Use of uninitialized value in numeric le (<=) at 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/SearchIO/IteratedSearchResultEventBuilder.pm 
line 304, <GEN1> line 358.

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: no data for midline Positives = 270/273 (98%), Gaps = 0/273 (0%) 
Query 78
STACK: Error::throw
STACK: Bio::Root::Root::throw 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/Root/Root.pm:328
STACK: Bio::SearchIO::blast::next_result 
/usr/local/lib/perl5/site_perl/5.6.0/Bio/SearchIO/blast.pm:1172
STACK: ./srchio.pl:8



At this point I should probably try installing all of bioperl-live, or 
at least get IteratedSearchResultEventBuilder.pm - or would you 
recommend something else?  Let me know if you need more info.

Thanks again,
-susan

Susan J. Miller
Biotechnology Computing Facility
Arizona Research Laboratories
Bio West 228
University of Arizona
Tucson, AZ  85721
(520) 626-2597



More information about the Bioperl-l mailing list