[Bioperl-l] blastall call --- cannot find index files for
databases
Jason Stajich
jason@cgt.mc.duke.edu
Fri, 3 May 2002 08:20:28 -0400 (EDT)
On Fri, 3 May 2002, Liu Haifeng wrote:
> Hi,
>
> I just met another problem. I have used "formatdb -o T ..." to
> construct one protein database "mydbname" whose defline is like
> "gnl|sth|sthelse". It is ok if I directly perform blastall query in
> my linux console window. Howvever, if I perform a perl script which
> uses Bio::Tools::Run::StandAloneBLast to call blastall, then the
> program always crashes and shows "WARNING: Could not find index files
> for database mydbname ...". I have set $BLASTDATADIR in my .bashrc
> file.
You've just identified the problem - when blast is shelled out it uses
'sh' and the env variable is only set in your bash shell, it is not
propigated to th sh process.
options:
when you specify the db use the full path to the db i.e. in your perl
script you could use the shortcut that you know your
BLASTDATADIR contains the db
$factory->d($ENV{'BLASTDATADIR'}.'/databasename');
Put the env variable in your .profile or .login (at least I *think* this
might work).
>
> Could anyone help me to solve the problem?
>
> Regards
> Haifeng
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Haifeng Liu
> Ph.D., Member of Technical Staff
>
> IFL/DS
> DSO National Laboratories
> 20 Science Park Drive
> Singapore 118230
>
> Email: lhaifeng@dso.org.sg
> Tel: (65) 67728220
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu