[Bioperl-l] bl2seq

Mark A. Jensen maj at fortinbras.us
Fri Mar 20 10:22:03 EDT 2009


I'm not sure where the methods you are using to access the
report and its hits came from (commented section below),
but the replacement code below works for me.

Note that the blast report is structured as follows:

$report (is-a 'Bio::SearchIO::blast'), which contains
  $result (is-a 'Bio::Search::Result::BlastResult'), which contains
    $hit (is-a 'Bio::Search::Hit::BlastHit'), which contains
      $hsp (is-a 'Bio::Search::HSP::GenericHSP')

So as a professor (David Wollkind) of mine once said,
you have to peel away the players until you find the
one with the ball. Note there are many accessors on
the B:S:H:G object where the interesting stuff resides.

I'll put this up as a Scrapbook entry soon.


# while(my $hsp = $report->next_feature) {
#   print "homology seq :\n",  $hsp->homologySeq, "\n";
#   print "sbjctSeq :\n",  $hsp->sbjctSeq, "\n";}

while (my $result = $report->next_result) {
    print "Query: ".$result->query_name."\n";
    while (my $hit = $result->next_hit) {
 while ($hsp = $hit->next_hsp) {
     print $hsp->algorithm, ": identity ", 100*$hsp->frac_identical,
       "\%, rank ", $hsp->rank, " (E:", $hsp->evalue, ")\n";
     printf("%7s: %s\n", "subj", $hsp->query_string);
     printf("%7s: %s\n", "", $hsp->homology_string);
     printf("%7s: %s\n", "hom", $hsp->hit_string);
     print "\n";
    print "\n";

----- Original Message ----- 
From: shweta kagliwal
To: Mark A. Jensen
Sent: Friday, March 20, 2009 7:52 AM
Subject: Re: [Bioperl-l] bl2seq

Hello Sir,
That comment was because I inserted an extra line which not in the priginal 
The problem is not with that line.
I cant figure out the problem.
somewhere I read that Bio::SearchIO::blast is not supported now.
Thanks for the response.

On Wed, Mar 18, 2009 at 9:04 AM, Mark A. Jensen <maj at fortinbras.us> wrote:

Looks like the "use Bio::SearchIO::blast;" statement is commented out. Put it 
back in and give it a try.
----- Original Message ----- From: "shweta kagliwal" <shwetakagliwal at gmail.com>
To: <bioperl-l at bioperl.org>
Sent: Tuesday, March 17, 2009 7:01 AM
Subject: [Bioperl-l] bl2seq

I want to carry out pairwise blast using bl2seq program in bioperl. I have
installed bioperl-1.5.9.
I have also installed standalone blast from ncbi ftp in my perl/bin folder.
But when I run the attached script I get the following error-

cant locate method "next feature" via package "Bio:SearchIO:blast" at
bl2seq1.pl  line 20, <GEN2> line 1.
Error removing C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\qPx195u5TQ at
c:/perl/site/lib/File/Temp.pm line 890.

I cant get the error. Please help me.


Bioperl-l mailing list
Bioperl-l at lists.open-bio.org

More information about the Bioperl-l mailing list