[Bioperl-l] parse psiblast reports

Peter Schattner schattner@alum.mit.edu
Fri, 19 Oct 2001 08:10:27 -0700


Geetha Vasudevan wrote:

> Hello:
>
> I am trying to parse psiblast reports for the HSPs of the query and the
> subject sequences. Is it possible to do this using BPpsilite ?
> something like $hsp->seq('query')->layout('fasta') and
> $hsp->('sbjct')->layout('fasta') which I find only in blast.pm and not
> for psiblast.

It is  possible to parse psiblast reports for the HSPs of the query and
the
subject sequences.

Syntax will look something like this:

  use Bio::Tools::BPpsilite;
  $report = new BPpsilite(-fh=>\*STDIN);
  $total_iterations = $report->number_of_iterations;
  $last_iteration = $report->round($total_iterations)
  while(my $sbjct =  $last_iteration ->nextSbjct) {
       $sbjct->name;
       while (my $hsp = $sbjct->nextHSP) {$hsp->score; }
  }

See bptutorial section III.4.3 (from which the above was taken) or,  for
more details, the synopsis and description sections of BPpsilite.pm and
BPpsilite::HSP.pm.

The layout subroutine, however, is not provided in BPpsilite.  If you want
to output a sequence in Fasta you will need to use SeqIO.pm

Peter Schattner