[Bioperl-l] RE: problem connecting to remote blast

010381P GOH PHUAY CHENG 010381P at nyp.edu.sg
Mon Sep 29 02:08:36 EDT 2003


hi,
i have already remove the entrez query part but i still encountered the same
warning. 

my codes:

#!/usr/bin/perl -w
use Bio::SeqIO;
use Bio::Tools::Run::RemoteBlast;
use strict;
  my $prog = 'blastn';
  my $db   = 'ecoli.nt';
  my $e_val= '1e-10';
  my @params = ( '-prog' => $prog,
         '-data' => $db,
         '-expect' => $e_val,
         '-readmethod' => 'SearchIO' );
  my $factory = Bio::Tools::Run::RemoteBlast->new(@params);
 
  #delete $Bio::Tools::Run::RemoteBlast::HEADER{'FILTER'};
  my $v = 1;  
  
  my $str = Bio::SeqIO->new(-file=>'test.txt' , '-format' => 'fasta' );
  while (my $input = $str->next_seq()){
    
    #my $r = $factory->submit_blast($input);
    my $r = $factory->submit_blast('test.txt');
    print STDERR "waiting..." if( $v > 0 );
    while ( my @rids = $factory->each_rid ) {
      foreach my $rid ( @rids ) {
        my $rc = $factory->retrieve_blast($rid);
        if( !ref($rc) ) {
          if( $rc < 0 ) {
            $factory->remove_rid($rid);
          }
          print STDERR "." if ( $v > 0 );
          sleep 5;
        } else {
          my $result = $rc->next_result();
          #save the output
          my $filename = $result->query_name()."\.out";
          $factory->save_output($filename);
          $factory->remove_rid($rid);
          print "\nQuery Name: ", $result->query_name(), "\n";
          while ( my $hit = $result->next_hit ) {
            next unless ( $v > 0);
            print "\thit name is ", $hit->name, "\n";
            while( my $hsp = $hit->next_hsp ) {
              print "\t\tscore is ", $hsp->score, "\n";
            }
          }
        }
      }
    }
  }

-------------------- WARNING ---------------------
MSG: <p><!--
QBlastInfoBegin
        Status=READY
QBlastInfoEnd
--><p>
<b><FONT color="red">INFO: [blastsrv4.REAL]: Error: Segmentation violation
(or m
emory usage limit was exceeded) SIGSEGV (11).
</FONT></B><p><HR><p>
<PRE>
BLASTN 2.2.6 [Apr-09-2003]

<pre>RID: 1064815728-21972-271666.BLASTQ3
Query= Test
         (560 letters)

<b>No significant similarity found.</b> For reasons why, <A HREF =
"/blast/blast
_FAQs.html#no hits"><b>click here</A>.</b><br><br>


---------------------------------------------------




-----Original Message-----
From:	Jason Stajich [mailto:jason at cgt.duhs.duke.edu]
Sent:	Mon 9/29/2003 9:32 AM
To:	010381P GOH PHUAY CHENG
Cc:	
Subject:	Re: problem connecting to remote blast

I suppose it might be because you specified an entrez query for homo
sapiens on the ecoli db - that is not going to return any hits.  remove
the entrez query part perhaps.

please post your questions to the bioperl list in the future -
bioperl-l at bioperl.org

Thanks,
-jason

On Mon, 29 Sep 2003, 010381P GOH PHUAY CHENG wrote:

> hi Jason,
> i encountered some problems running the remote blast.could u please check
for
> me wats wrong with my codes. Thanks.
>
> phuay cheng
>
> -------------------- WARNING ---------------------
> MSG: <p><!--
> QBlastInfoBegin
>         Status=READY
> QBlastInfoEnd
> --><p>
> <b><FONT color="red">INFO: [blastsrv4.REAL]: Error: Segmentation violation
> (or m
> emory usage limit was exceeded) SIGSEGV (11).
> </FONT></B><p><HR><p>
> <PRE>
> BLASTN 2.2.6 [Apr-09-2003]
>
> <pre>RID: 1064796976-1676-2574126.BLASTQ3
> Query= Test
>          (560 letters)
>
> <b>No significant similarity found.</b> For reasons why, <A HREF =
> "/blast/blast
> _FAQs.html#no hits"><b>click here</A>.</b><br><br>
>
>
> ---------------------------------------------------
>
> #!/usr/bin/perl -w
> use Bio::SeqIO;
> use Bio::Tools::Run::RemoteBlast;
>   use strict;
>   my $prog = 'blastn';
>   my $db   = 'ecoli.nt';
>   #my $e_val= '1e-10';
>   my @params = ( '-prog' => $prog,
>          '-data' => $db,
>          '-readmethod' => 'SearchIO' );
>   my $factory = Bio::Tools::Run::RemoteBlast->new(@params);
>
>   $Bio::Tools::Run::RemoteBlast::HEADER{'ENTREZ_QUERY'} = 'Homo sapiens
> [ORGN]';
>
>   delete $Bio::Tools::Run::RemoteBlast::HEADER{'FILTER'};
>   my $v = 1;
>
>   my $str = Bio::SeqIO->new(-file=>'test.txt' , '-format' => 'fasta' );
>   while (my $input = $str->next_seq()){
>
>     #my $r = $factory->submit_blast($input);
>     my $r = $factory->submit_blast('test.txt');
>     print STDERR "waiting..." if( $v > 0 );
>     while ( my @rids = $factory->each_rid ) {
>       foreach my $rid ( @rids ) {
>         my $rc = $factory->retrieve_blast($rid);
>         if( !ref($rc) ) {
>           if( $rc < 0 ) {
>             $factory->remove_rid($rid);
>           }
>           print STDERR "." if ( $v > 0 );
>           sleep 5;
>         } else {
>           my $result = $rc->next_result();
>           #save the output
>           my $filename = $result->query_name()."\.out";
>           $factory->save_output($filename);
>           $factory->remove_rid($rid);
>           print "\nQuery Name: ", $result->query_name(), "\n";
>           while ( my $hit = $result->next_hit ) {
>             next unless ( $v > 0);
>             print "\thit name is ", $hit->name, "\n";
>             while( my $hsp = $hit->next_hsp ) {
>               print "\t\tscore is ", $hsp->score, "\n";
>             }
>           }
>         }
>       }
>     }
>   }
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu






More information about the Bioperl-l mailing list