Command Line: introduction and reference

Command Line: introduction
Command Line: basic usage
Command Line: advanced usage
Command Line: argument files
Command Line: reference


Introduction

From version 2.11.3.0 Jalview has a new set of command line arguments which allow more powerful and flexible combinations of arguments, though can also be used for simple use cases too.

These new arguments are all accessed with a ‑‑doubledash form of command line argument (with the one exception where simply opening one or more files can be performed without any arguments other than the filenames).

The old command line arguments can still be used (see the old page on command line arguments) so existing scripts utilising them should not break.
These are now deprecated and will be removed in a future version of Jalview.

However, you cannot mix old and new style arguments, so if you use any -singledash arguments (with the exception of -help or -h), they will all be interpreted as old style arguments with the new ‑‑doubledash arguments being ignored. If you have a script that uses the old arguments without any dashes, and uses the bare-word open then these will also be interpreted as old style arguments.

Warning! If you use command line arguments without any dashes and don't use the bare-word argument open then all your arguments will be interpreted as alignment files to be opened by the new command line argument process!

To launch Jalview from the command line, see running Jalview from the command line.

Syntax

The new command line argument parser can group certain labelled arguments together, or give them a default label based on their position in the list of arguments (in which case you won't ever need to know what the label is). All arguments are read before any alignment actions are performed. For basic usage without additional syntax, please see the Command Line: basic usage explanatory page.

Parts of Jalview's command line arguments

jalview --argname[linkedId]=[subvalues]value --switch --noswitch --argname[linkedId] [subvalues]filename1 filename2 ...

Different arguments can take one or more values, others take no value and act like a switch (some can be set on and off and others are only on, depending on the use).

This may sound complicated, but nearly everything can be done just with plain command line arguments (see Command Line: basic usage), though in this case the ordering of the arguments is more important.

Headless mode

Jalview can be run in headless mode, i.e. without the usual graphical user interface (GUI), by specifying the ‑‑headless argument. With command line arguments you can specify operations for Jalview to perform on one or more files and then stop running. Most likely you will want to output another file, either an alignment for image file.

If you specify an argument for an output file (one or more of ‑‑output, ‑‑image or ‑‑structureimage) then it will be assumed that you wish to run in headless mode.

You can force Jalview to run in graphical mode using the ‑‑gui argument.


Continue to Command Line: basic usage.
Command Line: reference