Permalink
Browse files

The code for setting the path to binary was in BEGIN block making it

impossible to change from a calling perl script. Moved it into new().
$ENV{TCOFFEEDIR} = '/path/to/clustalwdir/';
 now works.

svn path=/bioperl-run/branches/branch-07/; revision=12971
  • Loading branch information...
1 parent 3d3b7ea commit da5059237839c9b7a53b21c607a832e6e3109113 @heikkil heikkil committed Jun 20, 2001
Showing with 5 additions and 4 deletions.
  1. +5 −4 Bio/Tools/Run/Alignment/TCoffee.pm
View
9 Bio/Tools/Run/Alignment/TCoffee.pm
@@ -506,8 +506,6 @@ use Bio::Root::IO;
@ISA = qw(Bio::Root::RootI Bio::Root::IO);
-
-BEGIN {
# You will need to enable TCoffee to find the tcoffee program. This can be done
# in (at least) three ways:
# 1. Modify your $PATH variable to include your tcoffee directory as in (for Linux):
@@ -518,8 +516,7 @@ BEGIN {
# use Bio::Tools::Run::Alignment::TCoffee.pm.
# BEGIN {$ENV{TCOFFEEDIR} = '/home/progs/tcoffee'; }
- $PROGRAMDIR = $ENV{TCOFFEEDIR} || '';
- $PROGRAM = Bio::Root::IO->catfile($PROGRAMDIR,'t_coffee');
+BEGIN {
@TCOFFEE_PARAMS = qw(IN TYPE PARAMETERS DO_NORMALISE EXTEND
DP_MODE KTUPLE NDIAGS DIAG_MODE SIM_MATRIX
@@ -542,6 +539,10 @@ sub new {
my $self = $class->SUPER::new(@args);
# to facilitiate tempfile cleanup
$self->_initialize_io();
+
+ $PROGRAMDIR = $ENV{TCOFFEEDIR} || '';
+ $PROGRAM = Bio::Root::IO->catfile($PROGRAMDIR,'t_coffee');
+
my ($attr, $value);
(undef,$TMPOUTFILE) = $self->tempfile();
while (@args) {

0 comments on commit da50592

Please sign in to comment.