Sendu Bala
and 1 contributors


Bio::Tools::BPpsilite - Lightweight BLAST parser for (iterated) psiblast reports


  use Bio::Tools::BPpsilite;
  open my $FH, "t/psiblastreport.out";
  $report = Bio::Tools::BPpsilite->new(-fh=>$FH);

  # determine number of iterations executed by psiblast
  $total_iterations = $report->number_of_iterations;
  $last_iteration = $report->round($total_iterations);

  # Process only hits found in last iteration ...
   $oldhitarray_ref = $last_iteration->oldhits;
   HIT: while($sbjct = $last_iteration->nextSbjct) {
          $id = $sbjct->name;
          $is_old =  grep  /\Q$id\E/, @$oldhitarray_ref;
          if ($is_old ){next HIT;}
  #  do something with new hit...


NOTE: This module's functionality has been implemented in Bio::SearchIO::blast and therefore is not actively maintained.

BPpsilite is a package for parsing multiple iteration PSIBLAST reports. It is based closely on Ian Korf's Bio::Tools::BPlite module for parsing single iteration BLAST reports (as modified by Lorenz Pollak).

Two of the four basic objects of Bio::Tools::BPpsilite are identical to the corresponding objects in BPlite - the "" and "" objects. This DESCRIPTION documents only the one new object, the "iteration", as well as the additional methods that are implemented in BPpsilite that are not in BPlite. See the BPlite documentation for information on the BPlite, SBJCT and HSP objects.

The essential difference between PSIBLAST and the other BLAST programs (in terms of report parsing) is that PSIBLAST performs multiple iterations of the BLASTing of the database and the results of all of these iterations are stored in a single PSIBLAST report. (For general information on PSIBLAST see the README.bla file in the standalone BLAST distribution and references therein). PSIBLAST's use of multiple iterations imposes additional demands on the report parser: * There are several iterations of hits. Many of those hits will be repeated in more than one iteration. Often only the last iteration will be of interest. * Each iteration will list two different kinds of hits - repeated hits that were used in the model and newly identified hits - which may need to be processed in different manners * The total number of iterations performed is not displayed in the report until (almost) the very end of the report. (The user can specify a maximum number of iterations for the PSIBLAST search, but the program may perform fewer iterations if convergence is reached)

BPpsilite addresses these issues by offering the following methods:

* The total number of iteration used is given by the method number_of_iterations as in:

        $total_iterations = $report->number_of_iterations;

* Results from an arbitrary iteration round can be accessed by using the 'round' method:

        $iteration3_report = $report->round(3);

* The ids of the sequences which passed the significance threshold for the first time in the "nth" iteration can be identified by using the newhits method. Previously identified hits are identified by using the oldhits method, as in:

        $oldhitarray_ref = $iteration3_report->oldhits;
        $newhitarray_ref = $iteration3_report->newhits; should work equally well on reports generated by the local BLAST module as with reports generated by remote psiblast searches. For examples of usage of, the user is referred to the BPpsilite.t script in the "t" directory.


Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated.                  - General discussion  - About the mailing lists

Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:

AUTHOR - Peter Schattner



Jason Stajich,


Based on work of: Ian Korf (,, Lorenz Pollak (, bioperl port)

COPYRIGHT is copyright (C) 1999 by Ian Korf.


This software is provided "as is" without warranty of any kind.


 Title    : query
 Usage    : $query = $obj->query();
 Function : returns the query object
 Returns  : query object
 Args     :


 Title    : qlength
 Usage    : $len = $obj->qlength();
 Function : returns the length of the query 
 Returns  : length of query
 Args     :


 Title    : database
 Usage    : $db = $obj->database();
 Function : returns the database used in this search
 Returns  : database used for search
 Args     :


 Title    : number_of_iterations
 Usage    : $total_iterations = $obj-> number_of_iterations();
 Function : returns the total number of iterations used in this search
 Returns  : total number of iterations used for search
 Args     : none


 Title    : database
 Usage    : $pattern = $obj->pattern();
 Function : returns the pattern used in a PHIBLAST search


 Title    : query_pattern_location
 Usage    : $qpl = $obj->query_pattern_location();
 Function : returns reference to array of locations in the query sequence
            of pattern used in a PHIBLAST search


 Title    : round
 Usage    : $Iteration3 = $report->round(3);
 Function : Method of retrieving data from a specific iteration 
 Example  :  
 Returns  : reference to requested Iteration object or null if argument
                is greater than total number of iterations
 Args     : number of the requested iteration


 Title    : _preprocess
 Usage    : internal routine, not called directly
 Function : determines number of iterations in report and prepares
            data so individual iterations canbe parsed in non-sequential 
 Example  :  
 Returns  : nothing. Sets TOTAL_ITERATION_NUMBER in object's hash
 Args     : reference to calling object