[Bioperl-l] remoteblast doesn't save the Output File

Hubert Prielinger hubert.prielinger at gmx.at
Thu Dec 1 17:49:21 EST 2005


Hi,
I'm quite desperated, because since two days I'm trying to save my 
remoteblast Output and it doesn't work
here we go....

#!/usr/bin/perl -w

use strict;
use warnings;
use Bio::SeqIO;
use Bio::Tools::Run::RemoteBlast;
use Bio::Seq;
use IO::String;
use Bio::SearchIO;



my $prog = 'blastp';
my $db   = 'swissprot';
my $e_val= '20000';
my $matrix = 'PAM30';
#my $outfile = 'Output';

my @data;
my $line_dataArray;
my $rid;
my $count = 1;


my @params = ( '-prog' => $prog,
                '-data' => $db,
                '-expect' => $e_val,
                '-matrix' => $matrix);

               

my $seqio_obj = Bio::SeqIO->new(-file => "Perm.txt",
                                -format => "raw",
                                 );


print "entering blast....";
    my $factory = Bio::Tools::Run::RemoteBlast->new (@params);
    print "Blast entered successfully \n";


 
   

while( my $query = $seqio_obj->next_seq ) {
           print "submit Sequence...just do it....\n";
            my $r = $factory->submit_blast($query);
            print $query->seq;
            print "\n";
        

   # Wait for the reply and save the output file
    print "entering while loop for saving Output.... \n";
    while ( my @rids = $factory->each_rid ) {
    foreach my $rid ( @rids ) {
        my $rc = $factory->retrieve_blast($rid);
       
        print "retrieved Results successfully \n";
       if( !ref($rc) ) {
            if( $rc < 0 ) {
                $factory->remove_rid($rid);
            }
            sleep 5;
       } else {
           #my $result = $rc->next_result;
           print $rid;
           print "\n";
             
           
            my $filename = " $count .out";
            $factory->save_output($filename);
            print "File saved successfully \n";
            $count++;
            $factory->remove_rid($rid);
        #    }
        }
    }
    print "\n";
    print "\n";

   

   
    }
}

I hope somebody can help me, thanks in advance

sincereley
Hubert



More information about the Bioperl-l mailing list