JAL-629 Change colour scheme shortnames to something consistent and command-line...
[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>--newframe</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="--newframe"><code>--newframe</code></h5>
153
154   <p>
155   To append different sets of alignment files in different frames, use <code>--newframe</code> to move on to a new alignment frame:
156   <pre>
157   jalview --append these/filename*.fa --newframe --append other/filename*.fa
158   </pre>
159   </p>
160
161   <p>
162   <code>--open</code> is like using <code>--newframe --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   <code>index</code>:
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   <br/>
294   <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.
295   <pre>
296   jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL,viewer=none]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
297   </pre>
298   </p>
299
300
301   <h4 name="">(<code></code>)</h4>
302
303   <p>
304   </p>
305
306   <h5 name=""><code>--</code></h5>
307
308   <p>
309   <pre>
310   </pre>
311   </p>
312
313
314
315
316
317
318
319   <p>
320   Jalview processes arguments on the command line sequentially. If
321   you would like to pass a <a href="jvlfiles.html">'JVL' file</a> containing
322   <a href="../memory.html">memory settings</a> or any other launch
323   parameters, then include it at the beginning of the command line to
324   ensure they are processed before any remaining arguments.
325   <br>
326   Typical command line execution follows the following pattern:
327   <pre>
328   jalview -open &lt;Alignment File/URL&gt; [additional import arguments] [export arguments]
329   </pre>
330   
331   <table width="100%" border="1" cellspacing="0" cellpadding="0">
332     <tr>
333       <td width="27%"><div align="center">-nodisplay</div></td>
334       <td width="73%"><div align="left">Run Jalview without
335           User Interface. (automatically disables questionnaire, version
336           and usage stats checks)</div></td>
337     </tr>
338     <tr>
339       <td><div align="center">-nowebservicediscovery</div></td>
340       <td><div align="left">Do not query configured servers to
341           discover web services (<em>Since 2.11.2.0</em>)</div></td>
342     </tr>
343     <tr>
344       <td><div align="center">-open FILE/URL</div></td>
345       <td><div align="left">Specify the alignment file to
346           open or process by providing additional arguments.</div></td>
347     </tr>
348     <tr>
349       <td><div align="center">-props FILE/URL</div></td>
350       <td><div align="left">Use the given Jalview properties
351           file instead of users default.</div></td>
352     </tr>
353     <tr>
354       <td><div align="center">-setprop PROPERTY=value</div></td>
355       <td><div align="left">(JalviewJS ONLY) sets the given
356           property to the given value</div></td>
357     </tr>
358     <tr>
359       <td><div align="center">-features FILE/URL</div></td>
360       <td><div align="left">
361           <p>
362             Use the given file to add sequence features to an alignment.
363             See <a href="featuresFormat.html" target="NEW">Features
364               File</a> (Known as Groups file prior to 2.08) description.
365           </p>
366
367         </div></td>
368     </tr>
369     <tr>
370       <td>
371         <div align="center">-colour COLOURSCHEME</div>
372       </td>
373       <td>Set the colourscheme for the alignment. This can be any
374         of the built-in colourschemes, a name of a predefined
375         colourscheme (defined in the Jalview properties file), or an
376         'inline' colourscheme (see the applet's colour parameter for
377         more information).</td>
378     </tr>
379     <tr>
380       <td>
381         <div align="center">-annotations FILE/URL</div>
382       </td>
383       <td>Add precalculated annotations to the alignment. See <a
384         href="annotationsFormat.html" target="NEW">Annotation
385           File</a> description.
386       </td>
387     </tr>
388         <tr>
389       <td>
390         <div align="center">-no-annotation</div>
391       </td>
392       <td>Do not display annotation below the alignment. 
393       </td>
394     </tr>
395     
396     <tr>
397       <td>
398         <div align="center">-tree FILE/URL</div>
399       <td>
400         <div align="left">Load the given newick format tree file
401           onto the alignment</div>
402       </td>
403     </tr>
404     <tr>
405       <td>
406         <div align="center">-questionnaire URL</div>
407       <td>
408         <div align="left">Queries the given URL for information
409           about any Jalview user questionnaires</div>
410       </td>
411     </tr>
412     <tr>
413       <td>
414         <div align="center">-noquestionnaire</div>
415       <td>
416         <div align="left">Turn off questionnaire check</div>
417       </td>
418     </tr>
419     <tr>
420       <td>
421         <div align="center">-nonews</div>
422       <td>
423         <div align="left">
424           Disable check for <a href="../webServices/newsreader.html">Jalview
425             news</a> on startup (not recommended other than for classroom /
426           demo usage)
427         </div>
428       </td>
429     </tr>
430     <tr>
431       <td>
432         <div align="center">-nousagestats</div>
433       <td>
434         <div align="left">Turn off google analytics usage tracking</div>
435       </td>
436     </tr>
437     <tr>
438       <td>
439         <div align="center">-[no]sortbytree</div>
440       <td>
441         <div align="left">Enable or disable automatic sorting of
442           associated view when a new tree is displayed</div>
443       </td>
444     </tr>
445     <tr>
446       <td>
447         <div align="center">-groovy FILE/URL</div>
448       <td>
449         <div align="left">Execute groovy script in FILE (where
450           FILE may be 'STDIN' to read from the standard input) after all
451           other arguments have been processed</div>
452       </td>
453     </tr>
454     <tr>
455       <td>
456         <div align="center">-jabaws URL</div>
457       <td>
458         <div align="left">Specify the URL of the preferred JABAWS
459           server</div>
460       </td>
461     </tr>
462     <tr>
463       <td>
464         <div align="center">-fasta FILE</div>
465       </td>
466
467       <td>
468         <div align="left">Create alignment file FILE in Fasta
469           format.</div>
470       </td>
471     </tr>
472     <tr>
473       <td><div align="center">-clustal FILE</div></td>
474       <td><div align="left">Create alignment file FILE in
475           Clustal format.</div></td>
476     </tr>
477     <tr>
478       <td><div align="center">-msf FILE</div></td>
479
480       <td><div align="left">Create alignment file FILE in MSF
481           format.</div></td>
482     </tr>
483     <tr>
484       <td><div align="center">-pileup FILE</div></td>
485       <td><div align="left">Create alignment file FILE in
486           Pileup format.</div></td>
487     </tr>
488     <tr>
489       <td><div align="center">-pir FILE</div></td>
490
491       <td><div align="left">Create alignment file FILE in PIR
492           format.</div></td>
493     </tr>
494     <tr>
495       <td><div align="center">-pfam FILE</div></td>
496       <td><div align="left">Create alignment file FILE in
497           PFAM format.</div></td>
498     </tr>
499     <tr>
500       <td><div align="center">-blc FILE</div></td>
501       <td><div align="left">Create alignment file FILE in BLC
502           format.</div></td>
503     </tr>
504     <tr>
505       <td><div align="center">-json FILE</div></td>
506       <td><div align="left">Create alignment file FILE in
507           JSON format.</div></td>
508     </tr>
509     <tr>
510       <td><div align="center">-jalview FILE</div></td>
511
512       <td><div align="left">Create alignment file FILE in
513           Jalview format.</div></td>
514     </tr>
515     <tr>
516       <td><div align="center">-png FILE</div></td>
517       <td><div align="left">Create PNG image FILE from
518           alignment.</div></td>
519     </tr>
520     <tr>
521       <td><div align="center">-imgMap FILE</div></td>
522
523       <td><div align="left">Create HTML file FILE with image
524           map of PNG image.</div></td>
525     </tr>
526     <tr>
527       <td><div align="center">-eps FILE</div></td>
528       <td><div align="left">Create EPS file FILE from
529           alignment.</div></td>
530     </tr>
531     <tr>
532       <td><div align="center">-svg FILE</div></td>
533       <td><div align="left">Create Scalable Vector Graphics
534           file FILE from alignment.</div></td>
535     </tr>
536     <tr>
537       <td><div align="center">-biojsMSA FILE</div></td>
538       <td><div align="left">Write an HTML page to display
539           the alignment with the <a href="biojsmsa.html">
540           BioJS MSAviewer MSA</a>
541           </div>
542       </td>
543     </tr>
544     <tr>
545       <td><div align="center">-jvmmempc=PERCENT</div></td>
546       <td><div align="left"><em>Only available with standalone executable jar or jalview.bin.Launcher.</em>
547           Limit maximum heap size (memory) to PERCENT% of total physical memory detected.
548           This defaults to 90 if total physical memory can be detected.
549           See <a href="../memory.html">Memory usage settings for Jalview</a> for more details.
550           </div>
551       </td>
552     </tr>
553     <tr>
554       <td><div align="center">-jvmmemmax=MAXMEMORY</div></td>
555       <td><div align="left"><em>Only available with standalone executable jar or jalview.bin.Launcher.</em>
556           Limit maximum heap size (memory) to MAXMEMORY. MAXMEMORY can be specified in bytes, kilobytes(k), megabytes(m),
557           gigabytes(g) or if you're lucky enough, terabytes(t).
558           This defaults to 32g if total physical memory can be detected, or to 8g if total physical memory cannot be detected.
559           See <a href="../memory.html">Memory usage settings for Jalview</a> for more details.
560           </div>
561       </td>
562     </tr>
563   </table>
564 </body>
565 </html>