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

Todd Richmond todd@andrew2.stanford.edu
Fri, 20 Jul 2001 14:31:21 -0700


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