[Bioperl-l] Clustalw.pm on Windows

Martin Lercher m.j.lercher@bath.ac.uk
Fri, 26 Jul 2002 09:36:50 +0100


Hi Oskar,

I had some trouble using T-Coffee via Bioperl on Windows too. However, that
can be rectified with a minor change to
Root\IO.pm:

if($^O =~ /mswin/i) {
# $PATHSEP = "\\";
   $PATHSEP = "\\\\"; ##MJL to make  this work in regexp
} elsif($^O =~ /macos/i) {
...
[I hope this doesn't screw up anything else - it worked for me!
Alternatively, you can comment out the following line in exists_exe() :
    # $exe =~ s/^$PATHSEP//;
]

and some changes to Tools\Run\Alignment\TCoffee.pm (this makes TCoffee read
the parameters from file) which seem necessary regardless of what operating
system you use to enable you to pass any parameters:

    my $param_string = shift;
#    my $instring = "-in=".join(",", @{$self->{'_in'}});
#    my $commandstring = $PROGRAM." $instring".
# " -output=gcg". " $param_string";
    my $instring = "-in=".join(",", @{$self->{'_in'}}). ' Mlalign_id_pair
Mclustalw_pair' ; ##MJL hardcoded method choice (suggested by bug fix from
Heikki 966)
    $param_string =~ s/\s/\n/g ;           ##MJL convert to parameter file
format
    my $parameterFile = 't_coffee_parameters.tmp' ;                ##MJL
    open (PARAMETERFH, ">$parameterFile") ;                        ##MJL
    print PARAMETERFH "$instring\n-output=gcg$param_string" ;      ##MJL
    close PARAMETERFH ;                                            ##MJL
    my $commandstring = $PROGRAM . " -parameters $parameterFile" ; ##MJL
    $self->debug( "tcoffee command = $commandstring \n");

All this assumes that you use Bioperl 1.01; not sure if it's corrected in
1.02.

Have fun in the pool,
Martin


----- Original Message -----
From: "Fernandez-Capetillo, Oscar (NCI)" <fernando@mail.nih.gov>
To: <bioperl-l@bioperl.org>
Sent: Friday, July 26, 2002 12:21 AM
Subject: [Bioperl-l] Clustalw.pm on Windows


>
> Hi there,
>
> I am just a newbie to all this Bioperl movement that I am founding very
> useful. It is translating a lot of my computer time into swiming pool
time.
> Ok, that just as introduction, now my question.
>
> I will want to use either clustalw.pm or tcoffe.pm modules for some of my
> scripts. Unfortunately I am working on windows and this modules only work
in
> Unix/Linux platforms (because they are implemented making calls to the
Unix
> Shell). Anybody aware of similar modules that will work in windows? Or has
> anybody already changed this modules to work with windows?
>
> Thanks,
>
> Oskar
>