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 "HSP.pm" and "Sbjct.pm" 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;
BPpsilite.pm should work equally well on reports generated by the StandAloneBlast.pm local BLAST module as with reports generated by remote psiblast searches. For examples of usage of BPpsilite.pm, 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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - 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:
http://bugzilla.open-bio.org/
Email: [email protected] Jason Stajich, jason-at-bioperl.org Based on work of: Ian Korf ([email protected], http://sapiens.wustl.edu/~ikorf), Lorenz Pollak ([email protected], bioperl port) BPlite.pm is copyright (C) 1999 by Ian Korf. This software is provided "as is" without warranty of any kind.
query
Title : queryUsage : $query = $obj->query();Function : returns the query objectReturns : query objectArgs :
qlength
Title : qlengthUsage : $len = $obj->qlength();Function : returns the length of the queryReturns : length of queryArgs :
database
Title : databaseUsage : $db = $obj->database();Function : returns the database used in this searchReturns : database used for searchArgs :
number_of_iterations
Title : number_of_iterationsUsage : $total_iterations = $obj-> number_of_iterations();Function : returns the total number of iterations used in this searchReturns : total number of iterations used for searchArgs : none
pattern
Title : databaseUsage : $pattern = $obj->pattern();Function : returns the pattern used in a PHIBLAST search
query_pattern_location
Title : query_pattern_locationUsage : $qpl = $obj->query_pattern_location();Function : returns reference to array of locations in the query sequenceof pattern used in a PHIBLAST search
round
Title : roundUsage : $Iteration3 = $report->round(3);Function : Method of retrieving data from a specific iterationExample :Returns : reference to requested Iteration object or null if argumentis greater than total number of iterationsArgs : number of the requested iteration
_preprocess
Title : _preprocessUsage : internal routine, not called directlyFunction : determines number of iterations in report and preparesdata so individual iterations canbe parsed in non-sequentialorderExample :Returns : nothing. Sets TOTAL_ITERATION_NUMBER in object's hashArgs : reference to calling object