JWS-119 & JWS-116 Fixed the location of the documentation pages. Also fixed the relat...
[jabaws.git] / website / docs / client.html
1
2
3 <!DOCTYPE html>
4 <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
5 <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
6 <head>
7   <meta charset="utf-8">
8   
9   <meta name="viewport" content="width=device-width, initial-scale=1.0">
10   
11   <title>Command Line Client (CLI) &mdash; JABAWS 2.2 documentation</title>
12   
13
14   
15   
16   
17   
18
19   
20
21   
22   
23     
24
25   
26
27   
28   
29     <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
30   
31
32   
33
34   
35         <link rel="index" title="Index"
36               href="genindex.html"/>
37         <link rel="search" title="Search" href="search.html"/>
38     <link rel="top" title="JABAWS 2.2 documentation" href="index.html"/>
39         <link rel="next" title="Web Application Archive (WAR)" href="war.html"/>
40         <link rel="prev" title="Included Tools" href="included_tools.html"/> 
41
42   
43   <script src="_static/js/modernizr.min.js"></script>
44
45 </head>
46
47 <body class="wy-body-for-nav" role="document">
48
49    
50   <div class="wy-grid-for-nav">
51
52     
53     <nav data-toggle="wy-nav-shift" class="wy-nav-side">
54       <div class="wy-side-scroll">
55         <div class="wy-side-nav-search">
56           
57
58           
59             <a href="index.html" class="icon icon-home"> JABAWS
60           
61
62           
63           </a>
64
65           
66             
67             
68               <div class="version">
69                 2.2
70               </div>
71             
72           
73
74           
75 <div role="search">
76   <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
77     <input type="text" name="q" placeholder="Search docs" />
78     <input type="hidden" name="check_keywords" value="yes" />
79     <input type="hidden" name="area" value="default" />
80   </form>
81 </div>
82
83           
84         </div>
85
86         <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
87           
88             
89             
90               
91             
92             
93               <p class="caption"><span class="caption-text">Contents:</span></p>
94 <ul class="current">
95 <li class="toctree-l1"><a class="reference internal" href="getting_started.html">Getting Started</a></li>
96 <li class="toctree-l1"><a class="reference internal" href="included_tools.html">Included Tools</a></li>
97 <li class="toctree-l1 current"><a class="current reference internal" href="#">Command Line Client (CLI)</a><ul>
98 <li class="toctree-l2"><a class="reference internal" href="#installing">Installing</a></li>
99 <li class="toctree-l2"><a class="reference internal" href="#usage">Usage</a></li>
100 <li class="toctree-l2"><a class="reference internal" href="#example-usage">Example Usage</a></li>
101 </ul>
102 </li>
103 <li class="toctree-l1"><a class="reference internal" href="war.html">Web Application Archive (WAR)</a></li>
104 <li class="toctree-l1"><a class="reference internal" href="va.html">Virtual Appliance (VA)</a></li>
105 <li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced Usage</a></li>
106 <li class="toctree-l1"><a class="reference internal" href="develop.html">For Developers</a></li>
107 <li class="toctree-l1"><a class="reference internal" href="stats.html">Usage Statistics</a></li>
108 <li class="toctree-l1"><a class="reference internal" href="citations.html">Citations</a></li>
109 <li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
110 </ul>
111
112             
113           
114         </div>
115       </div>
116     </nav>
117
118     <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
119
120       
121       <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
122         
123           <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
124           <a href="index.html">JABAWS</a>
125         
126       </nav>
127
128
129       
130       <div class="wy-nav-content">
131         <div class="rst-content">
132           
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148 <div role="navigation" aria-label="breadcrumbs navigation">
149
150   <ul class="wy-breadcrumbs">
151     
152       <li><a href="index.html">Docs</a> &raquo;</li>
153         
154       <li>Command Line Client (CLI)</li>
155     
156     
157       <li class="wy-breadcrumbs-aside">
158         
159             
160             <!-- <a href="_sources/client.rst.txt" rel="nofollow"> View page source</a> -->
161             <a href="../">Return to the JABAWS homepage</a>
162           
163         
164       </li>
165     
166   </ul>
167
168   
169   <hr/>
170 </div>
171           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
172            <div itemprop="articleBody">
173             
174   <div class="section" id="command-line-client-cli">
175 <h1>Command Line Client (CLI)<a class="headerlink" href="#command-line-client-cli" title="Permalink to this headline">¶</a></h1>
176 <p>The JABAWS client is a Java application that lets you run the programs for which a JABAWS server provides web services. This command line application this is able to call any of the JABAWS web services on any instance of JABAWS Server available over the web. The basic client is useful if you would like to test or execute the programs provided by the JABAWS server in your own scripts, but you do not want to handle any web service specific details. The client is an open source software, so you can also use the source code to as an example how to manipulate with JABAWS web services in your own code. The JABA Web Services are <a class="reference external" href="http://www.ws-i.org/">WS-I</a> compliant. This means that you can access them from any language that has libraries or functions for consuming interoperable SOAP web services. More information on how to develop software that access JABAWS services is provided in the <a class="reference external" href="develop.html#accessing-jabaws-from-your-program">documentation pages</a>.</p>
177 <p>The command line client comes as a part of <a class="reference external" href="../download.jsp#client">client package</a> which you are welcome to download. The command line client can be used to align sequences using any of JABAWS supported web services. The client is OS independent and supports most of the functions which can be accessed programmatically via <a class="reference external" href="http://www.compbio.dundee.ac.uk/jabaws/full_javadoc/index.html">JABAWS API</a>. Using this client you could align sequences using presets or custom parameters, please see examples of this below. Here is the list of options supported by the command line client.</p>
178 <hr class="docutils" />
179 <div class="section" id="installing">
180 <span id="client-installing"></span><h2>Installing<a class="headerlink" href="#installing" title="Permalink to this headline">¶</a></h2>
181 <div class="admonition tip">
182 <p class="first admonition-title">Tip</p>
183 <p class="last">Check if you are running the recommended version of Java.</p>
184 </div>
185 <p>You need Java 7 or higher installed in your machine to be able to run the JABAWS CLI client.
186 Please see the <cite>Java</cite> web site for up to date instructions and downloads.</p>
187 <hr class="docutils" />
188 </div>
189 <div class="section" id="usage">
190 <span id="cli-usage"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
191 <div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">java</span> <span class="o">-</span><span class="n">jar</span> <span class="n">jabaws</span><span class="o">-</span><span class="n">full</span><span class="o">-</span><span class="n">client</span><span class="o">-</span><span class="mf">2.2</span><span class="o">.</span><span class="mf">0.</span><span class="n">jar</span>
192 </pre></div>
193 </div>
194 <div class="highlight-default"><div class="highlight"><pre><span></span>Usage:
195 java -jar &lt;path_to_jar_file&gt; -h=host_and_context -s=serviceName ACTION [OPTIONS]
196 -h=&lt;host_and_context&gt; - a full URL to the JABAWS web server including context path e.g. http://10.31.10.159:8080/ws
197 -s=&lt;ServiceName&gt; - one of [MafftWS, MuscleWS, ClustalWS, ClustalOWS, TcoffeeWS, ProbconsWS, AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPredWS]
198
199
200 ACTIONS:
201 -i=&lt;inputFile&gt; - full path to fasta formatted sequence file, from which to align sequences
202 -parameters - lists parameters supported by web service
203 -presets - lists presets supported by web service
204 -limits - lists web services limits
205 Please note that if input file is specified other actions are ignored
206
207
208  OPTIONS: (only for use with -i action):
209 -r=&lt;presetName&gt; - name of the preset to use
210 -o=&lt;outputFile&gt; - full path to the file where to write an alignment
211 -f=&lt;parameterInputFile&gt; - the name of the file with the list of parameters to use.
212
213 Please note that -r and -f options cannot be used together. Alignment is done with either preset or aparameters from the file, but not both!
214 </pre></div>
215 </div>
216 <hr class="docutils" />
217 </div>
218 <div class="section" id="example-usage">
219 <span id="cli-example"></span><h2>Example Usage<a class="headerlink" href="#example-usage" title="Permalink to this headline">¶</a></h2>
220 <p>Align sequences from input.fasta file using Mafft web service with default settings, print alignment in Clustal format to console.</p>
221 <div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">java</span> <span class="o">-</span><span class="n">jar</span> <span class="n">jabaws</span><span class="o">-</span><span class="n">full</span><span class="o">-</span><span class="n">client</span><span class="o">-</span><span class="mf">2.2</span><span class="o">.</span><span class="mf">0.</span><span class="n">jar</span> <span class="o">-</span><span class="n">h</span><span class="o">=</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">myhost</span><span class="o">.</span><span class="n">compbio</span><span class="o">.</span><span class="n">ac</span><span class="o">.</span><span class="n">uk</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">jabaws</span> <span class="o">-</span><span class="n">s</span><span class="o">=</span><span class="n">MafftWS</span> <span class="o">-</span><span class="n">i</span><span class="o">=</span><span class="n">d</span><span class="p">:</span>\<span class="nb">input</span><span class="o">.</span><span class="n">fasta</span>
222 </pre></div>
223 </div>
224 <p>Content of input.fasta file is show below (please note sequences has been trimmed for clarity)</p>
225 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&gt;</span><span class="n">Foobar</span>
226 <span class="n">MTADGPRELLQLRAAVRHRPQDFVAWL</span>
227 <span class="o">&gt;</span><span class="n">Bar</span>
228 <span class="n">MGDTTAGEMAVQRGLALHQ</span>
229 <span class="o">&gt;</span><span class="n">Foofriend</span>
230 <span class="n">MTADGPRELLQLRAAV</span>
231 </pre></div>
232 </div>
233 <p>Align as in above example, but write output alignment in a file out.clustal, using parameters defined in prm.in file</p>
234 <div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">java</span> <span class="o">-</span><span class="n">jar</span> <span class="n">jabaws</span><span class="o">-</span><span class="n">full</span><span class="o">-</span><span class="n">client</span><span class="o">-</span><span class="mf">2.2</span><span class="o">.</span><span class="mf">0.</span><span class="n">jar</span> <span class="o">-</span><span class="n">h</span><span class="o">=</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">myhost</span><span class="o">.</span><span class="n">compbio</span><span class="o">.</span><span class="n">ac</span><span class="o">.</span><span class="n">uk</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">jabaws</span>  <span class="o">-</span><span class="n">s</span><span class="o">=</span><span class="n">MafftWS</span> <span class="o">-</span><span class="n">i</span><span class="o">=</span><span class="n">d</span><span class="p">:</span>\<span class="nb">input</span><span class="o">.</span><span class="n">fasta</span> <span class="o">-</span><span class="n">o</span><span class="o">=</span><span class="n">d</span><span class="p">:</span>\<span class="n">out</span><span class="o">.</span><span class="n">clustal</span> <span class="o">-</span><span class="n">f</span><span class="o">=</span><span class="n">prm</span><span class="o">.</span><span class="ow">in</span>
235 </pre></div>
236 </div>
237 <p>The content of the prm.in file is shown below</p>
238 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">--</span><span class="n">nofft</span>
239 <span class="o">--</span><span class="n">noscore</span>
240 <span class="o">--</span><span class="n">fastaparttree</span>
241 <span class="o">--</span><span class="n">retree</span><span class="o">=</span><span class="mi">10</span>
242 <span class="o">--</span><span class="n">op</span><span class="o">=</span><span class="mf">2.2</span>
243 </pre></div>
244 </div>
245 <p>The format of the file is the same for all JABAWS web services. Parameters are specified in exactly the same way as for native executables - alignment programs like Mafft etc. So parameters which you can use with command line version of an alignment program can be used with JABAWS. Most of the settings controlling alignment process are supported, but because any output has to be handled by JABAWS, settings controlling output are not allowed to be changed. For a list of parameters supported by a web service see the next example. In prm.in parameters are separated by the new line, and name of the parameter is separated from its value with an equals sign. This format is constant no matter which JABAWS web service is used.</p>
246 <div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">java</span> <span class="o">-</span><span class="n">jar</span> <span class="n">jabaws</span><span class="o">-</span><span class="n">full</span><span class="o">-</span><span class="n">client</span><span class="o">-</span><span class="mf">2.2</span><span class="o">.</span><span class="mf">0.</span><span class="n">jar</span> <span class="o">-</span><span class="n">h</span><span class="o">=</span><span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">myhost</span><span class="o">.</span><span class="n">compbio</span><span class="o">.</span><span class="n">ac</span><span class="o">.</span><span class="n">uk</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">jabaws</span> <span class="o">-</span><span class="n">s</span><span class="o">=</span><span class="n">MafftWS</span> <span class="o">-</span><span class="n">parameters</span>
247 </pre></div>
248 </div>
249 <p>The same client can be used to access JABAWS on different hosts. Just point the client to the host you want to use by changing the value of -h key.</p>
250 <p>For example you used <code class="docutils literal"><span class="pre">-h=http://myhost.compbio.ac.uk:8080/jabaws</span></code> server, now you want to use another server to <code class="docutils literal"><span class="pre">-h=http://mylabserver.myuni.edu</span></code>. This comes handy if your favorite server is off and you need to do the job yesterday.</p>
251 </div>
252 </div>
253
254
255            </div>
256            <div class="articleComments">
257             
258            </div>
259           </div>
260           <footer>
261   
262     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
263       
264         <a href="war.html" class="btn btn-neutral float-right" title="Web Application Archive (WAR)" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
265       
266       
267         <a href="included_tools.html" class="btn btn-neutral" title="Included Tools" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
268       
269     </div>
270   
271
272   <hr/>
273
274   <div role="contentinfo">
275     <p><a href="../">JABAWS 2.2</a>
276         &copy; Copyright 2017, Peter Troshin, Alexander Sherstnev, Jim Procter, Daniel Barton, Fábio Madeira, Alexey Drozdetskiy, Suzanne Duce and Geoff Barton.
277
278     </p>
279   </div>
280   Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 
281
282 </footer>
283         </div>
284       </div>
285
286     </section>
287
288   </div>
289   
290
291
292   
293
294     <script type="text/javascript">
295         var DOCUMENTATION_OPTIONS = {
296             URL_ROOT:'./',
297             VERSION:'2.2',
298             LANGUAGE:'None',
299             COLLAPSE_INDEX:false,
300             FILE_SUFFIX:'.html',
301             HAS_SOURCE:  true,
302             SOURCELINK_SUFFIX: '.txt'
303         };
304     </script>
305       <script type="text/javascript" src="_static/jquery.js"></script>
306       <script type="text/javascript" src="_static/underscore.js"></script>
307       <script type="text/javascript" src="_static/doctools.js"></script>
308
309   
310
311   
312   
313     <script type="text/javascript" src="_static/js/theme.js"></script>
314   
315
316   
317   
318   <script type="text/javascript">
319       jQuery(function () {
320           SphinxRtdTheme.StickyNav.enable();
321       });
322   </script>
323    
324
325 </body>
326 </html>