[Bioperl-l] cannot find path to blastall

Jason Stajich jason.stajich at duke.edu
Wed Jun 22 09:45:31 EDT 2005


It looks like you are completely resetting the PATH variable - you  
probably want to append that.
Alternatively, you can also say

BEGIN {
     ENV{'BLASTDIR'} = '/path/to/BLAST/dir';
}
use Bio::Tools::Run::StandAloneBlast;


I think you want the BEGIN block in this instance before the use stmt  
to insure the variable is set before the module is included (as we  
setup some of that stuff at include time since those initializations  
are also in a BEGIN block).

-jason

On Jun 22, 2005, at 3:22 AM, Laurent DOUCHY wrote:

> hum ... sory but you must replace the path to blast program. I think
> that the database path is important to.
>
> #!/usr/bin/perl
>
> use strict;
> use Bio::SeqIO;
> use Bio::Tools::Run::StandAloneBlast;
>
>
> BEGIN
> {
> $ENV{PATH}=":yourPath/Blast/blast-2.2.10/bin/:";
> }
>
> my $Seq_in = Bio::SeqIO->new (-file
> =>"/home/hafiz/bioperl/fasta", -format => 'fasta');
> my $query = $Seq_in->next_seq();
>
> my $factory =
> Bio::Tools::Run::StandAloneBlast->new('program'  =>
> 'blastp',
>
> 'database' => 'yourPath/ecoli.nt',
>
> _READMETHOD => "Blast"
>                                                  );
> my $blast_report = $factory->blastall($query);
> my $result = $blast_report->next_result;
>
> while( my $hit = $result->next_hit()) {
>    print "\thit name: ", $hit->name(), "
> significance: ",
>
> $hit->significance(), "\n";}
>
>
>
> 2005/6/22, hafiz yusof <khufaz83 at yahoo.com>:
>
>> i have done running this code, and i getting this
>> error;
>>
>> -------------------- WARNING ---------------------
>> MSG: cannot find path to blastall
>> ---------------------------------------------------
>> Can't call method "next_result" on an undefined value
>> at blast1.pl line 22, <GEN0> line 1.
>> BEGIN failed--compilation aborted at blast1.pl line
>> 29.
>>
>>
>> #!/usr/bin/perl
>>
>> use strict;
>> use Bio::SeqIO;
>> use Bio::Tools::Run::StandAloneBlast;
>>
>> BEGIN
>> {
>>
>> $ENV{PATH}=":/home/bioinfo/Laurent/Utils/Blast/blast-2.2.10/bin/:";
>>
>> my $Seq_in = Bio::SeqIO->new (-file
>> =>"/home/hafiz/bioperl/fasta", -format => 'fasta');
>> my $query = $Seq_in->next_seq();
>>
>> my $factory =
>> Bio::Tools::Run::StandAloneBlast->new('program'  =>
>> 'blastp',
>>
>> 'database' => 'ecoli.nt',
>>
>> _READMETHOD => "Blast"
>>                                                   );
>> my $blast_report = $factory->blastall($query);
>> my $result = $blast_report->next_result;
>>
>> while( my $hit = $result->next_hit()) {
>>     print "\thit name: ", $hit->name(), "
>> significance: ",
>>
>> $hit->significance(), "\n";}
>>
>> }
>>
>> --- Laurent DOUCHY <l.douchy at gmail.com> wrote:
>>
>>
>>> try with this on the top of your code.
>>>
>>> #!/usr/bin/perl
>>>
>>> use strict;
>>> use Bio::SeqIO;
>>> use Bio::Tools::Run::StandAloneBlast;
>>>
>>> BEGIN
>>> {
>>>
>>>
>>>
>> $ENV{PATH}=":/home/bioinfo/Laurent/Utils/Blast/blast-2.2.10/bin/:";
>>
>>> }
>>>
>>> ...
>>>
>>> 2005/6/22, hafiz yusof <khufaz83 at yahoo.com>:
>>>
>>>> I'm trying to set up a standalone blast and I'm
>>>> getting an error message;
>>>>
>>>> MSG: cannot find path to blastall
>>>>
>>>> and i have running this code under Linux and i
>>>>
>>> also
>>>
>>>> haven't find blastall file in /usr/local/bin/,
>>>>
>>> what
>>>
>>>> should i do?
>>>>
>>>> code:
>>>>
>>>> #!/usr/bin/perl
>>>>
>>>> use strict;
>>>> use Bio::SeqIO;
>>>> use Bio::Tools::Run::StandAloneBlast;
>>>>
>>>> my $Seq_in = Bio::SeqIO->new (-file
>>>> =>"/home/hafiz/bioperl/fasta", -format =>
>>>>
>>> 'fasta');
>>>
>>>> my $query = $Seq_in->next_seq();
>>>>
>>>> my $factory =
>>>> Bio::Tools::Run::StandAloneBlast->new('program'
>>>>
>>> =>
>>>
>>>> 'blastp',
>>>>
>>>> 'database' => 'ecoli.nt',
>>>>
>>>> _READMETHOD => "Blast"
>>>>
>>>>
>>> );
>>>
>>>> my $blast_report = $factory->blastall($query);
>>>> my $result = $blast_report->next_result;
>>>>
>>>> while( my $hit = $result->next_hit()) {
>>>>     print "\thit name: ", $hit->name(), "
>>>> significance: ",
>>>>
>>>> $hit->significance(), "\n";}
>>>>
>>>> Send instant messages to your online friends
>>>>
>>> http://uk.messenger.yahoo.com
>>>
>>>> _______________________________________________
>>>> Bioperl-l mailing list
>>>> Bioperl-l at portal.open-bio.org
>>>>
>>>>
>>>
>>>
>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>>
>>>>
>>>>
>>>
>>>
>>
>> Send instant messages to your online friends http:// 
>> uk.messenger.yahoo.com
>>
>>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
http://www.duke.edu/~jes12/




More information about the Bioperl-l mailing list