[Bioperl-l] Re: [Bioperl-guts-l] blast/cgi question

Huizhuan Wu wuhuizhu at mail.eecis.udel.edu
Thu Jul 1 16:25:42 EDT 2004


hi, Jason:
    Thanks for your help. I added it in my script before the use stuff
after #!/usr/bin/bin/perl -w, the error msg is the same. When I added it
at the very first beginning of my script, I got a msg saying"The server
encountered an internal error or misconfiguration and was unable to
complete your request". Do you happen to know how to fix it? One thousand
thanks!
    Sophia

On Thu, 1 Jul 2004, Jason Stajich wrote:

> Because your website is not running under your uid it probably isn't
> seeing the .ncbirc file.
>
> You might try making sure the BLASTMAT env variable is set to wherever
> your ncbi 'data' directory /usr/local/BLAST/data probably.
>
> You can set it in your script by adding
>
> BEGIN {
>  $ENV{'BLASTMAT'} = '/usr/local/BLAST/data';
> }
> To your script up above all the module 'use' statements.
>
> On Thu, 1 Jul 2004, Huizhuan Wu wrote:
>
> > Hi,
> > 	I am new to Bioperl. Now I need to work on a website
> > that accepts a sequence from users and then a BioPerl script blast it
> > against a local db and prints out the result. The problem is my BioPerl
> > cgi script works fine locally (I set the params through commandline) but
> > doesn't work through web(error msg: blastall call crashed...). Do you
> > happen to know how to solve this?
> >
> >
> > 	The error msg I got:
> > MSG: blastall call crashed: 256 /usr/local/BLAST/blastall -p  blastn  -d
> > /Users/work/data.txt  -i
> > /tmp/ITPxjyt0zx  -e  1e-10  -o  blast.out  -F  F  -g  F  -W  17
> >
> > STACK Bio::Tools::Run::StandAloneBlast::_runblast
> > /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm:732
> > STACK Bio::Tools::Run::StandAloneBlast::_generic_local_blast
> > /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm:680
> > STACK Bio::Tools::Run::StandAloneBlast::blastall
> > /Library/Perl/5.8.1/Bio/Tools/Run/StandAloneBlast.pm:536
> > STACK toplevel /Users/wuhuizhuan/Sites/test/CGI-BIN/bl.cgi:50
> >
> >
> >  	Here is the code:
> > #!/usr/bin/perl -w
> >
> > # This script gets sequence from webpage and perform blastn
> > #against data.txt database.
> >
> > use strict;
> > use warnings;
> > use Getopt::Long;
> > use Bio::Tools::Run::StandAloneBlast;
> > use Bio::SeqIO;
> > use Data::Dumper;
> >
> > # HTML staff
> > print header;
> > print start_html("BLAST RESULT");
> > print h2("BLAST RESULT");
> >
> > # Variables
> > my ($query, $seq);
> > my $db = "/Users/work/data.txt";
> > my $maxEval = 1.0e-10;
> >
> >    my $seq = param('SEQUENCE');
> >    my $seqobj = Bio::Seq->new( '-display_id' => $query,
> >                                 '-seq' => $seq);
> >
> >     print Dumper($seqobj);
> >     my @params = ('program'=>'blastn', 'outfile'=>'blast.out',
> >                    '_READMETHOD'=>'Blast', 'F'=>'F','W'=>17,'g'=>'F');
> >
> >     my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
> >     $factory->e($maxEval);
> >     $factory->d($db);
> >     my $blast_report = $factory->blastall($seqobj);
> >     #my $result = $blast_report->next_result;
> >     print "$blast_report\n";
> >     print end_html;
> >
> >
> >
> >     regards,
> >     Sophia
> >
> > _______________________________________________
> > Bioperl-guts-l mailing list
> > Bioperl-guts-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-guts-l
> >
>
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu
>


More information about the Bioperl-l mailing list