[Bioperl-l] Problem in getting sbjctseq using remote Blast

Sonmitra Mondal sonmitra at gmail.com
Fri Apr 7 04:04:20 EDT 2006


I am having problem while running Remote blast program for getting
hsp->sbjctseq . Rest of the program is running properly , but when we
want to fetch that sequence following error is generating
.-------------------- WARNING ---------------------
MSG: <HTML>
<HEAD><TITLE>An Error Occurred</TITLE></HEAD>
<BODY>
<H1>An Error Occurred</H1>
502 Bad Gateway
</BODY>
</HTML>

---------------------------------------------------
Error return code for BlastID code 1144396008-25960-52288961349.BLASTQ4 ...


I am using the following code :
use Bio::Perl;
use Bio::Tools::Run::RemoteBlast;

use Bio::SearchIO;

open (fh,">result.txt");
my (@params, $remote_blast_object, $blast_file, $r, $rc, $database);
my $sleep_time = 2;
$database = 'swissprot';
@params = (-prog=>'blastp', -data=>'swissprot', -expect=>'1e-10');
$remote_blast_object = Bio::Tools::Run::RemoteBlast->new(@params);
$blast_file = Bio::Root::IO->catfile("roa1.fasta");
$r = $remote_blast_object->submit_blast( $blast_file);
while ( my @rids = $remote_blast_object->each_rid ) {
foreach my $rid ( @rids ) {
my$rc = $remote_blast_object->retrieve_blast($rid);
if(!ref($rc) ) { # $rc not a reference => error or job not yet finished
if( $rc < 0 ) { $remote_blast_object->remove_rid($rid);
print "Error return code for BlastID code $rid ... \n";}
sleep $sleep_time; if ($sleep_time < 120) {$sleep_time *= 2;}
} else {
$sleep_time = 2;
$remote_blast_object->remove_rid($rid);
my $count = 0;
my $index=1;
while( my $res = $rc->next_result ) {
$count++;
#print "result db is ", $res->database_name(), "\n";


while( my $hit = $res->next_hit()) {


print fh $hit->name();
#print $hit->name(),"\t",$hit->description()," \t";
while( my $hsp = $hit->next_hsp ) {
#print "\t",$hsp->bits,
print  $hsp->evalue, "\t",$hsp->score;
print  "\n",$hsp->sbjctseq;
#print fh "\n", $hsp->match;
#print fh "\n", $hsp->positive;
}
print fh "\n";
}
close(fh);
}
}
}
}
-----------------------------------------------------------------------------------------------------------------

I am facing also another problem . When i am changing the parameter -
program as 'tblastn' , there's no output .



More information about the Bioperl-l mailing list