[Bioperl-l] Re: blastall call --- cannot find index files for databases

Peter Kos kos@rite.or.jp" <kos@rite.or.jp
Sun, 5 May 2002 19:44:09 +0900


Haifeng,

sorry for the stupid idea: are you sure, that there is no mistake in 
your script with respect to protein/DNA? You get this error message 
not only if there is no database there with the given name, but also 
if you query a DNA database as it were protein (like blastp, blastx 
or tblastx) or the way around, so the index file with the given 
extension is not found. It is quite easy to miss out the -pF option 
of the formatdb, or to make some similar mistake that is too trivial 
to be easy to recognize when you are looking for something 
complicated.

On the other hand, however, blastall works fine for me both alone and 
within StandAloneBlast without any tricks, so I suspect that the 
problem may not be at that point.
(I think your .nbirc file and ENV values are all right too.)
On the contrary, the BLASTDATADIR (or whatever it is called) gets 
inserted in front of the database name, no matter what. If I put a 
path in front of the database name, then it will be there, followed  
 by the BLASTDATADIR, so I just can not get rid of the latter, 
therefore I have to generate my temporary databases in that directory 
if I do not want to always change the ENV variables (which is not a 
bad idea, I will try, thank you).

Regards
Peter

On Saturday, May 04, 2002 11:30 AM, Liu Haifeng 
[SMTP:lhaifeng@dso.org.sg] wrote:
> Sorry, it still doest not work.  Actually, theres is no problem 
when
> I use
> "blastall -p blastn" to query nucleotide sequences in my bio-perl
> script.
>
> Regards
> Haifeng
> ----- Original Message -----
> From: "Jason Stajich" <jason@cgt.mc.duke.edu>
> To: "Liu Haifeng" <lhaifeng@dso.org.sg>
> Cc: <bioperl-l@bioperl.org>
> Sent: Friday, May 03, 2002 8:20 PM
> Subject: Re: [Bioperl-l] blastall call --- cannot find index files
> for
> databases
>
>
> > 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
> >