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