[Bioperl-l] RemoteBlast with ASP
Aun Ja
aun_ok@yahoo.com
Fri, 17 May 2002 02:36:55 -0700 (PDT)
Hi all;
I 've run the example of using RemoteBlast with
ActivePerl. It works well, so I changed this code a
litte bit to be a cgi-script. It 's still working.
However, when I changed it to be an ASP program (using
PerlScript), this code didn't work.
It displayed only a message "waiting".
Any suggestions would be appreciate.
Please advise.
Aun
CODE example
--------------------------------------------------------
use Bio::Tools::Run::RemoteBlast;
use Bio::DB::SwissProt;
my $database = new Bio::DB::SwissProt;
my $query = $database->get_Seq_by_id('TAUD_ECOLI');
my $factory = Bio::Tools::Run::RemoteBlast->new(
'-prog' => 'blastp',
'-data' => 'swissport',
_READMETHOD => "Blast"
);
my $blast_report = $factory->submit_blast($query);
while ( @rids = $factory->each_rid ) {
# print "waiting...\n";
$Response->Write("<p>Waiting");
foreach my $rid ( @rids ) {
my $rc = $factory->retrieve_blast($rid);
if( !ref($rc) ) {
if( $rc < 0 ) {
# retrieve_blast returns -1 on error
$factory->remove_rid($rid);
# $Response->Write("<p>error Waiting");
}
# retrieve_blast returns 0 on 'job not finished'
sleep 5;
#$Response->Write("Sleep Waiting");
} else {
#---- Blast done ----
$factory->remove_rid($rid);
my $result = $rc->next_result;
$Response->Write( "database ");
while( my $hit = $result->next_hit ) {
$Response->Write(
$result->database_name());
$Response->Write( "hitname : ");
$Response->Write( $hit->name);
$Response->Write( "score :");
while( my $hsp = $hit->next_hsp ) {
$Response->Write( $hsp->score);
}
}
}
}
}
%>
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com