JWS-114 Fixed what the default for local and cluster should (also considering people...
[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           
162         
163       </li>
164     
165   </ul>
166
167   
168   <hr/>
169 </div>
170           <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
171            <div itemprop="articleBody">
172             
173   <div class="section" id="command-line-client-cli">
174 <h1>Command Line Client (CLI)<a class="headerlink" href="#command-line-client-cli" title="Permalink to this headline">¶</a></h1>
175 <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>
176 <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>
177 <hr class="docutils" />
178 <div class="section" id="installing">
179 <span id="client-installing"></span><h2>Installing<a class="headerlink" href="#installing" title="Permalink to this headline">¶</a></h2>
180 <div class="admonition tip">
181 <p class="first admonition-title">Tip</p>
182 <p class="last">Check if you are running the recommended version of Java.</p>
183 </div>
184 <p>You need Java 7 or higher installed in your machine to be able to run the JABAWS CLI client.
185 Please see the <cite>Java</cite> web site for up to date instructions and downloads.</p>
186 <hr class="docutils" />
187 </div>
188 <div class="section" id="usage">
189 <span id="cli-usage"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
190 <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">jaba</span><span class="o">-</span><span class="n">client</span><span class="o">.</span><span class="n">jar</span>
191 </pre></div>
192 </div>
193 <div class="highlight-default"><div class="highlight"><pre><span></span>Usage:
194 java -jar &lt;path_to_jar_file&gt; -h=host_and_context -s=serviceName ACTION [OPTIONS]
195 -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
196 -s=&lt;ServiceName&gt; - one of [MafftWS, MuscleWS, ClustalWS, ClustalOWS, TcoffeeWS, ProbconsWS, AAConWS, JronnWS, DisemblWS, GlobPlotWS, IUPredWS]
197
198
199 ACTIONS:
200 -i=&lt;inputFile&gt; - full path to fasta formatted sequence file, from which to align sequences
201 -parameters - lists parameters supported by web service
202 -presets - lists presets supported by web service
203 -limits - lists web services limits
204 Please note that if input file is specified other actions are ignored
205
206
207  OPTIONS: (only for use with -i action):
208 -r=&lt;presetName&gt; - name of the preset to use
209 -o=&lt;outputFile&gt; - full path to the file where to write an alignment
210 -f=&lt;parameterInputFile&gt; - the name of the file with the list of parameters to use.
211
212 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!
213 </pre></div>
214 </div>
215 <hr class="docutils" />
216 </div>
217 <div class="section" id="example-usage">
218 <span id="cli-example"></span><h2>Example Usage<a class="headerlink" href="#example-usage" title="Permalink to this headline">¶</a></h2>
219 <p>Align sequences from input.fasta file using Mafft web service with default settings, print alignment in Clustal format to console.</p>
220 <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="nb">min</span><span class="o">-</span><span class="n">client</span><span class="o">.</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>
221 </pre></div>
222 </div>
223 <p>Content of input.fasta file is show below (please note sequences has been trimmed for clarity)</p>
224 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">&gt;</span><span class="n">Foobar</span>
225 <span class="n">MTADGPRELLQLRAAVRHRPQDFVAWL</span>
226 <span class="o">&gt;</span><span class="n">Bar</span>
227 <span class="n">MGDTTAGEMAVQRGLALHQ</span>
228 <span class="o">&gt;</span><span class="n">Foofriend</span>
229 <span class="n">MTADGPRELLQLRAAV</span>
230 </pre></div>
231 </div>
232 <p>Align as in above example, but write output alignment in a file out.clustal, using parameters defined in prm.in file</p>
233 <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="nb">min</span><span class="o">-</span><span class="n">client</span><span class="o">.</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>
234 </pre></div>
235 </div>
236 <p>The content of the prm.in file is shown below</p>
237 <div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">--</span><span class="n">nofft</span>
238 <span class="o">--</span><span class="n">noscore</span>
239 <span class="o">--</span><span class="n">fastaparttree</span>
240 <span class="o">--</span><span class="n">retree</span><span class="o">=</span><span class="mi">10</span>
241 <span class="o">--</span><span class="n">op</span><span class="o">=</span><span class="mf">2.2</span>
242 </pre></div>
243 </div>
244 <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>
245 <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="nb">min</span><span class="o">-</span><span class="n">client</span><span class="o">.</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>
246 </pre></div>
247 </div>
248 <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>
249 <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>
250 </div>
251 </div>
252
253
254            </div>
255            <div class="articleComments">
256             
257            </div>
258           </div>
259           <footer>
260   
261     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
262       
263         <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>
264       
265       
266         <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>
267       
268     </div>
269   
270
271   <hr/>
272
273   <div role="contentinfo">
274     <p><a href="../">JABAWS 2.2</a>
275         &copy; Copyright 2017, Peter Troshin, Alexander Sherstnev, Jim Procter, Alexey Drozdetskiy, Daniel Barton, Suzanne Duce, Fábio Madeira and Geoff Barton.
276
277     </p>
278   </div>
279   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>. 
280
281 </footer>
282         </div>
283       </div>
284
285     </section>
286
287   </div>
288   
289
290
291   
292
293     <script type="text/javascript">
294         var DOCUMENTATION_OPTIONS = {
295             URL_ROOT:'./',
296             VERSION:'2.2',
297             LANGUAGE:'None',
298             COLLAPSE_INDEX:false,
299             FILE_SUFFIX:'.html',
300             HAS_SOURCE:  true,
301             SOURCELINK_SUFFIX: '.txt'
302         };
303     </script>
304       <script type="text/javascript" src="_static/jquery.js"></script>
305       <script type="text/javascript" src="_static/underscore.js"></script>
306       <script type="text/javascript" src="_static/doctools.js"></script>
307
308   
309
310   
311   
312     <script type="text/javascript" src="_static/js/theme.js"></script>
313   
314
315   
316   
317   <script type="text/javascript">
318       jQuery(function () {
319           SphinxRtdTheme.StickyNav.enable();
320       });
321   </script>
322    
323
324 </body>
325 </html>