5 jpred.pm -- Jpred module to define all necessary global and environment variables
14 our @ISA = ('Exporter');
48 our @EXPORT_OK = @EXPORT;
51 # library path for Mail::CheckUser dependency for jpred_form.
52 # for some reason doesn't work if in PERL5LIB
53 use lib '/sw/lib/perl5.10.1/lib/perl5';
56 #our $WEBSERVER = 'http://www.compbio.dundee.ac.uk/www-jpred';
57 our $WEBSERVER = 'http://webserv1.cluster.lifesci.dundee.ac.uk:3209';
58 our $WEBSERVERCGI = "$WEBSERVER/cgi-bin";
60 #$SERVERROOT = "$WEBSERVER/~www-jpred";
61 our $SERVERROOT = "$WEBSERVER";
62 our $SRSSERVER = 'http://srs.ebi.ac.uk/srs6bin/cgi-bin';
63 our $CHKLOG = "$WEBSERVERCGI/chklog?";
64 our $RESULTS = "$SERVERROOT/results";
65 our $PDBLNK = "http://www.ebi.ac.uk/pdbsum/";
66 our $CSS = "$SERVERROOT/jpred.css";
67 our $IMAGES = "$SERVERROOT/images";
68 our $JNET = "$SERVERROOT/about.html#jnet";
70 # This is the time (in seconds) the job is allowed to take
71 our $TIMEOUT = 60 * 60; # now is 60mins
74 our $DUNDEE = "http://www.dundee.ac.uk";
77 our $JPREDUSER = 'www-jpred';
78 our $JPREDEMAIL = 'www-jpred@compbio.dundee.ac.uk';
79 our $MAILHOST = 'smtp.lifesci.dundee.ac.uk'; # CC 19/05/06 - updated to current smtp host from weevil
82 #our $JPREDROOT = '/homes/www-jpred/live';
83 #our $JPREDROOT = '/homes/www-jpred/devel';
84 our $JPREDROOT = '/home/asherstnev/Projects/Jpred.project/jpred/branches/portable';
86 # Directory for binaries either on the cluster or on the www server
87 our $BINDIR = "$JPREDROOT/bin";
89 # path to perl modules
90 our $LIBDIR = "$JPREDROOT/lib";
93 our $JOBDIR = "$JPREDROOT/public_html/results"; # directory for output
96 our $PREFIX = "jp_"; # Prefix for job submissions (qstat will only display 10 chars of job name)
97 our $RESOURCE = "www_service2"; # Resource for the submission to use
99 # Variables for external programs
101 $ENV{BLASTMAT} = "$JPREDROOT/data/blast";
102 our $BLASTDB = $JPREDROOT . "/databases";
103 $ENV{BLASTDB} = $BLASTDB;
104 our $SWALL = "$BLASTDB/uniref90";
105 our $SWALLFILT = "$SWALL.filt";
106 our $PDB = '/db/blastdb/pdb';
107 our $PDB_DAT = '/db/blastdb/DB.dat';
109 # ncoils matrix location
110 $ENV{COILSDIR} = "$JPREDROOT/data/coils";
112 sub setup_jpred_env {
113 my $newJPREDROOT = shift;
115 $JPREDROOT = $newJPREDROOT if (defined $newJPREDROOT);
117 $BINDIR = "$JPREDROOT/bin";
118 $LIBDIR = "$JPREDROOT/lib";
119 $JOBDIR = "$JPREDROOT/public_html/results";
121 $ENV{BLASTMAT} = "$JPREDROOT/data/blast";
122 $BLASTDB = $JPREDROOT . "/databases";
123 $ENV{BLASTDB} = $BLASTDB;
124 $SWALL = "$BLASTDB/uniref90";
125 $SWALLFILT = "$SWALL.filt";
128 # Error checking system call
131 my $rc = 0xffff & system $command;
134 } elsif ( $rc == 0xff00 ) {
135 print "'$command' failed!\n";
136 die "Jpred failed\n";
137 } elsif ( ( $rc & 0xff ) == 0 ) {
139 die "'$command' did something else! (exited $rc)\n";
143 print "'$command' dumped core!\n";
144 die "Jpred failed\n";
149 # The header and footer for any HTML produced dynamically
150 our $JPREDHEAD = " <div id=\"header\">
153 <img class=\"uod\" src=\"$IMAGES/logo_white_small.gif\" height=\"100\" width=\"108\" title=\"University of Dundee\" alt=\"University of Dundee Logo\" />
155 <a href=\"$SERVERROOT/index.html\">
156 <img src=\"$IMAGES/jpred3.png\" border=\"0\" height=\"102\" width=\"520\" title=\"Jpred Logo\" alt=\"Jpred Logo\" />
158 <a href=\"http://www.compbio.dundee.ac.uk\">
159 <img src=\"$IMAGES/group.png\" border=\"0\" height=\"102\" width=\"70\" title=\"Group Link\" alt=\"The Barton Group\" />
162 <div id=\"navigation\">
163 <table border=\"0\" cellpadding=\"0\" width=\"100%\">
165 <td class=\"nav_table\"><a class=\"nav\" href=\"$SERVERROOT/index.html\">Home</a></td>
167 <td class=\"nav_table\"><a class=\"nav\" href=\"$SERVERROOT/about.html\">About</a></td>
168 <td class=\"nav_table\"><a class=\"nav\" href=\"$SERVERROOT/new.html\">News</a></td>
169 <td class=\"nav_table\"><a class=\"nav\" href=\"$SERVERROOT/faq.html\">FAQ</a></td>
170 <td class=\"nav_table\"><a class=\"nav\" href=\"$SERVERROOT/help.html\">Help</a></td>
171 <td class=\"nav_table\"><a class=\"nav\" href=\"$SERVERROOT/contact.html\">Contact</a></td>
175 </div> <!-- End #navigation -->
176 </div> <!-- End #header -->
180 <script type="text/javascript">
181 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
182 document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));
184 <script type="text/javascript">
186 var pageTracker = _gat._getTracker("UA-5356328-1");
187 pageTracker._trackPageview();
195 This module defines all the global and envirnmental variables required by the Jpred server scripts and binaries.
199 I'm not sure who originally wrote this module, but I guess all of the following contributed:
203 Chris Cole <christian@cole.name> (current maintainer)