[Bioperl-l] StandAloneBlast.pm

Paul Boutros pcboutro@engmail.uwaterloo.ca
Mon, 30 Sep 2002 15:35:59 -0400 (EDT)


Hi all,

Here is a suggested change to StandAloneBlast to make it "windows
friendly".  In short:
- when the blast executable is added to %PROGRAMS the key is 'blastall'
for any OS other than windows.  For win32 though the key is 'blastall.exe'
- when _runblast is called, it looks for the key 'blastall', so I add a
line to check for windows-specific behaviour

I'm not sure why the .exe must be appended in win32 systems in the first
place -- it doesn't appear to require that on my system.  Regardless, this
change works for win2k & XP.  I can look for a win9x machine to test it
there if anybody is interested.  Regardless, this change is required on my
system for getting the module to work, so hopefully this will help some
other people.

The version I changed was:
# $Id: StandAloneBlast.pm,v 1.22 2002/07/06 23:53:36 jason Exp $

sub _runblast {
    my ($self,$executable,$param_string) = @_;
    if( $^O =~ /mswin/i) { $executable .= '.exe'; }  # CHECK IF WINDOWS OS
    my $blast_obj;
    if( ! defined $PROGRAMS{$executable} ) {
        unless (&Bio::Tools::Run::StandAloneBlast::exists_blast($executable)) {
            $self->warn("cannot find path to $executable");
            return undef;
        }
    }
    my $commandstring = $PROGRAMS{$executable} . $param_string;

In case anybody is actually curious about this, the error was better
explained in:
http://bioperl.org/pipermail/bioperl-l/2002-August/008940.html

Paul