JPRED-2 Move Jpred 3.0.1 to public Git
[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 my $BINDIR = '/homes/www-jpred/live/jpred/bin';
24
25 our $pairwise  = "$BINDIR/pairwise";  # CC modified for correct path
26 our $oc        = "$BINDIR/oc";
27 our $jnet      = "$BINDIR/jnet";
28 our $fastacmd  = "$BINDIR/fastacmd";              # CC added to avoid failure on cluster
29 our $hmmbuild  = "$BINDIR/hmmbuild";
30 our $hmmconvert = "$BINDIR/hmmconvert";
31 our $psiblastbin  = "$BINDIR/blastpgp";
32
33 # required for training with SNNS, but unused currently
34 our $ff_bignet = "$HOME/projects/Jnet/bin/snns/ff_bignet";  # CC modified for new path (SNNS app)
35 our $analyze   = "$HOME/projects/Jnet/bin/snns/analyze";    # CC modified for new path (SNNS app)
36 our $batchman  = "$HOME/projects/Jnet/bin/snns/batchman";   # CC modified for new path (SNNS app)
37 our $sov       = "$HOME/projects/Jnet/bin/sov";
38
39
40 =head1 AUTOMATED CHANGES
41
42 Currently the paths are altered on the basis of per host rules.
43
44 =cut
45
46 #my $host = Sys::Hostname::hostname();
47 #if (grep { $host =~ $_ } qr/^(anshar|kinshar)/o, qr/^cluster-64-/o) {
48 #       for my $temp (@EXPORT_OK) {
49 #               eval "$temp =~ s#$HOME\/tmp#$HOME#g";
50 #       }
51 #}
52
53 1;