[Bioperl-l] error while remote blast against swissprot db

DeeGee gdorjee at hotmail.com
Mon Apr 16 19:27:32 UTC 2007


hi Chris, 
sorry to bother you again, but could you plz check the following script to
see what's wrong. i've been getting errors like :

Content-type: text/html
Software error:
------------- EXCEPTION  -------------
MSG:   (0) not Bio::Seq object or array of Bio::Seq objects or file name!
STACK Bio::Tools::Run::StandAloneBlast::blastall
/usr/perl5/5.6.1/lib/Bio/Tools/Run/StandAloneBlast.pm:532
STACK toplevel /usr/local/apache2/htdocs/rmtest.pl:46
--------------------------------------

#### the script ######
#!/usr/bin/perl -w
use strict;
use warnings;

use Bio::SeqIO;
use Bio::SearchIO;
use Bio::DB::GenPept; 
use Bio::Tools::Run::StandAloneBlast;
use CGI;
use CGI::Carp qw(fatalsToBrowser);

my $cgi = new CGI;

print $cgi->header,
$cgi->start_html(-title=>'A StandAloneBlast Test'),
$cgi->h1('Blast Result'),
$cgi->start_form,
"Enter or paste an amino-acid sequence? ",
$cgi->p,
$cgi->textarea(-name=>'name', rows=>10, -columns=>60),
$cgi->p,
$cgi->submit,
$cgi->end_form,
$cgi->hr;

open(OUTPUT,">result/query.faa");

if ($cgi->param()) {
        my $seq = $cgi->param('name');
        print OUTPUT $seq;

my @params = ('program'=>'blastp', 'database' =>
'/export/home/dorjee/database/nrpart', 'outfile' => 'result/blast.out',
_READMETHOD => 'Blast');
my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);

# Blast a sequence against a database:
my $str = Bio::SeqIO->new(-file => "result/query.faa", '-format' => 'Fasta'
);
my $input = $str->next_seq();
my $blast_report = $factory->blastall($input);
}




Chris Fields wrote:
> 
> This sounds like a similar issue that popped up a few weeks ago  
> related to URLAPI changes for remote BLAST access.  That was fixed on  
> NCBI's end but I also added a fix to RemoteBlast in CVS that works as  
> well.
> 
> Saying that, my guess is the same as Dave's, that there are  
> connectivity issues.  What happens when you set the RemoteBlast  
> factory to a verbosity of 1?  This will spill out debugging output  
> from the repeated queries to the NCBI server (so if there are  
> problems they'll show up there).
> 
> ...
> my $factory = Bio::Tools::Run::RemoteBlast->new(
>                                  '-prog'  => 'blastp',
>                                  '-data' => 'swissprot',
>                                   _READMETHOD => "Blast",
>                                   -verbose => 1    # debugging output
>                           );
> ...
> 
> If you see the BLAST report but get the same error try using the  
> RemoteBlast in CVS to see if it fixes the problem.
> 
> chris
> 
> 
> On Apr 15, 2007, at 9:43 PM, David Messina wrote:
> 
>> You're right, it's not the input sequence. I just tried it with your
>> script and it worked.
>>
>>
>>> is it possible that the script is not being about to read the
>>> RemoteBlast.pm?
>>
>> I think the program wouldn't compile if that were the case, and your
>> error message would be about not finding RemoteBlast.pm rather than
>> the one you got.
>>
>>
>>> but the thing is, i can run the standalone blast on the
>>> command line, although i've never been able the run the same with
>>> cgi module
>>> (by gettting the input from an html textarea). i don't understand.
>>
>> This result really suggests that perl and Bioperl are not the issue.
>> I'm not saying the following to give you the brushoff, but given the
>> numerous ways in which web-based apps can fail and in which
>> webservers can be installed, it might be best for you to find someone
>> at your institution who can sit down with you and work through it.
>>
>> Dave
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> Christopher Fields
> Postdoctoral Researcher
> Lab of Dr. Robert Switzer
> Dept of Biochemistry
> University of Illinois Urbana-Champaign
> 
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> 

-- 
View this message in context: http://www.nabble.com/error-while-remote-blast-against-swissprot-db-tf3577674.html#a10022661
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.




More information about the Bioperl-l mailing list