in reply to perl - apache - winxp tmp dir???
Try setting the environment variable CLUSTALDIR to the directory where the clustalw program is installed — presumably, that environment variable is not set in the context of the webserver. For example, you could write in your Perl code (somewhere near the top):
BEGIN { $ENV{CLUSTALDIR} = 'C:/path/to/clustalw1.8/'; }
Reasoning: the above error message is generated by this code fragment from Bio/Tools/Run/Alignment/Clustalw.pm (in subroutine _run()):
my $commandstring = $self->executable." $command"." $instring". " -output=$output". " $param_string"; $self->debug( "clustal command = $commandstring"); my $status = system($commandstring); $self->throw( "Clustalw call ($commandstring) crashed: $? \n") unl +ess $status==0;
As it seems, $self->executable is empty/undefined, so that $commandstring begins with ' align' (the value of $command). As this isn't an executable, but rather a sub-command to the clustalw program, you're getting the generic error "align is not recognized as an internal or external command...", issued by the Windows command shell.
$self->executable is a method inherited from Bio::Tools::Run::WrapperBase (which itself is part of the BioPerl distribution). That method calls another method program_path(), which in turn needs the method program_dir(). The latter is abstract/virtual in WrapperBase.pm, but is implemented in Bio::Tools::Run::Alignment::Clustalw:
sub program_dir { return Bio::Root::IO->catfile($ENV{CLUSTALDIR}) if $ENV{CLUSTALDIR}; }
As you can see, it gets the directory from CLUSTALDIR... — The docs also talk about a variable $clustdir ("to install clustalw on your system, edit the variable $clustdir in Clustalw.pm to point to the clustalw program"), however, that variable doesn't seem to occur anywhere except in that phrase... OTOH, there's also this comment in the Clustalw.pm sources:
# You will need to enable Clustalw to find the clustalw program. This # can be done in (at least) two ways: # # 1. define an environmental variable CLUSTALDIR: # export CLUSTALDIR=/home/peter/clustalw1.8 # # 2. include a definition of an environmental variable CLUSTALDIR in # every script that will use Clustal.pm. # $ENV{CLUSTALDIR} = '/home/peter/clustalw1.8/';
Good luck!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl - apache - winxp tmp dir???
by julio_514 (Acolyte) on Feb 09, 2009 at 16:23 UTC | |
by julio_514 (Acolyte) on Feb 10, 2009 at 02:24 UTC |