JPRED-2 Current state of the SVN trank
[jpred.git] / jpred / lib / Paths.pm
1 package Paths;
2
3 use strict;
4 use warnings;
5 use base qw(Exporter);
6 use Sys::Hostname ();
7
8 =head1 NAME
9
10 Paths - Sets paths for executable programs
11
12 =head1 DESCRIPTION
13
14 This module gathers together all of the little pieces of information that would other wise be floating around in all of the other modules that run external programs. Namely, the path to the executable and nessecery environment variables. 
15
16 Putting it all here should mean that this is the only file that needs updating when their location changes, or it's redeployed. Plus some degree of automagic can be used to try and detect changes.
17
18 =cut
19
20 our @EXPORT_OK = qw($ff_bignet $analyze $batchman $sov $pairwise $oc $jnet $fastacmd $hmmbuild $hmmconvert $psiblastbin);
21
22 my $HOME = $ENV{HOME};
23 # main production path
24 #my $BINDIR = '/homes/www-jpred/live/jpred/bin';
25 # development path
26 my $BINDIR = '/homes/www-jpred/devel/jpred/bin';
27
28 our $pairwise  = "$BINDIR/pairwise";  # CC modified for correct path
29 our $oc        = "$BINDIR/oc";
30 our $jnet      = "$BINDIR/jnet";
31 our $fastacmd  = "$BINDIR/fastacmd";              # CC added to avoid failure on cluster
32 our $hmmbuild  = "$BINDIR/hmmbuild";
33 our $hmmconvert = "$BINDIR/hmmconvert";
34 our $psiblastbin  = "$BINDIR/blastpgp";
35
36 # required for training with SNNS, but unused currently
37 our $ff_bignet = "$HOME/projects/Jnet/bin/snns/ff_bignet";  # CC modified for new path (SNNS app)
38 our $analyze   = "$HOME/projects/Jnet/bin/snns/analyze";    # CC modified for new path (SNNS app)
39 our $batchman  = "$HOME/projects/Jnet/bin/snns/batchman";   # CC modified for new path (SNNS app)
40 our $sov       = "$HOME/projects/Jnet/bin/sov";
41
42
43 =head1 AUTOMATED CHANGES
44
45 Currently the paths are altered on the basis of per host rules.
46
47 =cut
48
49 #my $host = Sys::Hostname::hostname();
50 #if (grep { $host =~ $_ } qr/^(anshar|kinshar)/o, qr/^cluster-64-/o) {
51 #       for my $temp (@EXPORT_OK) {
52 #               eval "$temp =~ s#$HOME\/tmp#$HOME#g";
53 #       }
54 #}
55
56 1;