10 Paths - Sets paths for executable programs
14 This module gathers together all of the little pieces of information that would other wise be
15 floating around in all of the other modules that run external programs. Namely, the path to
16 the executable and nessecery environment variables.
18 Putting it all here should mean that this is the only file that needs updating when their
19 location changes, or it's redeployed. Plus some degree of automagic can be used to try
40 my $HOME = $ENV{HOME};
42 # main production path
43 #my $SOFTDIR = '/homes/www-jpred/live/jpred/bin';
44 #my $platform_dir = "x86_64";
47 #my $SOFTDIR = '/homes/www-jpred/devel/jpred/bin';
48 #my $platform_dir = "x86_64";
51 my $SOFTDIR = '/home/asherstnev/Projects/Jpred.project/jpred/branches/portable';
52 my $platform_name = "x86_64";
54 our $pairwise = "$SOFTDIR/$platform_name/pairwise";
55 our $oc = "$SOFTDIR/$platform_name/oc";
56 our $jnet = "$SOFTDIR/$platform_name/jnet";
57 our $fastacmd = "$SOFTDIR/$platform_name/fastacmd";
58 our $hmmbuild = "$SOFTDIR/$platform_name/hmmbuild";
59 our $hmmconvert = "$SOFTDIR/$platform_name/hmmconvert";
60 our $psiblastbin = "$SOFTDIR/$platform_name/blastpgp";
62 # required for training with SNNS, but unused currently
63 our $ff_bignet = "$HOME/projects/Jnet/bin/snns/ff_bignet"; # CC modified for new path (SNNS app)
64 our $analyze = "$HOME/projects/Jnet/bin/snns/analyze"; # CC modified for new path (SNNS app)
65 our $batchman = "$HOME/projects/Jnet/bin/snns/batchman"; # CC modified for new path (SNNS app)
66 our $sov = "$HOME/projects/Jnet/bin/sov";
69 my $newsoftdir = shift;
70 my $newplatform_name = shift;
72 if ( defined $newsoftdir ) {
73 if ( -d $newsoftdir ) {
74 $SOFTDIR = $newsoftdir;
76 warn "setup_env: directory with Jpred software $newsoftdir does not exist. The default directory is used...\n";
79 if ( defined $newplatform_name ) {
80 $platform_name = $newplatform_name;
83 $oc = "$SOFTDIR/$platform_name/oc";
84 $jnet = "$SOFTDIR/$platform_name/jnet";
85 $fastacmd = "$SOFTDIR/$platform_name/fastacmd";
86 $pairwise = "$SOFTDIR/$platform_name/pairwise";
87 $hmmbuild = "$SOFTDIR/$platform_name/hmmbuild";
88 $psiblastbin = "$SOFTDIR/$platform_name/blastpgp";
89 $hmmconvert = "$SOFTDIR/$platform_name/hmmconvert";
93 if ( "linux" eq $^O or "Linux" eq $^O ) {
94 my $status = system "uname -m > .platform";
95 open my $PLH, "<", ".platform" or die "can't check platform information";
99 $platform_name = "i686" if ( $plt =~ /i[3-6]86/ );
100 } elsif ( "MSWin32" eq $^O ) {
101 $platform_name = "win";
103 warn "check_OS: unknown platform, I'll try to use x86_64 binaries....";
106 # print "\n\ncheck_OS: SOFTDIR -> $SOFTDIR\n\n";
108 $oc = "$SOFTDIR/$platform_name/oc";
109 $jnet = "$SOFTDIR/$platform_name/jnet";
110 $fastacmd = "$SOFTDIR/$platform_name/fastacmd";
111 $pairwise = "$SOFTDIR/$platform_name/pairwise";
112 $hmmbuild = "$SOFTDIR/$platform_name/hmmbuild";
113 $psiblastbin = "$SOFTDIR/$platform_name/blastpgp";
114 $hmmconvert = "$SOFTDIR/$platform_name/hmmconvert";
116 return $platform_name;
119 =head1 AUTOMATED CHANGES
121 Currently the paths are altered on the basis of per host rules.