[Bioperl-l] Regarding RemoteBlast: Getting error "Cannot accept request, error code: -103"

Chris Fields cjfields at illinois.edu
Thu Jul 22 21:52:15 EDT 2010


Removing this line from your original script worked for me:

$Bio::Tools::Run::RemoteBlast::HEADER{'SERVICE'} = 'blastx';

This is set via '-prog' parameter.

chris

On Jul 22, 2010, at 7:30 PM, sheetal gosrani wrote:

> Yes the error is still occurring. I have emailed to Blast-help as well and they have to say that "there is something wrong with the URL, didn't give any specifics". 
> 
> Also changing the parameter SERVICE to 'plain' (by default it is set to plain, I guess this value is for standard blast pgm. like blastp, blastx, etc) gives me this error :
> An error has occurred on the server, The server is unable to format right now, please try again in a few minutes. If the problem (Informational Message: No alias or index file found for protein database [nr/nt] in search path [/export/home/splitd/blastdb/blast1:/blast/db/disk.blast/blast1::]) persists - Contact Blast-help at ncbi.nlm.nih.gov and include your RID: 4H2Y96KZ012 I have sent an email today to blast-help for this error.
> 
> Adding below the email conversation with blast-help for debugging further :
> On Thu, Jul 22, 2010 at 6:20 AM, Wayne Matten <mattenw at mail.nih.gov> wrote:
> Sheetal,
> 
> You are right about the query syntax, but your URL has some errors. The URL below works; note that order of parameters does not matter.
> 
> Best regards,
> Wayne
> 
> http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?QUERY=%3EContig_236+%0A%0DAATCTGTTCCTGTTTTTTGAGCCCCTGGCGGGCAAACGGCATGCCAGGTCAGCGAGCGGCGCACGAAGGTGGATTGGGCCCACGCCATGCGTCATCTGGCCGATGAACTGTACCCAGAGGCAGACGTGATCGTTGTGGTGATGGACAATCTGAACCCGCACAGCCCGGCTTCCTTCTCCGAGGCATTCGAGCCCGCCGAGGCGCAACGGCTCCGAGCACGCTTCGCGTTCCACTCCACGCCCAAGCACGGCAGTTGGCTGAATATGGCCGAGATTGAATTGCGTGCCTTGGTGAGAAGCTGCCTGAATCGCCGGATTCCAGACCAGGCCACCCTGCATCGGGAGGTCCAGGCATGGGTGGAGGAGCGGAACCAAAAAGCCGTCCGAGTAGACTGGCGTTTCACCACCGCCAATGCCCGCATGAAACTGAAACATTTGTATCCAAAGATTCATGCTTGACAGAGTACTAGaCCTGACCAAACTGGaKCWWCaSCWTTCCATATCCGAGGGCTTCAGTCCGACGGCTCGCGCGGGATAGCGGATTTAATGCTCAATCTCCATCGAGCCCGACGGCTCGTGCGGGATAGCGGATTATAGCGGTTCTCAGATACGTTGACTCCTGTCCGGGTCTGCCGTGTCGTGCGAGGCGCCCGTTTCCGCCACGCGCTCAGGGAGGGCTTATGGTCTTTGAGTAAATAATCCGCCATAGCCCGCGCAGGCGGGCTTTGCATTCCATAGCCGCGGGCTTATGGTCTTTGAATAAATAATCCGCTACAGCCCGCGCAGGCGGGCTTCGCCTTGGCTAGCCGAGGGCTTCAGCCCCACGGCTAGCGCGGGATAGCAGAATAAATTCTCAATCTCCATTAGCCCCACGGCAAGGGCGTATACCGGATTTATTTCTCAATCTCCATCAGCCCGCACGCGCGGAGTCGCGCCCGCAGTTCTCAGATGCGTTGACCCTTGTCCGGGTCTGCTGTGTCGCACAAGGCGCCCGCTTCCGCTGCGCTCCCCATCTCCGCGCCTCCTCGCCTCCGCGTGAGCCGGTCTGATGCATGCGGAGACGCAGAGCACACGGAGAGATGGCGCACAAGGCGTCTGCTTTCGCTGGCGTGTTCaAcCCTGTCCAACAAGACCAATATTTAGTGAGAACTGCTATATTTCTCACATATATCGGCAGCGTCAGCGAAGCGGTGATTGTGCAGACGGACGCTGCCGGACGACCGCAGGCGCTGGTAACGATGAGCCGGTCGGGTATTGCGCCTGGGTTTGTAACGCGCGGCGAACCCGGTCTGCTTCTTGCGGCAACAGYGTGTCCACCTGTGTCTGCAAAGCTCGACGAACGCTGTCACTCCCTTCACGCAGCCaatAAtcgTATATCTGTTTCTTCAACGCTTGACGAACTTTATCCTCTTCTTGAGACAGGAACTCGTTCACCCGGCTTTGCAACGCATGGCGAACGTCGCTTTCCGCCTGACTCAGCTGACTCTTTACCCGATCTTGCAACGCCGCGCGGAATTGGCTTTCCGTTTGACGCATCAAATCATTCATCTTTGCCTGGAACGCCTGGAGCCATTCACTCTTTACTTGATCCAACAGCTCTGCAGCGTGATTCTGCAATGTCTCGTGAACCCGGTCTTGCTCTTGCTCCAGTAGCGCTGCAACCTGGGTCTGTAATGCGCTGCGGACGTCACCCTTCTCTTGACGTACCAGTTCTGT&DATABASE=nr&COMPOSITION_BASED_STATISTICS=off&EXPECT=1e-10&CMD=Put&FILTER=L&PROGRAM=blastx&ALIGNMENTS=50&FORMAT_OBJECT=Alignment&DESCRIPTIONS=100&FORMAT_TYPE=Text
> 
> On Jul 21, 2010, at 2:57 PM, sheetal gosrani wrote:
> 
> Thank you Wayne. I tried with the sequence beginning immediately after "QUERY=", (called as bare sequence) but still I get the same error.
> 
> The documentation on your URLAPI says that Query can have Accession(s), gi(S) or FASTA sequence. The format of the query for FASTA sequence is as shown:
> http://www.ncbi.nlm.nih.gov/BLAST/blastcgihelp.shtml Thus for FASTA sequence, the query has description/definition followed by actual sequence. In that case, the format of my POST request match the requirement.
> 
> Can you help me figure out why am I still getting error : "Cannot accept request, error code: -103" ? Attaching the log file having Query as bare sequence and FASTA sequence for your reference. Your help is much appreciated.
> 
> Thanks,
> Sheetal
> 
> On Wed, Jul 21, 2010 at 7:45 AM, Wayne Matten <mattenw at mail.nih.gov> wrote:
> Hello,
> 
> Our URLAPI, which your script should, but may or may not use, requires that the sequence begin immediately after "QUERY=". Your example shows a definition line preceding the sequence. You can get documentation on our URLAPI on this page (Web service interface):
> 
> http://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=DeveloperInfo
> 
> Best regards,
> Wayne
> 
> _~___~___~__~__~_~
> Wayne Matten, PhD
> NCBI Public Services
> mattenw at mail.nih.gov
> 
> 
> On Jul 20, 2010, at 4:49 PM, sheetal gosrani wrote:
> 
> Hello,
> 
> I am trying to use blastx program with 'nr' database in my Bioperl script remotely. While I do so, I get this error :
> Cannot accept request, error code: -103
> 
> The request that I send is :
> POST http://blast.ncbi.nlm.nih.gov/Blast.cgi User-Agent: bioperl-Bio_Tools_Run_
>> RemoteBlast/1.006001 Content-Length: 1945 Content-Type: application/x-www-form-urlencoded DATABASE=nr%2Fnt&QUERY=%3EContig_236+%0AAATCTGTTCCTGTTTTTTGAGCCCCTGGCGGGCAAACGGCATGTCCAGGTCAGCGAGCGGCGCACGAAGGTGGATTGGGCCCACGCCATGCGTCATCTGGCCGATGAACTGTACCCAGAGGCAGACGTGATCGTTGTGGTGATGGACAATCTGAACCCGCACAGCCCGGCTTCCTTCTCCGAGGCATTCGAGCCCGCCGAGGCGCAACGGCTCCGAGCACGCTTCGCGTTCCACTCCACGCCCAAGCACGGCAGTTGGCTGAATATGGCCGAGATTGAATTGCGTGCCTTGGTGAGAAGCTGCCTGAATCGCCGGATTCCAGACCAGGCCACCCTGCATCGGGAGGTCCAGGCATGGGTGGAGGAGCGGAACCAAAAAGCCGTCCGAGTAGACTGGCGTTTCACCACCGCCAATGCCCGCATGAAACTGAAACATTTGTATCCAAAGATTCATGCTTGACAGAGTACTAGaCCTGACCAAACTGGaKCWWCaSCWTTCCATATCCGAGGGCTTCAGTCCGACGGCTCGCGCGGGATAGCGGATTTAATGCTCAATCTCCATCGAGCCCGACGGCTCGTGCGGGATAGCGGATTATAGCGGTTCTCAGATACGTTGACTCCTGTCCGGGTCTGCCGTGTCGTGCGAGGCGCCCGTTTCCGCCACGCGCTCAGGGAGGGCTTATGGTCTTTGAGTAAATAATCCGCCATAGCCCGCGCAGGCGGGCTTTGCATTCCATAGCCGCGGGCTTATGGTCTTTGAATAAATAATCCGCTACAGCCCGCGCAGGCGGGCTTCGCCTTGGCTAGCCGAGGGCTTCAGCCCCACGGCTAGCGCGGGATAGCAGAATAAATTCTCAATCTCCATTAGCCCCACGGCAAGGGCGTATACCGGATTTATTTCTCAATCTCCATCAGCCCGCACGCGCGGAGTCGCGCCCGCAGTTCTCAGATGCGTTGACCCTTGTCCGGGTCTGCTGTGTCGCACAAGGCGCCCGCTTCCGCTGCGCTCCCCATCTCCGCGCCTCCTCGCCTCCGCGTGAGCCGGTCTGATGCATGCGGAGACGCAGAGCACACGGAGAGATGGCGCACAAGGCGTCTGCTTTCGCTGGCGTGTTCaAcCCTGTCCAACAAGACCAATATTTAGTGAGAACTGCTATATTTCTCACATATATCGGCAGCGTCAGCGAAGCGGTGATTGTGCAGACGGACGCTGCCGGACGACCGCAGGCGCTGGTAACGATGAGCCGGTCGGGTATTGCGCCTGGGTTTGTAACGCGCGGCGAACCCGGTCTGCTTCTTGCGGCAACAGYGTGTCCACCTGTGTCTGCAAAGCTCGACGAACGCTGTCACTCCCTTCACGCAGCCaatAAtcgTATATCTGTTTCTTCAACGCTTGACGAACTTTATCCTCTTCTTGAGACAGGAACTCGTTCACCCGGCTTTGCAACGCATGGCGAACGTCGCTTTCCGCCTGACTCAGCTGACTCTTTACCCGATCTTGCAACGCCGCGCGGAATTGGCTTTCCGTTTGACGCATCAAATCATTCATCTTTGCCTGGAACGCCTGGAGCCATTCACTCTTTACTTGATCCAACAGCTCTGCAGCGTGATTCTGCAATGTCTCGTGAACCCGGTCTTGCTCTTGCTCCAGTAGCGCTGCAACCTGGGTCTGTAATGCGCTGCGGACGTCACCCTTCTCTTGACGTACCAGTTCTGT&COMPOSITION_BASED_STATISTICS=off&EXPECT=1e-10&SERVICE=blastx&ALIGNMENTS=50&FORMAT_OBJECT=Alignment&CMD=Put&FILTER=L&DESCRIPTIONS=100&FORMAT_TYPE=Text&ALIGNMENT_VIEW=Pairwise&PROGRAM=blastx
>> 
>> Can you please help me debug it.
>> 
>> Thanks and Regards,
>> Sheetal
> 
> Thanks
> Sheetal
> 
> On Thu, Jul 22, 2010 at 4:54 PM, Chris Fields <cjfields at illinois.edu> wrote:
> The errors reported seem to indicate problems on the NCBI server, not problems with the script.  Is this still occurring?
> 
> chris
> 
> On Jul 21, 2010, at 4:49 PM, sheetal gosrani wrote:
> 
> > Adding some more details on OS and BioPerl version
> >
> > OS:
> > sheetal at sheetal-ubuntu:~/Setups/BioPerl-1.6.1$ uname -a
> > Linux sheetal-ubuntu 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58
> > UTC 2010 i686 GNU/Linux
> >
> > Perl :  v5.10.1 (*) built for i486-linux-gnu-thread-multi
> >
> > BioPerl Version :
> > sheetal at sheetal-ubuntu:~/Setups/BioPerl-1.6.1$ perl -MBio::Root::Version -e
> > 'print $Bio::Root::Version::VERSION,"\n"'
> > 1.006001
> >
> > Attached is the error that I get while running the RemoteBlast.
> >
> > Thanks,
> > Sheetal
> >
> > On Tue, Jul 20, 2010 at 5:30 PM, sheetal gosrani
> > <sheetu.piscean at gmail.com>wrote:
> >
> >> Hi,
> >>
> >> I am trying to run RemoteBlast to blastx sequences on 'nr' database. Here
> >> is the complete script :
> >> #Remote-blast "factory object" creation and blast-parameter
> >> initialization
> >>
> >> use Bio::Tools::Run::RemoteBlast;
> >> use strict;
> >> my $prog = 'blastx';
> >> my $db   = 'nr/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);
> >>
> >> $Bio::Tools::Run::RemoteBlast::HEADER{'SERVICE'} = 'blastx';
> >>
> >> #$v is just to turn on and off the messages
> >> my $v = 0;
> >>
> >> my $str = Bio::SeqIO->new(-file=>'davcg_small.fasta' , -format => 'fasta'
> >> );
> >>
> >> while (my $input = $str->next_seq()){
> >>   #Blast a sequence against a database:
> >>
> >>   #Alternatively, you could  pass in a file with many
> >>   #sequences rather than loop through sequence one at a time
> >>   #Remove the loop starting 'while (my $input = $str->next_seq())'
> >>   #and swap the two lines below for an example of that.
> >>   my $r = $factory->submit_blast($input);
> >>   #my $r = $factory->submit_blast('amino.fa');
> >>
> >>   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 ) {
> >>           print "removing rid as rc is < 0";
> >>           $factory->remove_rid($rid);
> >>         }
> >>         print STDERR "." if ( $v > 0 );
> >>         sleep 5;
> >>       } else {
> >>         my $result = $rc->next_result();
> >>         #save the output
> >>         print "saving to file";
> >>         my $filename = "contig_236.out"; #$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";
> >>           }
> >>         }
> >>       }
> >>     }
> >>   }
> >> }
> >>
> >> But when I run this, I get an error in html format which says "Cannot
> >> accept request, error code: -103". Attaching the error file for reference.
> >> Can you please help me with debugging this error? Your help is much
> >> appreciated.
> >>
> >> Also, informing about the previous error that I fixed by adding this line:
> >> $Bio::Tools::Run::RemoteBlast::HEADER{'SERVICE'} = 'blastx'; The error that
> >> I was getting prior to adding this line was :
> >> --------------------- WARNING ---------------------
> >> MSG: <hr><p id="blastErr"><font color="red">An error has occurred on the
> >> server, The server is unable to format right now, please try again in a few
> >> minutes.  If the problem  (Informational Message: No alias or index file
> >> found for protein database [nr/nt] in search path
> >> [/export/home/splitd/blastdb/blast0:/blast/db/disk.blast/blast1::]) persists
> >> -  Contact Blast-help at ncbi.nlm.nih.gov and include your RID:
> >> 4CF5MY9101P</font></p><hr>
> >>
> >> It kinda took me a while to find out the 2 requirements<http://www.bioperl.org/wiki/Module:Bio::Tools::Run::RemoteBlast>
> >>
> >> # 1) set your database like this:
> >> -database => 'cdsearch/cdd', # c.f. http://www.ncbi.nlm.nih.gov/staff/tao/URLAPI/remote_blastdblist.html for other cdd database options
> >>
> >>
> >> # 2) add this line before submitting the job:
> >> $Bio::Tools::Run::RemoteBlast::HEADER{'SERVICE'} = 'rpsblast';
> >>
> >> I think it will be great if you can add this to the synopsis section of
> >> RemoteBlast.pm
> >>
> >> Thanks,
> >> Sheetal
> >>
> > <log.html>_______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> 





More information about the Bioperl-l mailing list