[Bioperl-l] standaloneblast executable location?

Wes Barris wes.barris at csiro.au
Thu Nov 13 18:02:24 EST 2003


Hi,

I am using Bio::Tools::Run::StandAloneBlast.  The only thing that I have
been having trouble with is telling it where my "blastall" executable
is located.  If I set this environment variable outside of the bioperl
script it works:

setenv BLASTDIR /usr/local/blast2.0

However, I want this script to be self contained and have everything set
from inside the script.  I have tried the following inside the script,
but none of them work:

BEGIN {$ENV{'BLASTDIR'} = '/usr/local/blast2.0';}

$ENV{'BLASTDIR'} = '/usr/local/blast2.0';

my $PROGRAMDIR = '/usr/local/blast2.0';

In all cases (unless I set the BLASTDIR outside of the script), I get
this error:

-------------------- WARNING ---------------------
MSG: cannot find path to blastall
---------------------------------------------------

Here is a portion of my code:

#!/usr/local/bin/perl -w
#
use strict;
use Bio::Tools::Run::StandAloneBlast;
#BEGIN {$ENV{'BLASTDIR'} = '/usr/local/blast2.0';}
#my $PROGRAMDIR = '/usr/local/blast2.0';
my $usage = "Usage: $0 <fasta.txt>\n";
my $infile = shift or die $usage;
my $seq_in = Bio::SeqIO->new(-format=>'fasta', -file=>$infile);
my $seq = $seq_in->next_seq;
my @params = (
         'program'  => 'blastn',
         'database' => '/htdocs/db/blast/refseq',
         );
my $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
my $blast_result = $factory->blastall($seq);

-- 
Wes Barris
E-Mail: Wes.Barris at csiro.au




More information about the Bioperl-l mailing list