[Bioperl-l] BLASTDATADIR, Standaloneblast, and CGI script

Jason Stajich jason@chg.mc.duke.edu
Sat, 21 Jul 2001 07:49:52 -0400 (EDT)


Todd - try putting your stmt in a BEGIN block for your cgi-script.

BEGIN {
$ENV{BLASTDATADIR} = 'yadda-yadda';
}

I suspect that the the StandAloneBlast is getting loaded before you set
the variable by some perlisms.  I think you can also override the internal
variable by setting
$Bio::Tools::Run::StandAloneBlast::DATADIR = 'yaddyadda';


I'm curious how performance is with this?  We're gearing up to add more
explict links to the ncbitoolkit in bioperl with the help from Jonathan
Epstein, and that may or may not improve performance for you as well.

-Jason


On Fri, 20 Jul 2001, Todd Richmond wrote:

> I'm having a problem with running Standaloneblast via a CGI script. When run
> from the command line as 'me' the perl script picks up the BLASTDIR and
> BLASTDATADIR locations normally from my shell environment. But the CGI
> script runs as 'www' and doesn't have those variables defined, so the blast
> defaults to a generic '/data/' directory to find the variables. When I try
> to set the database location explicitly
> 
> $aa_database = '/usr/local/ncbi/data/'
> $factory->d($aa_database);
> 
> Then that location is tacked on after the /data/ giving me
> 
> /data/usr/local/ncbi/data/
> 
> Which, of course, fails.
> 
> I tried setting the BLASTDATADIR at the beginning of the script:
> 
> $ENV{BLASTDATADIR} = '/usr/local/ncbi/data';
> 
> That didn't work (I'm not sure that it's supposed to...)
> 
> Any suggestions, other than hacking Standaloneblast.pm directly?
> 
> -- 
> Todd Richmond                    http://cellwall.stanford.edu/todd
> Carnegie Institution             email: todd@andrew2.stanford.edu
> Department of Plant Biology      fax: 1-650-325-6857
> 260 Panama Street                phone: 1-650-325-1521 x431
> Stanford, CA 94305
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

Jason Stajich
jason@chg.mc.duke.edu
Center for Human Genetics
Duke University Medical Center 
http://www.chg.duke.edu/