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 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.
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).
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.
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.
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.
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.
64 To launch Jalview from the command line, see
65 <a href="commandline.html">running Jalview from the command line</a>.
69 <h2>Processing command line arguments</h2>
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.
75 For more advanced use please see
76 <a href="advancedclarguments.html">Advanced Command Line Arguments</a>.
80 <h3>Typical Use Cases</h3>
82 <h4 name="opening_files">Opening files (<code>--open</code>, <code>--append</code>, <code>--newframe</code>)</h4>
85 To simply open one or more alignment files in different frames just put the filenames as the first arguments:
87 jalview filename1 filename2 ...
92 You can use shell-expanded wildcards:
94 jalview this/filename* that/filename* other/filename*
98 jalview https://rest.uniprot.org/uniprotkb/P00221.fasta
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.)
107 <h5 name="--open"><code>--open</code></h5>
110 Use the <code>--open</code> argument to open alignment files each in their own frame.
114 The following are equivalent:
116 jalview --open filename1 filename2 ...
118 jalview --open filename*
120 jalview --open filename1 --open filename2 --open ...
122 jalview filename1 filename2 ...
127 Similarly you can open URLs:
129 jalview --open https://rest.uniprot.org/uniprotkb/P00221.fasta
133 <h5 name="--append"><code>--append</code></h5>
136 To append several alignment files together use:
138 jalview --open filename1.fa --append filename2.fa filename3.fa
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:
142 jalview --append these/filename*.fa --append more/filename*.fa
144 jalview --append https://rest.uniprot.org/uniprotkb/P00221.fasta https://www.uniprot.org/uniprotkb/A0A0K9QVB3/entry
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.
152 <h5 name="--newframe"><code>--newframe</code></h5>
155 To append different sets of alignment files in different frames, use <code>--newframe</code> to move on to a new alignment frame:
157 jalview --append these/filename*.fa --newframe --append other/filename*.fa
162 <code>--open</code> is like using <code>--newframe --append</code> applied to every filename/URL given to <code>--open</code>
166 <h4 name="alignmentoptions">Alignment options (<code>--colour, --wrap</code>)</h4>
168 <h5 name="colour"><code>--colour</code></h5>
171 You can specify a residue/base colouring for the alignment using the <code>--colour</code> option (note spelling -- Jalview is made in Scotland!):
173 jalview --open examples/uniref50.fa --colour gecos-flower
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:
179 <code>clustal</code>,
181 <code>blosum62</code>,
183 <code>pc-identity</code>,
189 <code>gecos-flower</code>,
191 <code>gecos-blossom</code>,
193 <code>gecos-sunset</code>,
195 <code>gecos-ocean</code>,
197 <code>hydrophobic</code>,
199 <code>helix-propensity</code>,
201 <code>strand-propensity</code>,
203 <code>turn-propensity</code>,
205 <code>buried-index</code>,
207 <code>nucleotide</code>,
209 <code>nucleotide-ambiguity</code>,
211 <code>purine-pyrimidine</code>,
213 <code>rna-helices</code>,
215 <code>t-coffee-scores</code>,
217 <code>sequence-id</code>
220 <h5 name="wrap"><code>--wrap</code></h5>
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>:
224 jalview --open examples/uniref50.fa --wrap
226 To ensure an alignment is not wrapped use <code>--nowrap</code>:
228 jalview --open examples/uniref50.fa --nowrap
232 <h5 name="annotations"><code>--annotations</code></h5>
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.
237 jalview --open examples/uniref50.fa --noannotations
241 <h5 name="title"><code>--title</code></h5>
244 If you would like to give the alignment frame a specific title you can do so with the <code>--title</code> option:
246 jalview --open examples/uniref50.fa --title "My example alignment"
250 <h5 name=""><code>--structure</code></h5>
253 You can add a 3D structure file to a sequence in the current alignment frame with the <code>--structure</code> option:
255 jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb
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>
266 jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
269 Remember that you might need to escape any spaces in the sequence ID or enclose the ID in quotation marks.
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:
276 jalview --open examples/uniref50.fa --structure [7]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
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:
288 <code>chimera</code>,
290 <code>chimerax</code>,
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.
296 jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL,viewer=none]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
301 <h4 name="">(<code></code>)</h4>
306 <h5 name=""><code>--</code></h5>
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.
326 Typical command line execution follows the following pattern:
328 jalview -open <Alignment File/URL> [additional import arguments] [export arguments]
331 <table width="100%" border="1" cellspacing="0" cellpadding="0">
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>
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>
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>
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>
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>
359 <td><div align="center">-features FILE/URL</div></td>
360 <td><div align="left">
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.
371 <div align="center">-colour COLOURSCHEME</div>
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>
381 <div align="center">-annotations FILE/URL</div>
383 <td>Add precalculated annotations to the alignment. See <a
384 href="annotationsFormat.html" target="NEW">Annotation
385 File</a> description.
390 <div align="center">-no-annotation</div>
392 <td>Do not display annotation below the alignment.
398 <div align="center">-tree FILE/URL</div>
400 <div align="left">Load the given newick format tree file
401 onto the alignment</div>
406 <div align="center">-questionnaire URL</div>
408 <div align="left">Queries the given URL for information
409 about any Jalview user questionnaires</div>
414 <div align="center">-noquestionnaire</div>
416 <div align="left">Turn off questionnaire check</div>
421 <div align="center">-nonews</div>
424 Disable check for <a href="../webServices/newsreader.html">Jalview
425 news</a> on startup (not recommended other than for classroom /
432 <div align="center">-nousagestats</div>
434 <div align="left">Turn off google analytics usage tracking</div>
439 <div align="center">-[no]sortbytree</div>
441 <div align="left">Enable or disable automatic sorting of
442 associated view when a new tree is displayed</div>
447 <div align="center">-groovy FILE/URL</div>
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>
456 <div align="center">-jabaws URL</div>
458 <div align="left">Specify the URL of the preferred JABAWS
464 <div align="center">-fasta FILE</div>
468 <div align="left">Create alignment file FILE in Fasta
473 <td><div align="center">-clustal FILE</div></td>
474 <td><div align="left">Create alignment file FILE in
475 Clustal format.</div></td>
478 <td><div align="center">-msf FILE</div></td>
480 <td><div align="left">Create alignment file FILE in MSF
484 <td><div align="center">-pileup FILE</div></td>
485 <td><div align="left">Create alignment file FILE in
486 Pileup format.</div></td>
489 <td><div align="center">-pir FILE</div></td>
491 <td><div align="left">Create alignment file FILE in PIR
495 <td><div align="center">-pfam FILE</div></td>
496 <td><div align="left">Create alignment file FILE in
497 PFAM format.</div></td>
500 <td><div align="center">-blc FILE</div></td>
501 <td><div align="left">Create alignment file FILE in BLC
505 <td><div align="center">-json FILE</div></td>
506 <td><div align="left">Create alignment file FILE in
507 JSON format.</div></td>
510 <td><div align="center">-jalview FILE</div></td>
512 <td><div align="left">Create alignment file FILE in
513 Jalview format.</div></td>
516 <td><div align="center">-png FILE</div></td>
517 <td><div align="left">Create PNG image FILE from
518 alignment.</div></td>
521 <td><div align="center">-imgMap FILE</div></td>
523 <td><div align="left">Create HTML file FILE with image
524 map of PNG image.</div></td>
527 <td><div align="center">-eps FILE</div></td>
528 <td><div align="left">Create EPS file FILE from
529 alignment.</div></td>
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>
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>
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.
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.