[Bioperl-l] 1.01 RC2
Jason Stajich
jason@cgt.mc.duke.edu
Wed, 5 Jun 2002 20:29:15 -0400 (EDT)
When you find problems like this the easiest thing to do is look at the
code of the module, you'see see that we're setting the internal
class variables in the BEGIN block. You can always see the internals of
any module by typing
% perldoc -m MODULENAME
you may want to pipe this to a pager program like 'more' or 'less' so you
can scroll through the code.
The line:
$DATADIR = $ENV{'BLASTDATADIR'} || $ENV{'BLASTDB'} || '';
shows you how the module makes its choice about which variable to use. If
you have them both set, it is only going to default to the value of
BLASTDATADIR.
You have many options,
add the line
$Bio::Tools::Run::StandAloneBlast = $ENV{'BLASTDB'} || $ENV{'BLASTDATADIR'};
to your own script or you can set a hardcoded value here if you want your
script to be runnable by others in your group or a cronjob which may not
have their env variable set.
You can also specify the full path of the database in the parameter for
'database' setting the value to
'database => "$ENV{'BLASTDB'}/swissprot"
You may also want to set 'p' in your parameters, 'p' => 'blastp' as I
think that blast is no longer defaulting to blastp as that appears to be
what your warning is about below.
Cheers.
-jason
On Wed, 5 Jun 2002, Leonardo Marino-Ramirez wrote:
> Dear Jason,
>
> For a while I have been using the NHGRI::Blastall to run blast searches.
> I just noticed that the standalone bioperl blast module is not behaving as
> expected in an installation where the blast databases are not in the
> "data" directory.
>
> Here are my environmental variables:
>
> BLASTDB=/var/local/ncbi/seals/alias_db/blast
> BLASTDATADIR=/usr/local/ncbi_toolkit/ncbi/data/
> BLASTDIR=/usr/local/ncbi_toolkit/ncbi/build
>
> when I try to run a local search like this:
>
> #!/usr/bin/perl
>
> use Bio::Tools::Run::StandAloneBlast;
>
> @params = ('database' => 'swissprot','outfile' => 'blast1.out',
> '_READMETHOD' => 'Blast');
>
> $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
>
> $str = Bio::SeqIO->new(-file=>'test.aa' , '-format' => 'Fasta' );
> $input = $str->next_seq();
> $blast_report = $factory->blastall($input);
>
> print "$blast_report\n";
>
>
> I get the following:
>
> [blastall] ERROR: Program Name was not given an argument
> ------------- EXCEPTION -------------
> MSG: blastall call crashed: 256 blastall -d
> /usr/local/ncbi_toolkit/ncbi/data/swissprot -i /tmp/PBdI8YJauj -o
> blast1.out
>
> STACK Bio::Tools::Run::StandAloneBlast::_runblast
> /usr/lib/perl5/site_perl/5.6.1/Bio/Tools/Run/StandAloneBlast.pm:600
> STACK Bio::Tools::Run::StandAloneBlast::_generic_local_blast
> /usr/lib/perl5/site_perl/5.6.1/Bio/Tools/Run/StandAloneBlast.pm:567
> STACK Bio::Tools::Run::StandAloneBlast::blastall
> /usr/lib/perl5/site_perl/5.6.1/Bio/Tools/Run/StandAloneBlast.pm:456
> STACK toplevel standalone:12
>
> --------------------------------------
>
> What I get from this is that even if I tell StandAloneBlast that my
> BLASTDB is in /var/local/ncbi/seals/alias_db/blast is still looking in the
> BLASTDATADIR.
>
> Comments?
>
>
> On Wed, 5 Jun 2002, Jason Stajich wrote:
>
> > Release candidate 2 is available for download at
> > ftp://bioperl.org/pub/jason/bioperl-1.01-rc2.tar.gz
> >
> > This is a release candidate not a final release (although I hope it is
> > almost there). Please report any bugs or problems and give it test drive
> > on your system by at least running the tests. I'd like to release by the
> > end of the week or Monday of next week at the latest.
> >
> > --jason
> >
>
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu