I'm having a problem nailing down a problem trying to send a query to a web server and retrieving the results. I'm working with the Bio::Tools::Run::RemoteBlast bioperl module.

This is the portion of script where I believe the problem is coming from:

#create remote blast factory object and initialize blast parameters my $blast_factory = Bio::Tools::Run::RemoteBlast -> new ( '-prog' => 'blastn', '-data' => 'nr', '-expect' => '1e-10', '-readmethod' => 'SearchIO'); #loop over all sequences input and count how many sequences are found my $count = 0; while (my $seq = $seqio -> next_seq) { $count++; #loop to blast each sequence against the database my $job = $blast_factory -> submit_blast ($seq); print "Blasting sequence number $count\n"; #loop to load rids returned for the blast job submitted while (my @rids = $blast_factory -> each_rid) { #loop over rids to check server for a result foreach my $rid (@rids) { my $blast_results = $blast_factory -> retrieve_blast($rid); #check to see if a result object is returned if ( !ref($blast_results) ) { #if error returned remove rid from stack if ($blast_results == 0) { print STDERR "retrieve_blast returns 0\n"; #watch dots sleep 5; #pause between submitting requests to genbank server } elsif ($blast_results == (-1)) { print STDERR "retrieve_blast returns -1\n"; $blast_factory -> remove_rid($rid); } last if $blast_results == (-1); } #if result, use Bio::SearchIO to return Bio::SeqIO result object if ( ref($blast_results)) { print "Receiving blast results...\n"; my $result = $blast_results -> next_result(); $blast_factory -> remove_rid($rid); #remove rid from stack


The error message I get is this:

Blasting sequence number 1
-----WARNING-----
MSG:
-----------------------
retrieve_blast returns -1

Any ideas?

In reply to Problem retrieving results from web server by terriblue

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.