remove old images
[jabaws.git] / website / manual.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
3 <html xmlns="http://www.w3.org/1999/xhtml">\r
4 <head>\r
5 <meta name="generator" content="HTML Tidy, see www.w3.org" />\r
6 <meta http-equiv="Content-Type" content=\r
7 "text/html; charset=iso-8859-1" />\r
8 <meta name="Last-modified" content="Mon, 11 Oct 2010 01:03:33 GMT"/>\r
9 <title>Java Bioinformatics Analyses Web Services (JABAWS)\r
10 manual</title>\r
11 <link href="ws.css" rel="stylesheet" type="text/css" media=\r
12 "screen, projection, handheld, tv" />\r
13 <link rel="stylesheet" type="text/css" media="print" href=\r
14 "print.css" />\r
15 <script type="text/javascript" src="prototype-1.6.0.3.js">\r
16         \r
17 </script>\r
18 </head>\r
19 <body>\r
20 <div id="page">\r
21 <div id="banner">\r
22 <table> \r
23 <tr><td style="width:130px;"><a href="http://www.dundee.ac.uk"><img class="logo" src="images/uod_lt.gif"  alt="University of Dundee"  title="University of Dundee" longdesc="http://www.dundee.ac.uk"/></a></td>\r
24 <td class="bg"><h2><span class="headeru">JA</span>va <span class=\r
25 "headeru">B</span>ioinformatics <span class="headeru">A</span>nalysis <span class="headeru">W</span>eb <span\r
26 class="headeru">S</span>ervices</h2></td>\r
27 </tr>\r
28 </table></div><!-- banner end-->\r
29 \r
30 <div id="wrapper">\r
31 <div id="panel"><a href="index.html">Home</a> <a class="selected"\r
32 href="manual.html">Manual</a> <a href="howto.html">How To</a> \r
33 <a href="dm_javadoc/index.html" title="Data model javadoc">Javadoc</a>\r
34 <a href="download.html">Download</a> \r
35 <a href="http://www.compbio.dundee.ac.uk">Barton Group</a> \r
36 </div>\r
37 \r
38 <!-- panel end-->\r
39 <div id="content">\r
40 <h2 align="center">JABAWS Manual</h2>\r
41 \r
42 <h3>Table of content</h3>\r
43 <p>\r
44 <h4>JABAWS Virtual Appliance </h4>\r
45 <ul>\r
46     <li><a href="#whenvm">When to use virtual appliance</a> </li>\r
47         <li><a href="#virtualbox">VirtualBox appliance configuration</a></li>\r
48         <li><a href="#vmplayer">VMware Player appliance configuration </a></li>\r
49         <li><a href="#jabawsAppliance">JABAWS Appliance details </a></li>\r
50     <li><a href="#jalviewWithJaba">Configuring Jalview to work with your JABAWS VM</a> </li>\r
51 </ul>\r
52 \r
53 <h4>JABAWS Installation</h4>\r
54 <ul>\r
55   <li><a href="#sysreq">System Requirements</a></li>\r
56   <li><a href="#instwar">Installing the JABAWS WAR file</a></li>\r
57   <li><a href="#prepexec">Preparing executables for use with JABAWS</a></li>\r
58   <li><a href="#useprebin">Using the pre-compiled i386 binaries on Linux</a></li>\r
59   <li><a href="#recompbinaries">Recompiling the bundled\r
60     programs for your system</a></li>\r
61   <li><a href="#haveexec">Reuse the binaries that are\r
62     already in your system</a></li>\r
63   <li><a href="#obtainexec">Obtaining alignment\r
64     programs for your operation system from elsewhere</a></li>\r
65 </ul>\r
66 <h4>Configuring JABAWS</h4>\r
67 <ul>\r
68   <li><a href="#defjabaconf">Default JABA Web Services Configuration</a></li>\r
69   <li><a href="#locEngConf">Local Engine Configuration</a></li>\r
70   <li><a href="#clustEngConf">Cluster Engine Configuration</a></li>\r
71   <li><a href="#setexecenv">Defining Environment Variables for\r
72     Executables</a></li>\r
73 </ul>\r
74 <h4>For Developers  </h4>\r
75 <ul>\r
76   <li><a href="#wsfunctions">Web service functions </a></li>\r
77   <li><a href="#templatestr">The template client structure</a></li>\r
78 </ul>\r
79 <h4>JABA Web Services Internals </h4>\r
80 <ul>\r
81   <li><a href="#testingJaba">Testing JABA Web Services</a></li>\r
82   <li><a href="#logfiles">JABAWS Log Files</a></li>\r
83   <li><a href="#warfile">JABAWS War File Content</a></li>\r
84 </ul>\r
85 <h3>JABAWS Virtual Appliance </h3>\r
86 <h4><a name="whenvm" id="whenvm"/></a>When to use virtual  appliance </h4>\r
87 <p>The appliance best suits for individual users who want to  use JABA web services locally, without Internet connection, want to keep their  data private and uses Windows as their main OS. The appliance is a self contained unit of software and as such may be an attractive option for Linux, UNIX or Mac users but they can always deploy a <a href="#instwar">war distribution</a> instead.  <br />\r
88 To run the appliance you would need to have relatively  powerful computer. The appliance comes pre configured to use 1 CPU and 512M of  memory and the minimum amount of memory required is about 378M.    </p>\r
89 <h4><a name="virtualbox" id="virtualbox"/>VirtualBox appliance configuration</h4>\r
90 <p>VirtualBox can be used to run JABAWS services from Windows, Linux, Solaris or Mac host operation systems. Use VitualBox &quot;Import  Appliance&quot; option to import JABAWS. Please bear in mind that to benefit from multiple CPU support under VirtualBox software you need to enable<a href="http://en.wikipedia.org/wiki/X86_virtualization"> hardware virtualization extensions</a>, such as  Intel Virtualization VT-x or AMD-V support in the BIOS of your computer. Unfortunately, we were unable to find a reliable way to do it on Mac, so some Macs running VirtualBox will be limited to one CPU only, irrespective of the number of CPUs of the host machine. </p>\r
91 <p>We found that, by default, virtualization extensions are enabled in VirtualBox irrespective of whether your computer supports them. You will get the <a href="howto.html#vmbexc"></a><a href="howto.html#vmbexc">VERR_VMX_MSR_LOCKED_OR_DISABLED</a> exception if you computer does not support the extensions or their support is disabled. Just deselect the checkboxes shown on the screen shot below to solve the problem. </p>\r
92 <p>VirtualBox JABAWS VM configuration screen shot displaying virtualization settings.</p>\r
93 <p><img src="images/vmb_virtual.png" alt="VT-x extension on VirtualBox" width="669" height="535" /></p>\r
94 <h4><a name="vmplayer" id="vmplayer"/>VMware Player appliance configuration </h4>\r
95 <p>Free <a href="http://downloads.vmware.com/d/info/desktop_downloads/vmware_player/3_0">VMware Player</a> can be used to run JABAWS services from Windows and Linux host operation system, there is no support for Mac  in time of writing. However, <a href="https://www.vmware.com/vmwarestore/buyfusion.html">VMware Fusion</a>, a commercial VMware product, offer virtual machine support for Mac computers too. </p>\r
96 <p>To run JABAWS server on VMware player,  unpack JABAWS VM into one of the folders on your local hard drive. Open VMware Player, and click &quot;Open Virtual Machine&quot; and point the Player to the location of the JABAWS, choose JABAWS.vmx file to open an appliance. </p>\r
97 <p>When you play the machine for the first time the Player might ask you whether &quot;This virtual machine may have been moved or copied.&quot;,  say that you have copied it. That is all. </p>\r
98 <h4><a name="jabawsAppliance" id="jabawsAppliance"/>JABAWS Appliance details</h4>\r
99 <p>By default, JABAWS virtual appliance is configured with 512M of memory and 1 CPU, but you are free to change these settings. If you have more than one CPU or CPU core on your computer you can make them available for JABAWS virtual machine by editing virtual machine settings. Please bear in mind that more CPU power will not make a single calculation go faster, but it will enable the VM to do calculations in parallel. Similarly, you can add more memory to the virtual machine. More memory let  your VM deal with larger tasks, e.g. work with large alignments.</p>\r
100 <p>The VMware Player screen shot below displays JABAWS VM CPU settings. </p>\r
101 <p><img src="images/VMware_cpu.png" alt="vmware cpu settings" width="852" height="267" border="1" /></p>\r
102 <p><strong>JABAWS appliance configuration: </strong></p>\r
103 <p><strong>VMware info</strong><br />\r
104   - Date of creation: 8 October 2010<br />\r
105   - CPUs : 1<br />\r
106   - RAM : 512 MB<br />\r
107   - Networking : Host only (the VM has no access to the outside network, nothing from outside network can access the VM)<br />\r
108   - Hard disk : 20 GB  (expanding)<br />\r
109   - VMware tools : Installed</p>\r
110 <p><strong>OS info</strong><br />\r
111   - OS : TurnKey Linux, based on Ubuntu 8.0.4 JEOS (Just-Enough-Operation-System)<br />\r
112   - Installation : Oracle Java 6, Tomcat 6, JABAWS v. 1.0 <br />\r
113   - Hostname : tomcat <br />\r
114   - Patches : till date of creation<br />\r
115   - IPv4 address : dhcp<br />\r
116   - IPv6 address : auto<br />\r
117   - DNS name : none<br />\r
118   - Name server : dhcp<br />\r
119   - Route : dhcp<br />\r
120   - Keyboard : US_intl</p>\r
121 <p><strong>Login credentials</strong><br />\r
122   - Root password: jabaws</p>\r
123 <p>  <strong>Services</strong></p>\r
124 <ul>\r
125   <li>Default virtual console Alt+F7 </li>\r
126   <li>Tomcat web server. <br />\r
127     <em>Access:</em> http://VM_IP</li>\r
128   <li>JABAWS URL: http://VM_IP/jabaws</li>\r
129   <li>Web Shell<br />\r
130     <em>Access:</em> https://VM_IP:12320/</li>\r
131   <li>Webmean<br />\r
132     <em>Access:</em> https://VM_IP:12321/</li>\r
133   <li>SSH/SFTP<br />\r
134     <em>Access:</em> root@VM_IP</li>\r
135   </ul>\r
136 <p>Where VM_IP is the VM IP address. Under VMware Player host only networking, the first VM may have 192.168.227.128 IP address. Under VirtualBox host only networking, first VM may have 192.168.56.101 IP address.</p>\r
137 <h4><a name="jalviewWithJaba" id="jalviewWithJaba"/>Configuring Jalview to work with your JABAWS VM</a> </h4>\r
138 <p>After you booted JABAWS VM, you should see similar screen, however, the IP address of your VM may be different. To enable Jalview to work with your JABAWS appliance you need to go to Jalview-&gt;Tools-&gt;Preferences-&gt;Web Services -&gt; New Service URL, and add JABAWS URL into the box provided. For more information please refer to Jalview <a href="http://www.jalview.org/help/html/webServices/JABAWS.html">help pages</a>. </p>\r
139 <p><img src="images/vm_welcome_screen.png" alt="JABAWS welcome screen" width="734" height="461" /></p>\r
140 <p>If you click on Advanced Menu, you will see the configuration console, similar to the one below.   </p>\r
141 <p><img src="images/VMware_booted.png" alt="JABAWS welcome screen" width="735" height="461" /></p>\r
142 <p>If you need to configure a static IP address the configuration console will help you with this. Shutting down the VM is best from the configuration console as well.</p>\r
143 <h3>JABAWS Installation</h3>\r
144 <h4><a name="sysreq" id="sysreq"></a>System Requirements</h4>\r
145 \r
146 <p>JABAWS requires a Java web application server compliant with\r
147 version 2.4 of the Java Servlet specification, and a Java 6 runtime\r
148 environment. We recommend using an official Oracle Java 6 runtime\r
149 environment, and <a\r
150 href="http://tomcat.apache.org/download-60.cgi">Apache-Tomcat</a> web application server version 6, but other versions may work as well.</p>\r
151 \r
152 <!-- todo: link to help about obtaining and installing tomcat -->\r
153 <h4><a name="instwar" id="instwar"></a>Installing the JABAWS WAR file</h4>\r
154 \r
155 <p>JABAWS is distributed as a web application archive (WAR). To\r
156 deploy JABAWS in Apache-Tomcat - simply drop the war file into the\r
157 <span class="highlight">webapps</span> directory of a running\r
158 Tomcat, and it will do the rest. For any other web application\r
159 server, please follow your server's specific deployment procedure\r
160 for 'WAR' files. If you are installing on a windows machine, then\r
161 at this point your JABAWS installation will already be up and\r
162 running, and you can try its services out using the <a href=\r
163 "howto.html#usingWsTester">JABAWS test client</a>, but\r
164 installations on other operating systems will require a final step\r
165 to ensure JABAWS can locate and execute the binary programs it\r
166 needs.</p>\r
167 \r
168 <h4><a name="prepexec" id="prepexec"></a>Preparing executables for use with JABAWS</h4>\r
169 \r
170 <p>JABAWS's web services use command line programs to do\r
171 the actual analysis, so it must have access to programs\r
172 which can be executed on your platform. The native executables\r
173 bundled with JABAWS for Windows (32-bit) and Linux (i386) should be\r
174 OK for those systems. However, the source code for these \r
175 programs is also provided so you can recompile for your own\r
176 architecture and exploit any optimizations that your system can\r
177 provide. Alternately, if you have already got binaries on your\r
178 system, then you can simply change the paths in JABAWS's\r
179 configuration files so these are used instead.</p>\r
180 \r
181 <h4><a name="useprebin" id="useprebin"></a>Using the pre-compiled i386 binaries on Linux</h4>\r
182 \r
183 <p>Before the binaries that are bundled with JABAWS can be used,\r
184 they must first be made executable using the provided <a name=\r
185 "setexecflag" id="setexecflag">'setexecflag.sh'</a> script:</p>\r
186 \r
187 <ol>\r
188 <li>cd to <span class=\r
189 "hightlight">&lt;webapplicationpath&gt;/binaries/src</span></li>\r
190 \r
191 <li>run <span class="hightlight">sh setexecflag.sh</span></li>\r
192 \r
193 <li>Make sure binaries supplied work under your OS.<br />\r
194  For this run each binary, without any command line options or\r
195 input files. If you see an error message complaining about missing\r
196 libraries or other problems, then you probably need to <a href=\r
197 "#recompbinaries">recompile the binaries</a>. with</li>\r
198 \r
199 <li>Restart the Tomcat.</li>\r
200 </ol>\r
201 \r
202 That's it! JABAWS should work at this point. Try it out using the<a\r
203 href="howto.html#usingWsTester">JABAWS test client</a>. If not,\r
204 read on... or have a look at <a href=\r
205 "howto.html#usingtomcat">deploying on Tomcat</a> tips.<br />\r
206  <em>Note: You may want to enable logging, <a href="#logfiles">see\r
207 below for instructions on how to do that</a>.</em><br />\r
208  \r
209 \r
210 <h4><a name="recompbinaries">Recompiling the bundled\r
211 programs for your system</a></h4>\r
212 \r
213 <p>If you have a fully equipped build environment on your\r
214 (POSIX-like) system, then you should be able to recompile the\r
215 programs from the source distributions which are included\r
216 in the JABAWS war file. A script called 'compilebin.sh' is provided\r
217 to automate this task.</p>\r
218 \r
219 <ol>\r
220 <li>In a terminal window, change the working directory to <span\r
221 class="hightlight">binaries/src</span></li>\r
222 \r
223 <li>execute the <span class="highlight">compilebin.sh</span>\r
224 script,<br />\r
225  either use: <span class="hightlight">chmod +x compilebin.sh;\r
226 compilebin.sh &gt; compilebin.out;</span><br />\r
227  or: <span class="hightlight">sh compilebin.sh &gt;\r
228 compilebin.out</span></li>\r
229 \r
230 <li>Now run <span class="hightlight">sh setexecflag.sh</span><br />\r
231  If any of the binaries was not recompiled, then a 'file not found'\r
232 error will be raised.</li>\r
233 \r
234 <li>Finally, restart your tomcat (or servlet container), and use\r
235 the <a href="howto.html#usingWsTester">JABAWS test client</a> to\r
236 check that JABAWS can use the new binaries.</li>\r
237 </ol>\r
238 \r
239 <p>If you couldn't compile everthing, then it may be that your system does\r
240 not have all the tools required for compiling the programs. At the very\r
241 least check that you have gcc, g++ and make installed in your\r
242 system. If not install these packages and repeat the compilation\r
243 steps again. You should also review the compilebin.sh output -\r
244 which was redirected to compilebin.out, and any errors output to\r
245 the terminal. Finally, try obtaining the <a href="#obtainexec">pre\r
246 compiled binaries</a> for your OS.</p>\r
247 \r
248 <h4><a name="haveexec" id="haveexec">Reuse the binaries that are\r
249 already in your system</a></h4>\r
250 \r
251 <p>If you would like to use the binaries you already have then you\r
252 just need to let JABAWS know there they are. To do this, edit:\r
253 <span class="code">conf/Executable.properties</span>\r
254 <p>When specifying paths to executables that already exist on your system, make sure you provide an absolute path, or one relative to the JABAWS directory inside <span class="highlight">webapps</span>. For example, the default path for clustalw is defined\r
255 as<span class=\r
256 "code">local.clustalw.bin=binaries/src/clustalw/src/clustalw2</span>\r
257 Alternatively, instead of changing <span class=\r
258 "hightlight">Executable.properties</span> you could also replace\r
259 the executables bundled with JABAWS with the ones that you have, or make symlinks to them.\r
260 Then the default configuration will work for you. More information\r
261 about <a href="#exec"><span class="hightlight">the\r
262 Executable.properties</span> file is given below</a>.</p>\r
263 \r
264 <h4><a name="obtainexec" id="obtainexec">Obtaining alignment\r
265 programs for your operation system from elsewhere</a></h4>\r
266 \r
267 <p>You could search for pre-packaged compiled executable in your\r
268 system package repository or alternately, download pre-compiled\r
269 binaries from each alignment program's home page. Then, either\r
270 replace the executables supplied with the downloaded ones, or\r
271 modify the paths in <span class=\r
272 "hightlight">executable.properties</span> as described above.</p>\r
273 \r
274 <h3>Configuring JABAWS</h3>\r
275 <p>There are three parts of the system you can configure. The local\r
276 and cluster engines, and the paths to individual executables for\r
277 each engine. These settings are stored in configuration files\r
278 within the web application directory (for an overview, then take a\r
279 look at the <a href="#warfile">war file content table</a>).</p>\r
280 \r
281 <h4><a name="defjabaconf" id="defjabaconf"></a>Default JABA Web Services Configuration</h4>\r
282 \r
283 <p>Initially, JABAWS is configured with only the local engine\r
284 enabled, with job output written to directory called "jobsout"\r
285 within the web application itself. This means that JABAWS will work\r
286 out of the box, but may not be suitable for serving a whole lab or\r
287 instute.</p>\r
288 \r
289 <h4><a name="locEngConf" id="locEngConf"></a>Local Engine Configuration</h4>\r
290 \r
291 <p>The Local execution engine configuration is defined in the\r
292 properties file conf/Engine.local.properties. The supported\r
293 configuration settings are:<br />\r
294  <span class="hightlight">engine.local.enable=true</span> - #\r
295 enable or disable local engine, valid values true | false<br />\r
296  <span class=\r
297 "hightlight">local.tmp.directory=D:\\clusterengine\\testoutput</span>\r
298 - a directory to use for temporary files storage, optional,\r
299 defaults to java temporary directory<br />\r
300  <span class="hightlight">engine.local.thread.number=4</span> -\r
301 Number of threads for tasks execution (valid values between 1 and\r
302 2x cpu. Where x is a number of cores available in the system).\r
303 Optional defaults to the number of cores for core number &lt;=4 and\r
304 number of cores-1 for greater core numbers.</p>\r
305 \r
306 <p>If you are planning to heavily use the local engine (which you\r
307 have to if you do not have a cluster) it is a good idea to increase\r
308 the amount of memory available for the web application server. If\r
309 you are using Apache-Tomcat, then you can define its memory\r
310 settings in the JAVA_OPTS environment variable. To specify which\r
311 JVM to use for Apache-Tomcat, put the full path to the JRE\r
312 installation in the JAVA_HOME environment variable (We would\r
313 recommend using Sun Java Virtual Machine (JVM) in preference to\r
314 Open JDK). Below is an example of code which can be added to <span\r
315 class="hightlight">&lt;tomcat_dir&gt;/bin/setenv.sh</span> script\r
316 to define which JVM to use and a memory settings for Tomcat server.\r
317 Tomcat server startup script (<span class=\r
318 "hightlight">catalina.sh</span>) will execute <span class=\r
319 "hightlight">setenv.sh</span> on each server start\r
320 automatically.<br />\r
321  <span class="code">export\r
322 JAVA_HOME=/homes/ws-dev2/jdk1.6.0_17/<br />\r
323  export JAVA_OPTS="-server -Xincgc -Xms512m -Xmx1024m"</span></p>\r
324 \r
325 <h4><a name="clustEngConf" id="clustEngConf"></a>Cluster Engine Configuration</h4>\r
326 \r
327 <p>Supported configuration settings:<br />\r
328  <span class="hightlight">engine.cluster.enable=true</span> - #\r
329 enable or disable local engine true | false, defaults to\r
330 false<br />\r
331  <span class=\r
332 "hightlight">cluster.tmp.directory=/homes/clustengine/testoutput-</span>\r
333 a directory to use for temporary files storage. The value must be\r
334 an absolute path to the temporary directory. Required. The value\r
335 must be different from what is defined for local engine. This\r
336 directory must be accessible from all cluster nodes.<br />\r
337  For the cluster engine to work, the SGE_ROOT and LD_LIBRARY_PATH\r
338 environment variables have to be defined. They tell the cluster\r
339 engine where to find DRMAA libraries. These variables\r
340 should be defined when the web application server starts up, e.g.</p>\r
341 \r
342 <p><span class="code">SGE_ROOT=/gridware/sge<br />\r
343  LD_LIBRARY_PATH=/gridware/sge/lib/lx24-amd64</span></p>\r
344 \r
345 <p>Finally, do not forget to configure executables for the cluster\r
346 execution, they may be the same as for the local execution but may\r
347 be different. Please refer to the executable configuration section\r
348 for further details.</p>\r
349 \r
350 <h4><a name="exec" id="exec"></a>Executable Configuration</h4>\r
351 \r
352 <p>All the executable programs\r
353 are configured in conf/Executable.properties file. Each executable\r
354 is configured with a number of options. They are: <span class=\r
355 "code">local.X.bin.windows=&lt;path to executable under windows\r
356 system, optional&gt;<br />\r
357  local.X.bin=&lt;path to the executable under non-windows system,\r
358 optional&gt;<br />\r
359  cluster.X.bin=&lt;path to the executable on the cluster, all\r
360 cluster nodes must see it, optional&gt;<br />\r
361  X.bin.env=&lt;semicolon separated list of environment variables\r
362 for executable, use hash symbol as name value separator,\r
363 optional&gt;<br />\r
364  X.--aamatrix.path=&lt;path to the directory containing\r
365 substitution matrices, optional&gt;<br />\r
366  X.presets.file=&lt;path to the preset configuration file, optional\r
367 &gt;<br />\r
368  X.parameters.file=&lt;path to the parameters configuration file,\r
369 optional&gt;<br />\r
370  X.limits.file=&lt;path to the limits configuration file,\r
371 optional&gt;<br />\r
372  X.cluster.settings=&lt;list of the cluster specific options,\r
373 optional&gt;</span></p>\r
374 \r
375 <p>Where X is a short executable wrapper class name.</p>\r
376 \r
377 <p>Default JABAWS configuration includes path to local executables\r
378 to be run by the local engine only, all cluster related settings\r
379 are commened out, but they are there for you as example. Cluster\r
380 engine is disabled by default. To configure executable for cluster\r
381 execution uncomment the X.cluster settings and change them\r
382 appropriately. </p>\r
383 <p>By default limits are set well in excess of what you may want to offer to the users outside your lab, to make sure that the tasks are never rejected. The default limit is 100000 sequences of 100000 letters on average for all of the JABA web services.  You can adjust the limits according to your needs by editing <span class="hightlight">conf/settings/&lt;X&gt;Limit.xml</span> files.<br />\r
384   After you have completed the editing your configuration may look like\r
385   this:<span class="code">local.mafft.bin.windows=<br />\r
386     local.mafft.bin=binaries/mafft<br />\r
387     cluster.mafft.bin=/homes/cengine/mafft<br />\r
388     mafft.bin.env=MAFFT_BINARIES#/homes/cengine/mafft;FASTA_4_MAFFT#/bin/fasta34;<br />\r
389     mafft.--aamatrix.path=binaries/matrices<br />\r
390     mafft.presets.file=conf/settings/MafftPresets.xml<br />\r
391     mafft.parameters.file=conf/settings/MafftParameters.xml<br />\r
392     mafft.limits.file=conf/settings/MafftLimits.xml<br />\r
393     mafft.cluster.settings=-q bigmem.q -l h_cpu=24:00:00 -l\r
394     h_vmem=6000M -l ram=6000M</span></p>\r
395 <p>Please not that relative paths must only be specified for the\r
396 files that reside inside web application directory, all other paths\r
397 must be supplied as absolute!</p>\r
398 \r
399 <p>Furthermore, you should avoid using environment variables within the paths or options - since these will not be evaluated correctly.  Instead, please explicitly\r
400 specify the absolute path to anything\r
401 normally evaluated from an environment variable at execution time.</p>\r
402 \r
403 <p>If you are using JABAWS to submit jobs to the cluster (with\r
404 cluster engine enabled), executables must be available from all\r
405 cluster nodes the task can be sent to, also paths to the\r
406 executables on the cluster e.g. <span class=\r
407 "hightlight">cluster.&lt;exec_name&gt;.bin</span> must be\r
408 absolute.</p>\r
409 \r
410 <p>Executables can be located anywhere in your system, they do not\r
411 have to reside on the server as long as the web application server\r
412 can access and execute them.</p>\r
413 \r
414 <p>Cluster settings are treated as a black box, the system will\r
415 just pass whatever is specified in this line directly to the\r
416 cluster submission library. This is how DRMAA itself treats this\r
417 settings. More exactly DRMAA JobTemplate.setNativeSpecification()\r
418 function will be called.</p>\r
419 \r
420 <h4><a name="setexecenv" />Defining Environment Variables for\r
421 Executables</h4>\r
422 \r
423 <p>Environment variables can be defined in property <span class=\r
424 "code">x.bin.env</span> Where <span class="hightlight">x</span> is\r
425 one of five executables supported by JABAWS. Several environment\r
426 variables can be specified in the same line. For example.<br />\r
427  <span class=\r
428 "code">mafft.bin.env=MAFFT_BINARIES#/homes/cengine/mafft;FASTA_4_MAFFT#/bin/fasta34;</span></p>\r
429 \r
430 <p>The example above defines two environment variables with names\r
431 MAFFT-BINARIES and FASTA_4_MAFFT and values /homes/cengine/mafft\r
432 and /bin/fasta34 respectively. Semicolon is used as a separator\r
433 between different environment variables whereas hash is used as a\r
434 separator for name and value of the variable.</p>\r
435 \r
436 <h4><a name="mafftconf" id="mafftconf"></a>Configure JABAWS to Work\r
437 with Mafft</h4>\r
438 \r
439 <p>If you use default configuration you do not need to read any\r
440 further. The default configuration will work for you without any\r
441 changes, however, if you want to install Mafft yourself then there\r
442 is a couple of more steps to do.</p>\r
443 \r
444 <p>Mafft executable needs to know the location of other files\r
445 supplied with Mafft. In addition some Mafft functions depends on\r
446 the fasta executable, which is not supplied with Mafft, but is a\r
447 separate package. Mafft needs to know the location of fasta34\r
448 executable.</p>\r
449 \r
450 <p>To let Mafft know where the other files from its package are\r
451 change the value of MAFFT-BINARIES environment variables. To let\r
452 Mafft know where is the fasta34 executable set the value of\r
453 FASTA_4_MAFFT environment variable to point to a location of\r
454 fasta34 program. The latter can be added to the PATH variable\r
455 instead. If you are using executables supplied with JABAWS, the\r
456 path to Mafft binaries would be like <span class=\r
457 "hightlight">&lt;relative path to web application\r
458 directory&gt;/binaries/src/mafft/binaries</span> and the path to\r
459 fasta34 binary would be <span class="hightlight">&lt;relative path\r
460 to web application\r
461 directory&gt;/binaries/src/fasta34/fasta34</span>. You can specify\r
462 the location of Mafft binaries as well as fasta34 program elsewhere\r
463 by providing an absolute path to them. All these settings are\r
464 defined in <span class=\r
465 "hightlight">conf/Executable.properties</span> file.</p>\r
466 \r
467 <h3>For Developers</h3>\r
468 <h4><a name="wsfunctions" id="wsfunctions"></a>Web service functions description </h4>\r
469 <p>All JABA multiple sequence alignment web services comply to the same interface, thus the function described below are available from all the services. </p>\r
470 <p><strong>Functions for initiating the alignment </strong><span class="code">  String id = align(List&lt;FastaSequence&gt; list)<br />\r
471   String id = customAlign(List&lt;FastaSequence&gt; sequenceList, List&lt;Option&gt; optionList)<br />\r
472   String id = presetAlign(List&lt;FastaSequence&gt; sequenceList, Preset preset)</span></p>\r
473 <p><strong>Functions pertaining to job monitoring and control</strong><br />\r
474   <span class="code">JobStatus status = getJobStatus(String id)<br />\r
475   Alignment al = getResult(String id)<br />\r
476   boolean cancelled = cancelJob(String id)<br />\r
477   ChunkHolder chunk = pullExecStatistics(String id, long marker)</span></p>\r
478 <p><strong>Functions relating to service features discovery</strong><br />\r
479   <span class="code">RunnerConfig rc = getRunnerOptions()<br />\r
480   Limit limit = getLimit(String name)<br />\r
481   LimitsManager lm = getLimits()<br />\r
482   PresetManager pm = getPresets()</span></p>\r
483 <p>Please refer to a <a href="dm_javadoc/compbio/data/msa/MsaWS.html">data model  javadoc</a> for a detailed description of each methods. </p>\r
484 <h4><a name="templatestr" id="templatestr"></a>Structure of the template command line client</h4>\r
485 <table width="100%" border="1">\r
486   <tr>\r
487     <td width="18%"><strong>Packages</strong></td>\r
488     <td width="82%"><strong>Classes and Interfaces </strong></td>\r
489   </tr>\r
490   <tr>\r
491     <td>compbio.data.msa </td>\r
492     <td>MsaWS the interface for all multiple sequence alignment web services </td>\r
493   </tr>\r
494   <tr>\r
495     <td>compbio.data.sequence</td>\r
496     <td>JABAWS data types </td>\r
497   </tr>\r
498   <tr>\r
499     <td>compbio.metadata</td>\r
500     <td>JABAWS meta data types </td>\r
501   </tr>\r
502   <tr>\r
503     <td>compbio.ws.client</td>\r
504     <td>JABAWS command line client </td>\r
505   </tr>\r
506 </table>\r
507 <p>Additional utility libraries this client depend upon is the compbio-util-1.3.jar and compbio-annotation-1.0.jar. <br />\r
508   Please refer to a <a href="dm_javadoc/index.html">data model javadoc</a> for a detailed description of each class and its methods. </p>\r
509 <h3>JABA Web Services Internals </h3>\r
510 <h4><a name="testingJaba" id="testingJaba"></a>Testing JABA Web Services</h4>\r
511 <p>You can use a command line client (part of the client only\r
512 package) to test you JABAWS installation as described <a href=\r
513 "howto.html#usingcclient">here</a>. If you downloaded a JABAWS\r
514 server package, you can use <span class=\r
515 "hightlight">&lt;your_jaba_context_name&gt;/WEB-INF/lib/jaba-client.jar</span>\r
516 to test JABAWS installation as described in <a href=\r
517 "howto.html#usingWsTester">how-to</a>. If you downloaded the source\r
518 code, then you could run a number of test suits defined in the\r
519 build.xml ant build file.</p>\r
520 \r
521 <h4><a name="logfiles" id="logfiles"></a>JABAWS Log Files</h4>\r
522 \r
523 <p>JABAWS can be configured to log what it is doing. This comes\r
524 handy if you would like to see who is using your web services or\r
525 need to chase some problems. JABAWS uses <a href=\r
526 "http://logging.apache.org/log4j/1.2/">log4j</a> to do the logging,\r
527 the example of log4j configuration is bundled with JABAWS war file.\r
528 You will find it in the <span class=\r
529 "hightlight">/WEB-INF/classes/log4j.properties</span> file. All the\r
530 lines in this file are commented out. The reason why the logging is\r
531 disabled by default it simple, log4j have to know the exact\r
532 location where the log files should be stored. This is not known up\r
533 until the deployment time. To enable the logging you need to\r
534 define<span class="hightlight">logDir</span> property in the <span\r
535 class="hightlight">log4j.properties</span> and uncomment section of\r
536 the file which corresponds to your need. More information is given\r
537 in the <span class="hightlight">log4j.properties</span> file\r
538 itself. Restart the tomcat or the JABAWS web application to apply\r
539 the settings.</p>\r
540 \r
541 <p>After you have done this, assuming that you did not change the\r
542 log4j.properties file yourself, you should see the application log\r
543 file called <span class="hightlight">activity.log</span>. The\r
544 amount of information logged can be adjusted using different\r
545 logging levels, it is reduced in the following order of log levels\r
546 TRACE, DEBUG, INFO, WARN, ERROR, FATAL.</p>\r
547 \r
548 <p>If you would like to know who is using your services, you might\r
549 want to <a href="howto.html#logs">enable tomcat access\r
550 logging</a>.</p>\r
551 \r
552 <h4><a name="warfile" id="warfile"></a>JABAWS War File Content</h4>\r
553 \r
554 <table width="100%">\r
555 <tr>\r
556 <th width="19%">Directory</th>\r
557 <th width="81%">Content description</th>\r
558 </tr>\r
559 \r
560 <tr>\r
561 <td>conf/</td>\r
562 <td>contains configuration files such as Executable.properties,\r
563 Engine.local.properties, Engine.cluster.properties</td>\r
564 </tr>\r
565 \r
566 <tr>\r
567 <td>conf/settings</td>\r
568 <td>Contains individual executable description files. In particular\r
569 XXXParameters.xml, XXXPresets.xml, XXXLimits.xml where XXX is the\r
570 name of the executable</td>\r
571 </tr>\r
572 \r
573 <tr>\r
574 <td>jobsout/</td>\r
575 <td>Contains directories generated when running an individual executable. E.g. input and output files and some other task\r
576 related data. (optional)</td>\r
577 </tr>\r
578 \r
579 <tr>\r
580 <td>binaries/</td>\r
581 <td>Directory contains native executables - programs,\r
582 windows binaries (optional)</td>\r
583 </tr>\r
584 \r
585 <tr>\r
586 <td>binaries/src</td>\r
587 <td>Contains source of native executables and Linux i386\r
588 binaries.</td>\r
589 </tr>\r
590 \r
591 <tr>\r
592 <td>binaries/matrices</td>\r
593 <td>Substitution matrices <!-- what format ? --></td>\r
594 </tr>\r
595 \r
596 <tr>\r
597 <td>WEB-INF</td>\r
598 <td>Web application descriptor</td>\r
599 </tr>\r
600 \r
601 <tr>\r
602 <td>WEB-INF/lib</td>\r
603 <td>Web application libraries</td>\r
604 </tr>\r
605 \r
606 <tr>\r
607 <td>WEB-INF/classes</td>\r
608 <td>log4j.properties - log configuration file (optional)</td>\r
609 </tr>\r
610 \r
611 <tr>\r
612 <td colspan="2"><strong>Help Pages</strong> </td>\r
613 </tr>\r
614 \r
615 <tr>\r
616 <td>/</td>\r
617 <td>help pages, index.html is the starting page</td>\r
618 </tr>\r
619 \r
620 <tr>\r
621 <td>dm_javadoc</td>\r
622 <td>javadoc for JABAWS client (the link is available from How To\r
623 pages)</td>\r
624 </tr>\r
625 \r
626 <tr>\r
627 <td>prog_docs</td>\r
628 <td>documentation for programmes that JABAWS uses</td>\r
629 </tr>\r
630 \r
631 <tr>\r
632 <td>images</td>\r
633 <td>images referenced by html pages</td>\r
634 </tr>\r
635 </table>\r
636 \r
637 <p>&nbsp;</p>\r
638 </div>\r
639 \r
640 <!-- content end-->\r
641 <div id="copyright">Last update: 17 November 2010<br />\r
642  Peter Troshin, Jim Procter and Geoff Barton, The Barton Group, University of\r
643 Dundee, UK</div>\r
644 </div>\r
645 \r
646 <!-- wrapper end-->\r
647 </div>\r
648 <!-- page end-->\r
649 \r
650 <!-- Google analitics -->\r
651 <script type="text/javascript">\r
652 var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");\r
653 document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));\r
654 </script>\r
655 <script type="text/javascript">\r
656 try{\r
657 var pageTracker = _gat._getTracker("UA-5356328-1");\r
658 pageTracker._trackPageview();\r
659 } catch(err) {}\r
660 </script>\r
661 </body>\r
662 </html>\r
663 \r