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>--new</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="--new"><code>--new</code></h5>
155 To append different sets of alignment files in different frames, use <code>--new</code> to move on to a new alignment frame:
157 jalview --append these/filename*.fa --new --append other/filename*.fa
162 <code>--open</code> is like using <code>--new --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.
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:
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>,
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.
297 jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL,viewer=none]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
302 <h4 name="">(<code></code>)</h4>
307 <h5 name=""><code>--</code></h5>
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.
327 Typical command line execution follows the following pattern:
329 jalview -open <Alignment File/URL> [additional import arguments] [export arguments]
332 <table width="100%" border="1" cellspacing="0" cellpadding="0">
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>
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>
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>
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>
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>
360 <td><div align="center">-features FILE/URL</div></td>
361 <td><div align="left">
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.
372 <div align="center">-colour COLOURSCHEME</div>
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>
382 <div align="center">-annotations FILE/URL</div>
384 <td>Add precalculated annotations to the alignment. See <a
385 href="annotationsFormat.html" target="NEW">Annotation
386 File</a> description.
391 <div align="center">-no-annotation</div>
393 <td>Do not display annotation below the alignment.
399 <div align="center">-tree FILE/URL</div>
401 <div align="left">Load the given newick format tree file
402 onto the alignment</div>
407 <div align="center">-questionnaire URL</div>
409 <div align="left">Queries the given URL for information
410 about any Jalview user questionnaires</div>
415 <div align="center">-noquestionnaire</div>
417 <div align="left">Turn off questionnaire check</div>
422 <div align="center">-nonews</div>
425 Disable check for <a href="../webServices/newsreader.html">Jalview
426 news</a> on startup (not recommended other than for classroom /
433 <div align="center">-nousagestats</div>
435 <div align="left">Turn off google analytics usage tracking</div>
440 <div align="center">-[no]sortbytree</div>
442 <div align="left">Enable or disable automatic sorting of
443 associated view when a new tree is displayed</div>
448 <div align="center">-groovy FILE/URL</div>
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>
457 <div align="center">-jabaws URL</div>
459 <div align="left">Specify the URL of the preferred JABAWS
465 <div align="center">-fasta FILE</div>
469 <div align="left">Create alignment file FILE in Fasta
474 <td><div align="center">-clustal FILE</div></td>
475 <td><div align="left">Create alignment file FILE in
476 Clustal format.</div></td>
479 <td><div align="center">-msf FILE</div></td>
481 <td><div align="left">Create alignment file FILE in MSF
485 <td><div align="center">-pileup FILE</div></td>
486 <td><div align="left">Create alignment file FILE in
487 Pileup format.</div></td>
490 <td><div align="center">-pir FILE</div></td>
492 <td><div align="left">Create alignment file FILE in PIR
496 <td><div align="center">-pfam FILE</div></td>
497 <td><div align="left">Create alignment file FILE in
498 PFAM format.</div></td>
501 <td><div align="center">-blc FILE</div></td>
502 <td><div align="left">Create alignment file FILE in BLC
506 <td><div align="center">-json FILE</div></td>
507 <td><div align="left">Create alignment file FILE in
508 JSON format.</div></td>
511 <td><div align="center">-jalview FILE</div></td>
513 <td><div align="left">Create alignment file FILE in
514 Jalview format.</div></td>
517 <td><div align="center">-png FILE</div></td>
518 <td><div align="left">Create PNG image FILE from
519 alignment.</div></td>
522 <td><div align="center">-imgMap FILE</div></td>
524 <td><div align="left">Create HTML file FILE with image
525 map of PNG image.</div></td>
528 <td><div align="center">-eps FILE</div></td>
529 <td><div align="left">Create EPS file FILE from
530 alignment.</div></td>
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>
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>
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.
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.