3 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 * Copyright (C) $$Year-Rel$$ The Jalview Authors
6 * This file is part of Jalview.
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.
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.
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.
22 <title>Jalview Command Line Arguments (next generation)</title>
25 <h1>Jalview Command Line Arguments (version 2.11.3.0 and later)</h1>
28 For a summary of Jalview command line arguments see <a href="clarguments-ng-summary.html">Summary
29 of Command Line Arguments</a>.
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.
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).
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.
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.
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.
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.
69 To launch Jalview from the command line, see
70 <a href="commandline.html">running Jalview from the command line</a>.
74 <h2>Processing command line arguments</h2>
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.
80 For more advanced use please see
81 <!--<a href="advancedclarguments.html">Advanced Command Line Arguments</a>.-->
85 <h3>Typical Use Cases</h3>
87 <h4 name="opening_files">Opening files (<code>--open</code>, <code>--append</code>, <code>--new</code>)</h4>
90 To simply open one or more alignment files in different windows just put the filenames as the first arguments:
92 jalview filename1 filename2 ...
97 You can use shell-expanded wildcards:
99 jalview this/filename* that/filename* other/filename*
103 jalview https://rest.uniprot.org/uniprotkb/P00221.fasta
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.)
112 <h5 name="open"><code>--open</code></h5>
115 Use the <code>--open</code> argument to open alignment files each in their own window.
119 The following are equivalent:
121 jalview --open filename1 filename2 ...
123 jalview --open filename*
125 jalview --open filename1 --open filename2 --open ...
127 jalview filename1 filename2 ...
132 Similarly you can open URLs:
134 jalview --open https://rest.uniprot.org/uniprotkb/P00221.fasta
138 <h5 name="append"><code>--append</code></h5>
141 To append several alignment files together use:
143 jalview --open filename1.fa --append filename2.fa filename3.fa
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:
147 jalview --append these/filename*.fa --append more/filename*.fa
149 jalview --append https://rest.uniprot.org/uniprotkb/P00221.fasta https://www.uniprot.org/uniprotkb/A0A0K9QVB3/entry
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.
157 <h5 name="new"><code>--new</code></h5>
160 To append different sets of alignment files in different windows, use <code>--new</code> to move on to a new alignment window:
162 jalview --append these/filename*.fa --new --append other/filename*.fa
167 <code>--open</code> is like using <code>--new --append</code> applied to every filename/URL given to <code>--open</code>
171 <h4 name="alignmentoptions">Alignment options (<code>--colour, --wrap</code>)</h4>
173 <h5 name="colour"><code>--colour</code></h5>
176 You can specify a residue/base colouring for the alignment using the <code>--colour</code> option (note spelling -- Jalview is made in Scotland!):
178 jalview --open examples/uniref50.fa --colour gecos-flower
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:
184 <code>clustal</code>,
186 <code>blosum62</code>,
188 <code>pc-identity</code>,
194 <code>gecos-flower</code>,
196 <code>gecos-blossom</code>,
198 <code>gecos-sunset</code>,
200 <code>gecos-ocean</code>,
202 <code>hydrophobic</code>,
204 <code>helix-propensity</code>,
206 <code>strand-propensity</code>,
208 <code>turn-propensity</code>,
210 <code>buried-index</code>,
212 <code>nucleotide</code>,
214 <code>nucleotide-ambiguity</code>,
216 <code>purine-pyrimidine</code>,
218 <code>rna-helices</code>,
220 <code>t-coffee-scores</code>,
222 <code>sequence-id</code>
225 <h5 name="wrap"><code>--wrap</code></h5>
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>:
229 jalview --open examples/uniref50.fa --wrap
231 To ensure an alignment is not wrapped use <code>--nowrap</code>:
233 jalview --open examples/uniref50.fa --nowrap
237 <h5 name="annotations"><code>--annotations</code></h5>
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.
242 jalview --open examples/uniref50.fa --noannotations
246 <h5 name="title"><code>--title</code></h5>
249 If you would like to give the alignment window a specific title you can do so with the <code>--title</code> option:
251 jalview --open examples/uniref50.fa --title "My example alignment"
255 <h5 name=""><code>--structure</code></h5>
258 You can add a 3D structure file to a sequence in the current alignment window with the <code>--structure</code> option:
260 jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb
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>
271 jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
274 Remember that you might need to escape any spaces in the sequence ID or enclose the ID in quotation marks.
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:
281 jalview --open examples/uniref50.fa --structure [7]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
286 <code>structureviewer</code>:
287 You can specify which structure viewer (or not) to use to open the structure using the <code>structureviewer</code> sub-value. Multiple sub-values can be specified, separated by a comma ','. Possible values for the <code>structureviewer</code> sub-value are:
293 <code>chimera</code>,
295 <code>chimerax</code>,
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.
302 jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL,structureviewer=none]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
307 <h4 name="">(<code></code>)</h4>
312 <h5 name=""><code>--</code></h5>
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.
332 Typical command line execution follows the following pattern:
334 jalview -open <Alignment File/URL> [additional import arguments] [export arguments]
337 <table width="100%" border="1" cellspacing="0" cellpadding="0">
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>
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>
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>
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>
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>
365 <td><div align="center">-features FILE/URL</div></td>
366 <td><div align="left">
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.
377 <div align="center">-colour COLOURSCHEME</div>
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>
387 <div align="center">-annotations FILE/URL</div>
389 <td>Add precalculated annotations to the alignment. See <a
390 href="annotationsFormat.html" target="NEW">Annotation
391 File</a> description.
396 <div align="center">-no-annotation</div>
398 <td>Do not display annotation below the alignment.
404 <div align="center">-tree FILE/URL</div>
406 <div align="left">Load the given newick format tree file
407 onto the alignment</div>
412 <div align="center">-questionnaire URL</div>
414 <div align="left">Queries the given URL for information
415 about any Jalview user questionnaires</div>
420 <div align="center">-noquestionnaire</div>
422 <div align="left">Turn off questionnaire check</div>
427 <div align="center">-nonews</div>
430 Disable check for <a href="../webServices/newsreader.html">Jalview
431 news</a> on startup (not recommended other than for classroom /
438 <div align="center">-nousagestats</div>
440 <div align="left">Turn off google analytics usage tracking</div>
445 <div align="center">-[no]sortbytree</div>
447 <div align="left">Enable or disable automatic sorting of
448 associated view when a new tree is displayed</div>
453 <div align="center">-groovy FILE/URL</div>
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>
462 <div align="center">-jabaws URL</div>
464 <div align="left">Specify the URL of the preferred JABAWS
470 <div align="center">-fasta FILE</div>
474 <div align="left">Create alignment file FILE in Fasta
479 <td><div align="center">-clustal FILE</div></td>
480 <td><div align="left">Create alignment file FILE in
481 Clustal format.</div></td>
484 <td><div align="center">-msf FILE</div></td>
486 <td><div align="left">Create alignment file FILE in MSF
490 <td><div align="center">-pileup FILE</div></td>
491 <td><div align="left">Create alignment file FILE in
492 Pileup format.</div></td>
495 <td><div align="center">-pir FILE</div></td>
497 <td><div align="left">Create alignment file FILE in PIR
501 <td><div align="center">-pfam FILE</div></td>
502 <td><div align="left">Create alignment file FILE in
503 PFAM format.</div></td>
506 <td><div align="center">-blc FILE</div></td>
507 <td><div align="left">Create alignment file FILE in BLC
511 <td><div align="center">-json FILE</div></td>
512 <td><div align="left">Create alignment file FILE in
513 JSON format.</div></td>
516 <td><div align="center">-jalview FILE</div></td>
518 <td><div align="left">Create alignment file FILE in
519 Jalview format.</div></td>
522 <td><div align="center">-png FILE</div></td>
523 <td><div align="left">Create PNG image FILE from
524 alignment.</div></td>
527 <td><div align="center">-imgMap FILE</div></td>
529 <td><div align="left">Create HTML file FILE with image
530 map of PNG image.</div></td>
533 <td><div align="center">-eps FILE</div></td>
534 <td><div align="left">Create EPS file FILE from
535 alignment.</div></td>
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>
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>
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.
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.