Bio::Tools:: BPlite::Iteration - object for parsing single iteration of a PSIBLAST report
use Bio::Tools:: BPpsilite; open 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... }
See the documentation for BPpsilite.pm for a description of the Iteration.pm module.
Email: schattner@alum.mit.edu
Based on work of: Ian Korf (ikorf@sapiens.wustl.edu, http://sapiens.wustl.edu/~ikorf), Lorenz Pollak (lorenz@ist.org, bioperl port)
BPlite.pm 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 Example : Returns : query object Args :
Title : qlength Usage : $len = $obj->qlength(); Returns : length of query Args : none
Title : newhits Usage : $newhits = $obj->newhits(); Returns : reference to an array listing all the hits from the current iteration which were not identified in the previous iteration Args : none
Title : oldhits Usage : $oldhits = $obj->oldhits(); Returns : reference to an array listing all the hits from the current iteration which were identified and above threshold in the previous iteration Args : none
Title : nextSbjct Usage : $sbjct = $obj->nextSbjct(); Function : Method of iterating through all the Sbjct retrieved from parsing the report Example : while ( my $sbjct = $obj->nextSbjct ) {} Returns : next Sbjct object or undef if finished Args :
To install Bio::Seq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Seq
CPAN shell
perl -MCPAN -e shell install Bio::Seq
For more information on module installation, please visit the detailed CPAN module installation guide.