Question: Help With Bioperl Remote Blast Script (Bio::Tools::Run::Remoteblast)
gravatar for campbell.malachy
5.7 years ago by
campbell.malachy0 wrote:

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:

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"; }
perl blast • 2.7k views
ADD COMMENTlink written 5.7 years ago by campbell.malachy0
gravatar for dfornika
5.7 years ago by
Vancouver, British Columbia, Canada
dfornika1000 wrote:

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 COMMENTlink written 5.7 years ago by dfornika1000
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1565 users visited in the last hour