Help With Bioperl Remote Blast Script (Bio::Tools::Run::Remoteblast)
1
0
Entering edit mode
11.6 years ago

Hi, I would like to run a blast search for a fasta file containing many (100+) seqences. I wrote a test script and ran it using a test query file (contains only one sequence; fh= diffexp1). If my code is right, the script should output the query name and the hit name in terminal. Although the script doesn't throw out any errors when I run it from command line, I don't get any output. I've let the program run for hours and still nothing. I'm using BioPerl-1.6.1 and Perl-5.16.1 on Ubuntu 12.04 LTS. Any help would be appreciated.

Here's the script:

#!/home/mack/bin/perl
use Bio::Tools::Run::RemoteBlast;
use Bio::SearchIO;


my $prog='blastn';
my $db='nr';
my $e_val='1e-10';
my $Input='diffexp1';
my @params = ('-prog' =>  $prog, '-data' =>  $db, '-expect' =>
$e_val, '-readmethod' => 'SearchIO');

my $factory = Bio::Tools::Run::RemoteBlast->new(@params);

$r =$factory->submit_blast($Input);
while (@rids =$factory->each_rid ){
    for $rid (@rids ){
      $rc =$factory->retrieve_blast($rid);
   }
}

my $report = Bio::SearchIO->new(-file =>$rc, -format =>'blast');
while (my $result = $report->next_result) {
    my $i=0;
    while (my $hit = $result->next_hit){
    print STDOUT $result->query_name, "\t";
    print STDOUT $hit->name, "\t";
    }
}
    if (i==0) {print STDOUT "No Hits \n"; }
blast perl • 4.3k views
ADD COMMENT
0
Entering edit mode
11.6 years ago
dfornika ★ 1.1k

This is a really unsophisticated suggestion, but you can toss a few simple print statements at various spots in the script where you think it may be hanging. That will at least help you to zero in on the line(s) that are causing the problem.

ADD COMMENT

Login before adding your answer.

Traffic: 1958 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6