[Bioperl-l] RemoteBlast not handling NCBI Error message
Chris Fields
cjfields at uiuc.edu
Tue Aug 21 16:15:36 UTC 2007
On Aug 21, 2007, at 10:20 AM, Jason Walker wrote:
> I've noticed RemoteBlast does not handle a specific error message from
> NCBI correctly. retrieve_blast() should return 0 if waiting, -1 on
> error, or the results when completed. It looks like the method relies
> on a specific tag in the NCBI return, 'QBlastInfoBegin'. The error
> message I'm getting does not have this tag or a value of
> 'Status=ERROR'. After contacting NCBI 'Blast-help', they stated that
> QBlastInfoBegin should not be expected from all GET requests. The
> error
> can be reproduced by using RID CM2YJJW501R, until it expires tomorrow.
> ...
> I added a conditional statement as seen below to correct my local
> copy.
> I'm not sure this is the best fix, but it works.
> sub retrieve_blast {
> ...
> if( /QBlastInfoBegin/i ) {
> $s = 1;
> } elsif( $s ) {
> if( /Status=(WAITING|ERROR|READY)/i ) {
> ...
> }
> } elsif( /^(?:#\s)?[\w-]*?BLAST\w+/ ) {
> $waiting = 0;
> last;
> } elsif ( /ERROR/i ) {
> close($TMP);
> open(my $ERR, "<$tempfile") or $self->throw("cannot open file
> $tempfile");
> $self->warn(join("", <$ERR>));
> close $ERR;
> return -1;
> }
> ...
> }
>
> Thanks,
> Jason Walker
I have added this to RemoteBlast in bioperl cvs. Thanks for the notice!
chris
More information about the Bioperl-l
mailing list