[Bioperl-l] Using Bioperl BLAST with a cgi script

Jason Stajich jason@cgt.mc.duke.edu
Fri, 10 Jan 2003 08:59:36 -0500 (EST)


Because your environment variables are different when running under a
webserver than when under your user account.
You can do this is in your code

BEGIN {
	$ENV{PATH} .= ":/path/to/your/blastall/directory";
}
Or with more recent versions of bioperl
$factory->executable('/path/to/your/blastall/exe');

Note that the PATH should include the DIRECTORY where blastall is
installed while the executable should include the full pat to where the
EXECUTABLE is installed.



On Fri, 10 Jan 2003 boileau@essi.fr wrote:

> Hi, i'm kind of new to Bioperl (and Perl also), but maybe someone out
> there will be able to answer my question. I have a script that does a
> blast. It works well when i use it as a simply script, but when I try to
> call as a cgi, it doesn't. The web server error message is "cannot find
> path to blastall".Below is the code of the script.
> Thanks to anyone who will be able to help me!
>
> William Boileau
>
>
> -- SCRIPT SOURCE --
>
> $table_cible = "Homo_sapiens.cdna.fa";
> $sequence_cible =
> 'GGCCCCTGCCAGGGCCCTGCTACATGCGAGCACTGTCCCCCAGGCCTGGGTACCAGTCCTCCTGGGCATCGAGGCCCATCTCCACAGCAGAGTATGCCCTCCTCTACCACACCCTGCAGGAAGCCACCAAGCCCCTGCATCAGTTCTTCCT';@params = ('database' => $table_cible, 'outfile' => 'blast.out',
> 'program' => 'blastn', 'b' => 1, '_READMETHOD'=>'Blast');
> $factory = Bio::Tools::Run::StandAloneBlast->new(@params);
>
> $input = Bio::Seq->new(-id=>"test query", -seq => $sequence_cible);
> $blast_report = $factory->blastall($input);
>
> $searchio = new Bio::SearchIO ('-format' => 'blast','-file' =>
> 'blast.out');
>
> $result = $searchio->next_result;
> @statnames = $result->available_statistics;
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu