JAL-629 a bit more documentation
[jalview.git] / help / help / html / features / clarguments-ng.html
1 <html>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4  * Copyright (C) $$Year-Rel$$ The Jalview Authors
5  * 
6  * This file is part of Jalview.
7  * 
8  * Jalview is free software: you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License 
10  * as published by the Free Software Foundation, either version 3
11  * of the License, or (at your option) any later version.
12  *  
13  * Jalview is distributed in the hope that it will be useful, but 
14  * WITHOUT ANY WARRANTY; without even the implied warranty 
15  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
16  * PURPOSE.  See the GNU General Public License for more details.
17  * 
18  * You should have received a copy of the GNU General Public License
19  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
20  * The Jalview Authors are detailed in the 'AUTHORS' file.
21  -->
22 <title>Jalview Command Line Arguments (next generation)</title>
23 <body>
24
25   <h1>Jalview Command Line Arguments (version 2.11.3.0 and later)</h1>
26
27   <p>
28   From version 2.11.3.0 Jalview processes a new set of command line arguments
29   which allow more powerful and flexible combinations of arguments, though can
30   also be used for very simple use cases too.
31   </p>
32
33   <p>
34   These new arguments are all accessed with a <code>--doubledash</code> form of
35   command line argument (with the one exception where simply opening one or more
36   files can be performed without any arguments other than the filenames).
37   </p>
38
39   <p>
40   The old command line arguments can still be used (see
41   <a href="clarguments.html">the old page on command line arguments</a>) so
42   existing scripts utilising them should not break.
43   </p>
44
45   <p>
46   However, you cannot mix old and new style arguments, so if you use any
47   <code>-singledash</code> arguments, they will all be interpreted as
48   old style arguments with the new <code>--doubledash</code>
49   arguments being ignored.  If you have a script
50   that uses the old arguments without any dashes, and uses the bare-word
51   <code>open</code> then these will also be interpreted as old style arguments.
52   <br/>
53   <strong>Note!</strong> If you use command line arguments without any dashes and
54   <em>don't</em> use the bare-word argument <code>open</code> then all
55   your arguments will be interpreted as alignment files to be opened by the
56   new command line argument process.
57   </p>
58
59   <p>
60   Not everything that can be done with the old arguments is currently implemented in the new arguments but functionality of the new command line arguments will increase over releases.  Significant new functionality, particularly allowing batch processing of files, is available in the new arguments.
61   </p>
62
63   <p>
64   To launch Jalview from the command line, see
65   <a href="commandline.html">running Jalview from the command line</a>.
66   </p>
67
68
69   <h2>Processing command line arguments</h2>
70
71   <p>
72   Jalview no longer necessarily processes arguments sequentially, although
73   in typical use cases you may still want to think of it as doing so.
74   <br/>
75   For more advanced use please see
76   <a href="advancedclarguments.html">Advanced Command Line Arguments</a>.
77   </p>
78
79
80   <h3>Typical Use Cases</h3>
81
82   <h4 name="opening_files">Opening files (<code>--open</code>, <code>--append</code>, <code>--new</code>)</h4>
83
84   <p>
85   To simply open one or more alignment files in different frames just put the filenames as the first arguments:
86   <pre>
87   jalview filename1 filename2 ...
88   </pre>
89   </p>
90
91   <p>
92   You can use shell-expanded wildcards:
93   <pre>
94   jalview this/filename* that/filename* other/filename*
95   </pre>
96   and URLs:
97   <pre>
98   jalview https://rest.uniprot.org/uniprotkb/P00221.fasta
99   </pre>
100   </p>
101
102   <p>
103   (Using initial filenames is the same as using the <code>--open</code> argument, and further arguments can be used
104   after the initial filenames.)
105   </p>
106
107   <h5 name="--open"><code>--open</code></h5>
108
109   <p>
110   Use the <code>--open</code> argument to open alignment files each in their own frame.
111   </p>
112
113   <p>
114   The following are equivalent:
115   <pre>
116   jalview --open filename1 filename2 ...
117
118   jalview --open filename*
119
120   jalview --open filename1 --open filename2 --open ...
121
122   jalview filename1 filename2 ...
123   </pre>
124   </p>
125
126   <p>
127   Similarly you can open URLs:
128   <pre>
129   jalview --open https://rest.uniprot.org/uniprotkb/P00221.fasta
130   </pre>
131   </p>
132
133   <h5 name="--append"><code>--append</code></h5>
134
135   <p>
136   To append several alignment files together use:
137   <pre>
138   jalview --open filename1.fa --append filename2.fa filename3.fa
139   </pre>
140   or, if you haven't previously used <code>--open</code> then you can use --append to open one new frame and keep appending each set of alignments:
141   <pre>
142   jalview --append these/filename*.fa --append more/filename*.fa
143
144   jalview --append https://rest.uniprot.org/uniprotkb/P00221.fasta https://www.uniprot.org/uniprotkb/A0A0K9QVB3/entry
145   </pre>
146   </p>
147
148   <p>
149   <strong>Note</strong> that whilst you can include a Jalview Project File (<code>.jvp</code>) as an <code>--append</code> value, the items in the file will always open in their original frames and not append to another.
150   </p>
151
152   <h5 name="--new"><code>--new</code></h5>
153
154   <p>
155   To append different sets of alignment files in different frames, use <code>--new</code> to move on to a new alignment frame:
156   <pre>
157   jalview --append these/filename*.fa --new --append other/filename*.fa
158   </pre>
159   </p>
160
161   <p>
162   <code>--open</code> is like using <code>--new --append</code> applied to every filename/URL given to <code>--open</code>
163   </p>
164
165
166   <h4 name="alignmentoptions">Alignment options (<code>--colour, --wrap</code>)</h4>
167
168   <h5 name="colour"><code>--colour</code></h5>
169
170   <p>
171   You can specify a residue/base colouring for the alignment using the <code>--colour</code> option (note spelling -- Jalview is made in Scotland!):
172   <pre>
173   jalview --open examples/uniref50.fa --colour gecos-flower
174   </pre>
175   There are several colour schemes that you can use.  See the <a href="../colourSchemes/index.html">page on Colour Schemes</a> for details.
176   The names to use on the command line for colour schemes are:
177   </p>
178   <p>
179   <code>clustal</code>,
180   <br/>
181   <code>blosum62</code>,
182   <br/>
183   <code>pc-identity</code>,
184   <br/>
185   <code>zappo</code>,
186   <br/>
187   <code>taylor</code>,
188   <br/>
189   <code>gecos-flower</code>,
190   <br/>
191   <code>gecos-blossom</code>,
192   <br/>
193   <code>gecos-sunset</code>,
194   <br/>
195   <code>gecos-ocean</code>,
196   <br/>
197   <code>hydrophobic</code>,
198   <br/>
199   <code>helix-propensity</code>,
200   <br/>
201   <code>strand-propensity</code>,
202   <br/>
203   <code>turn-propensity</code>,
204   <br/>
205   <code>buried-index</code>,
206   <br/>
207   <code>nucleotide</code>,
208   <br/>
209   <code>nucleotide-ambiguity</code>,
210   <br/>
211   <code>purine-pyrimidine</code>,
212   <br/>
213   <code>rna-helices</code>,
214   <br/>
215   <code>t-coffee-scores</code>,
216   <br/>
217   <code>sequence-id</code>
218   </p>
219
220   <h5 name="wrap"><code>--wrap</code></h5>
221   <p>
222   An alignment should open with your usual preferences stored in the <code>.jalview_properties</code> file.  To open an alignment with the sequences (definitely) wrapped, following your <code>--open</code> (or first <code>--append</code>) argument use the argument <code>--wrap</code>:
223   <pre>
224   jalview --open examples/uniref50.fa --wrap
225   </pre>
226   To ensure an alignment is not wrapped use <code>--nowrap</code>:
227   <pre>
228   jalview --open examples/uniref50.fa --nowrap
229   </pre>
230   </p>
231
232   <h5 name="annotations"><code>--annotations</code></h5>
233
234   <p>
235   You can specify whether the currently opened alignment frame should show alignment annotations (e.g. Conservation, Quality, Consensus...) or not with either <code>--annotations</code> or <code>--noannotations</code>.  If you don't specify then your saved preference will be used.
236   <pre>
237   jalview --open examples/uniref50.fa --noannotations
238   </pre>
239   </p>
240
241   <h5 name="title"><code>--title</code></h5>
242
243   <p>
244   If you would like to give the alignment frame a specific title you can do so with the <code>--title</code> option:
245   <pre>
246   jalview --open examples/uniref50.fa --title "My example alignment"
247   </pre>
248   </p>
249
250   <h5 name=""><code>--structure</code></h5>
251
252   <p>
253   You can add a 3D structure file to a sequence in the current alignment frame with the <code>--structure</code> option:
254   <pre>
255   jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb
256   </pre>
257   </p>
258
259
260   <p>
261   <code>seqid</code>:
262   By default this attaches to the first sequence in the alignment but most likely you will want to attach it to another sequence.
263   To do this you can specify a <em>sub-value</em> with the sequence ID, by preceding the value with square brackets and <code>seqid=SequenceId</code>
264   like this:
265   <pre>
266   jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
267   </pre>
268
269   Remember that you might need to escape any spaces in the sequence ID or enclose the ID in quotation marks.
270   </p>
271
272   <p>
273   <em><code>index</code></em>:
274   You can alternatively specify the (zero-indexed) index of the sequence within the alignment, although this is less precise.  So to attach the structure to the 8th sequence use:
275   <pre>
276   jalview --open examples/uniref50.fa --structure [7]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
277   </pre>
278   </p>
279
280   <p>
281   <code>viewer</code>:
282   You can specify which structure viewer (or not) to use to open the structure using the <code>viewer</code> sub-value.  Multiple sub-values can be specified, separated by a comma ','.  Possible values for the <code>viewer</code> sub-value are:
283   <br/>
284   <code>none</code>,
285   <br/>
286   <code>jmol</code>,
287   <br/>
288   <code>chimera</code>,
289   <br/>
290   <code>chimerax</code>,
291   <br/>
292   <code>pymol</code>.
293   </p>
294   <p>
295   <code>none</code> and <code>jmol</code> will always be available, but to use the others you must have the appropriate software already set up on your computer and in Jalview.  See the page <a href="../features/viewingpdbs.html">Discovering and Viewing PDB and 3D-Beacons structures</a> for more details.
296   <pre>
297   jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL,viewer=none]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
298   </pre>
299   </p>
300
301
302   <h4 name="">(<code></code>)</h4>
303
304   <p>
305   </p>
306
307   <h5 name=""><code>--</code></h5>
308
309   <p>
310   <pre>
311   </pre>
312   </p>
313
314
315
316
317
318
319
320   <p>
321   Jalview processes arguments on the command line sequentially. If
322   you would like to pass a <a href="jvlfiles.html">'JVL' file</a> containing
323   <a href="../memory.html">memory settings</a> or any other launch
324   parameters, then include it at the beginning of the command line to
325   ensure they are processed before any remaining arguments.
326   <br>
327   Typical command line execution follows the following pattern:
328   <pre>
329   jalview -open &lt;Alignment File/URL&gt; [additional import arguments] [export arguments]
330   </pre>
331   
332   <table width="100%" border="1" cellspacing="0" cellpadding="0">
333     <tr>
334       <td width="27%"><div align="center">-nodisplay</div></td>
335       <td width="73%"><div align="left">Run Jalview without
336           User Interface. (automatically disables questionnaire, version
337           and usage stats checks)</div></td>
338     </tr>
339     <tr>
340       <td><div align="center">-nowebservicediscovery</div></td>
341       <td><div align="left">Do not query configured servers to
342           discover web services (<em>Since 2.11.2.0</em>)</div></td>
343     </tr>
344     <tr>
345       <td><div align="center">-open FILE/URL</div></td>
346       <td><div align="left">Specify the alignment file to
347           open or process by providing additional arguments.</div></td>
348     </tr>
349     <tr>
350       <td><div align="center">-props FILE/URL</div></td>
351       <td><div align="left">Use the given Jalview properties
352           file instead of users default.</div></td>
353     </tr>
354     <tr>
355       <td><div align="center">-setprop PROPERTY=value</div></td>
356       <td><div align="left">(JalviewJS ONLY) sets the given
357           property to the given value</div></td>
358     </tr>
359     <tr>
360       <td><div align="center">-features FILE/URL</div></td>
361       <td><div align="left">
362           <p>
363             Use the given file to add sequence features to an alignment.
364             See <a href="featuresFormat.html" target="NEW">Features
365               File</a> (Known as Groups file prior to 2.08) description.
366           </p>
367
368         </div></td>
369     </tr>
370     <tr>
371       <td>
372         <div align="center">-colour COLOURSCHEME</div>
373       </td>
374       <td>Set the colourscheme for the alignment. This can be any
375         of the built-in colourschemes, a name of a predefined
376         colourscheme (defined in the Jalview properties file), or an
377         'inline' colourscheme (see the applet's colour parameter for
378         more information).</td>
379     </tr>
380     <tr>
381       <td>
382         <div align="center">-annotations FILE/URL</div>
383       </td>
384       <td>Add precalculated annotations to the alignment. See <a
385         href="annotationsFormat.html" target="NEW">Annotation
386           File</a> description.
387       </td>
388     </tr>
389         <tr>
390       <td>
391         <div align="center">-no-annotation</div>
392       </td>
393       <td>Do not display annotation below the alignment. 
394       </td>
395     </tr>
396     
397     <tr>
398       <td>
399         <div align="center">-tree FILE/URL</div>
400       <td>
401         <div align="left">Load the given newick format tree file
402           onto the alignment</div>
403       </td>
404     </tr>
405     <tr>
406       <td>
407         <div align="center">-questionnaire URL</div>
408       <td>
409         <div align="left">Queries the given URL for information
410           about any Jalview user questionnaires</div>
411       </td>
412     </tr>
413     <tr>
414       <td>
415         <div align="center">-noquestionnaire</div>
416       <td>
417         <div align="left">Turn off questionnaire check</div>
418       </td>
419     </tr>
420     <tr>
421       <td>
422         <div align="center">-nonews</div>
423       <td>
424         <div align="left">
425           Disable check for <a href="../webServices/newsreader.html">Jalview
426             news</a> on startup (not recommended other than for classroom /
427           demo usage)
428         </div>
429       </td>
430     </tr>
431     <tr>
432       <td>
433         <div align="center">-nousagestats</div>
434       <td>
435         <div align="left">Turn off google analytics usage tracking</div>
436       </td>
437     </tr>
438     <tr>
439       <td>
440         <div align="center">-[no]sortbytree</div>
441       <td>
442         <div align="left">Enable or disable automatic sorting of
443           associated view when a new tree is displayed</div>
444       </td>
445     </tr>
446     <tr>
447       <td>
448         <div align="center">-groovy FILE/URL</div>
449       <td>
450         <div align="left">Execute groovy script in FILE (where
451           FILE may be 'STDIN' to read from the standard input) after all
452           other arguments have been processed</div>
453       </td>
454     </tr>
455     <tr>
456       <td>
457         <div align="center">-jabaws URL</div>
458       <td>
459         <div align="left">Specify the URL of the preferred JABAWS
460           server</div>
461       </td>
462     </tr>
463     <tr>
464       <td>
465         <div align="center">-fasta FILE</div>
466       </td>
467
468       <td>
469         <div align="left">Create alignment file FILE in Fasta
470           format.</div>
471       </td>
472     </tr>
473     <tr>
474       <td><div align="center">-clustal FILE</div></td>
475       <td><div align="left">Create alignment file FILE in
476           Clustal format.</div></td>
477     </tr>
478     <tr>
479       <td><div align="center">-msf FILE</div></td>
480
481       <td><div align="left">Create alignment file FILE in MSF
482           format.</div></td>
483     </tr>
484     <tr>
485       <td><div align="center">-pileup FILE</div></td>
486       <td><div align="left">Create alignment file FILE in
487           Pileup format.</div></td>
488     </tr>
489     <tr>
490       <td><div align="center">-pir FILE</div></td>
491
492       <td><div align="left">Create alignment file FILE in PIR
493           format.</div></td>
494     </tr>
495     <tr>
496       <td><div align="center">-pfam FILE</div></td>
497       <td><div align="left">Create alignment file FILE in
498           PFAM format.</div></td>
499     </tr>
500     <tr>
501       <td><div align="center">-blc FILE</div></td>
502       <td><div align="left">Create alignment file FILE in BLC
503           format.</div></td>
504     </tr>
505     <tr>
506       <td><div align="center">-json FILE</div></td>
507       <td><div align="left">Create alignment file FILE in
508           JSON format.</div></td>
509     </tr>
510     <tr>
511       <td><div align="center">-jalview FILE</div></td>
512
513       <td><div align="left">Create alignment file FILE in
514           Jalview format.</div></td>
515     </tr>
516     <tr>
517       <td><div align="center">-png FILE</div></td>
518       <td><div align="left">Create PNG image FILE from
519           alignment.</div></td>
520     </tr>
521     <tr>
522       <td><div align="center">-imgMap FILE</div></td>
523
524       <td><div align="left">Create HTML file FILE with image
525           map of PNG image.</div></td>
526     </tr>
527     <tr>
528       <td><div align="center">-eps FILE</div></td>
529       <td><div align="left">Create EPS file FILE from
530           alignment.</div></td>
531     </tr>
532     <tr>
533       <td><div align="center">-svg FILE</div></td>
534       <td><div align="left">Create Scalable Vector Graphics
535           file FILE from alignment.</div></td>
536     </tr>
537     <tr>
538       <td><div align="center">-biojsMSA FILE</div></td>
539       <td><div align="left">Write an HTML page to display
540           the alignment with the <a href="biojsmsa.html">
541           BioJS MSAviewer MSA</a>
542           </div>
543       </td>
544     </tr>
545     <tr>
546       <td><div align="center">-jvmmempc=PERCENT</div></td>
547       <td><div align="left"><em>Only available with standalone executable jar or jalview.bin.Launcher.</em>
548           Limit maximum heap size (memory) to PERCENT% of total physical memory detected.
549           This defaults to 90 if total physical memory can be detected.
550           See <a href="../memory.html">Memory usage settings for Jalview</a> for more details.
551           </div>
552       </td>
553     </tr>
554     <tr>
555       <td><div align="center">-jvmmemmax=MAXMEMORY</div></td>
556       <td><div align="left"><em>Only available with standalone executable jar or jalview.bin.Launcher.</em>
557           Limit maximum heap size (memory) to MAXMEMORY. MAXMEMORY can be specified in bytes, kilobytes(k), megabytes(m),
558           gigabytes(g) or if you're lucky enough, terabytes(t).
559           This defaults to 32g if total physical memory can be detected, or to 8g if total physical memory cannot be detected.
560           See <a href="../memory.html">Memory usage settings for Jalview</a> for more details.
561           </div>
562       </td>
563     </tr>
564   </table>
565 </body>
566 </html>