Merge branch 'develop' into spike/JAL-4047/JAL-4048_columns_in_sequenceID
[jalview.git] / help / help / html / features / clarguments.html
index c0f4c42..7c2e9d5 100644 (file)
@@ -1,15 +1,5 @@
 <html>
 <!--
- * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
- * Copyright (C) $$Year-Rel$$ The Jalview Authors
- * 
- * This file is part of Jalview.
- * 
- * Jalview is free software: you can redistribute it and/or
- * modify it under the terms of the GNU General Public License 
- * as published by the Free Software Foundation, either version 3
- * of the License, or (at your option) any later version.
- *  
  * Jalview is distributed in the hope that it will be useful, but 
  * WITHOUT ANY WARRANTY; without even the implied warranty 
  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  -->
-<title>Jalview Command Line Arguments</title>
+<title>Command Line: introduction and reference</title>
 <body>
+
+  <h1>Command Line: introduction and reference</h1>
+
+  <p>
+  Command Line: introduction
+  <br/>
+  <a href="clarguments-basic.html">Command Line: basic usage</a>
+  <br/>
+  <a href="clarguments-advanced.html">Command Line: advanced usage</a>
+  <br/>
+  <a href="clarguments-argfiles.html">Command Line: argument files</a>
+  <br/>
+  <a href="clarguments-reference.html">Command Line: reference</a>
+  </p>
+
+
+  <hr/>
+
+  <ul>
+  <li><a href="#introduction">Introduction</a></li>
+  <li><a href="#syntax">Syntax</a></li>
+  <li><a href="#headlessmode">Headless mode</a></li>
+  </ul>
+
+  <h2><a name="introduction"></a>Introduction</h2>
+
+  <p>
+  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.
+  </p>
+
+  <p>
+  These new arguments are all accessed with a <code>--doubledash</code> 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).
+  </p>
+
+  <p>
+  The old command line arguments can still be used (see
+  <a href="clarguments-old.html">the old page on command line arguments</a>) so
+  existing scripts utilising them should not break.
+  <br/>
+  <strong>These are now deprecated and will be removed</strong> in a future version of Jalview.
+  </p>
+
   <p>
-    <strong>The Jalview Executable's Command Line Arguments</strong>
+  However, you cannot mix old and new style arguments, so if you use any
+  <code>-singledash</code> arguments (with the exception of <code>-help</code> or <code>-h</code>), they will all be interpreted as
+  old style arguments with the new <code>--doubledash</code>
+  arguments being ignored.  If you have a script
+  that uses the old arguments without any dashes, and uses the bare-word
+  <code>open</code> then these will also be interpreted as old style arguments.
   </p>
-  See
-  <a href="commandline.html">running Jalview from the command line</a>
-  for more information.
-  <br />
-  <br />Jalview processes arguments on the command line sequentially. If
-  you would like to pass a <a href="jvlfiles.html">'JVL' file</a> containing
-  <a href="../memory.html">memory settings</a> or any other launch
-  parameters, then include it at the beginning of the command line to
-  ensure they are processed before any remaining arguments.
-  <br>
-  Typical command line execution follows the following pattern:
-  <pre>
-  jalview -open &lt;Alignment File/URL&gt; [additional import arguments] [export arguments]
-  </pre>
-  
-  <table width="100%" border="1" cellspacing="0" cellpadding="0">
-    <tr>
-      <td width="27%"><div align="center">-nodisplay</div></td>
-      <td width="73%"><div align="left">Run Jalview without
-          User Interface. (automatically disables questionnaire, version
-          and usage stats checks)</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-nowebservicediscovery</div></td>
-      <td><div align="left">Do not query configured servers to
-          discover web services (<em>Since 2.11.2.0</em>)</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-open FILE/URL</div></td>
-      <td><div align="left">Specify the alignment file to
-          open or process by providing additional arguments.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-props FILE/URL</div></td>
-      <td><div align="left">Use the given Jalview properties
-          file instead of users default.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-setprop PROPERTY=value</div></td>
-      <td><div align="left">(JalviewJS ONLY) sets the given
-          property to the given value</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-features FILE/URL</div></td>
-      <td><div align="left">
-          <p>
-            Use the given file to add sequence features to an alignment.
-            See <a href="featuresFormat.html" target="NEW">Features
-              File</a> (Known as Groups file prior to 2.08) description.
-          </p>
 
-        </div></td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-colour COLOURSCHEME</div>
-      </td>
-      <td>Set the colourscheme for the alignment. This can be any
-        of the built-in colourschemes, a name of a predefined
-        colourscheme (defined in the Jalview properties file), or an
-        'inline' colourscheme (see the applet's colour parameter for
-        more information).</td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-annotations FILE/URL</div>
-      </td>
-      <td>Add precalculated annotations to the alignment. See <a
-        href="annotationsFormat.html" target="NEW">Annotation
-          File</a> description.
-      </td>
-    </tr>
-        <tr>
-      <td>
-        <div align="center">-no-annotation</div>
-      </td>
-      <td>Do not display annotation below the alignment. 
-      </td>
-    </tr>
-    
-    <tr>
-      <td>
-        <div align="center">-tree FILE/URL</div>
-      <td>
-        <div align="left">Load the given newick format tree file
-          onto the alignment</div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-questionnaire URL</div>
-      <td>
-        <div align="left">Queries the given URL for information
-          about any Jalview user questionnaires</div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-noquestionnaire</div>
-      <td>
-        <div align="left">Turn off questionnaire check</div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-nonews</div>
-      <td>
-        <div align="left">
-          Disable check for <a href="../webServices/newsreader.html">Jalview
-            news</a> on startup (not recommended other than for classroom /
-          demo usage)
-        </div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-nousagestats</div>
-      <td>
-        <div align="left">Turn off google analytics usage tracking</div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-[no]sortbytree</div>
-      <td>
-        <div align="left">Enable or disable automatic sorting of
-          associated view when a new tree is displayed</div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-groovy FILE/URL</div>
-      <td>
-        <div align="left">Execute groovy script in FILE (where
-          FILE may be 'STDIN' to read from the standard input) after all
-          other arguments have been processed</div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-jabaws URL</div>
-      <td>
-        <div align="left">Specify the URL of the preferred JABAWS
-          server</div>
-      </td>
-    </tr>
-    <tr>
-      <td>
-        <div align="center">-fasta FILE</div>
-      </td>
+  <p>
+  <strong>Warning!</strong> If you use command line arguments without any dashes and
+  <em>don't</em> use the bare-word argument <code>open</code> then all
+  your arguments will be interpreted as alignment files to be opened by the
+  new command line argument process!
+  </p>
 
-      <td>
-        <div align="left">Create alignment file FILE in Fasta
-          format.</div>
-      </td>
-    </tr>
-    <tr>
-      <td><div align="center">-clustal FILE</div></td>
-      <td><div align="left">Create alignment file FILE in
-          Clustal format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-msf FILE</div></td>
+  <p>
+  To launch Jalview from the command line, see
+  <a href="commandline.html">running Jalview from the command line</a>.
+  </p>
 
-      <td><div align="left">Create alignment file FILE in MSF
-          format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-pileup FILE</div></td>
-      <td><div align="left">Create alignment file FILE in
-          Pileup format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-pir FILE</div></td>
 
-      <td><div align="left">Create alignment file FILE in PIR
-          format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-pfam FILE</div></td>
-      <td><div align="left">Create alignment file FILE in
-          PFAM format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-blc FILE</div></td>
-      <td><div align="left">Create alignment file FILE in BLC
-          format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-json FILE</div></td>
-      <td><div align="left">Create alignment file FILE in
-          JSON format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-jalview FILE</div></td>
+  <h2><a name="syntax"></a>Syntax</h2>
+
+  <p>
+  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 <a href="clarguments-basic.html">Command Line: basic usage</a> explanatory page.
+  </p>
+
+  <h3>
+  Parts of Jalview's command line arguments
+  </h3>
+  <pre>jalview --argname[linkedId]=[subvalues]value --switch --noswitch --argname[linkedId] [subvalues]filename1 filename2 ...</pre>
+
+  <p>
+  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).
+  <br/>
+  <ul>
+    <li>
+        For arguments that require a value, the value can be given after an equals-sign ('=') or a space (' ').
+        <br/>
+        <code>--arg value</code>
+        <br/>
+        <code>--arg=value</code>
+    </li>
+    <li>
+        For arguments that can take multiple values (these will be filenames), the multiple filenames should appear after a space. If you use a filename wildcard you can put this after a space (which will be expanded by the shell unto multiple filenames before they reach Jalview), or you can put it after an equals-sign, which will be used by Jalview to find a list of files.  You cannot use an equals-sign and value followed by further values.
+        <br/>
+        <code>--arg file1.fa otherfile.stk</code>
+        <br/>
+        <code>--arg filename*.fa</code> <em>(filenames expanded by shell)</em>
+        <br/>
+        <code>--arg=filename*.fa</code> <em>(filenames expanded by Jalview)</em>
+    </li>
+    <li>
+        For arguments that act as a switch, most can be negated by preceding the argument name with <code>no</code>.
+        <br/>
+        <code>--switch</code>
+        <br/>
+        <code>--noswitch</code>
+    </li>
+    <li>
+        Some values can be modified, or may need additional information (for instance an <code>--image</code> output can be modified with a <code>--scale=number</code> factor, or a <code>--structure</code> can refer to a sequence with a <code>--seqid=ID</code>).  This additional information can be added in a number of different ways.
+        <ul>
+          <li>
+              An argument immediately following the main argument.
+              <br/>
+              <code>--image output.png --scale 2.5</code>
+          </li>
+          <li>
+              A <em>sub-value modifier</em>, which is where one or more (comma-separated) values are added to the start of the main value, placed in square brackets.
+              <br/>
+              <code>--open=[nowrap,colour=gecos-blossom]uniref50.fa</code>
+              <br/>
+              Sub-value modifiers with a value must use an equals-sign separator, and those that act as a switch can simply be included without an equals-sign or value, and can be preceded with <code>no</code> to negate the value, as with the argument name.
+          </li>
+          <li>
+              Another argument with the same <em>linked ID</em>.  A linked ID is an optional identifier for a particular open alignment, placed in square brackets immediately following the argument name (before the equals-sign or space).  If linked IDs are specified they do not need to be near to each other.
+              <br/>
+              <code>--image[MYID]=output.png --other --args --scale[MYID]=2.5</code>
+          </li>
+          <li>
+              An argument that is designated as applying to <em>all linked IDs</em>
+              <br/>
+              <code>--image=output.png --other --args --all --scale=2.5</code>
+              <br/>
+              <code>--image=output.png --other --args --scale[*]=2.5</code>
+          </li>
+        </ul>
+    </li>
+  </ul>
+  </p>
+
+  <p>
+  This may sound complicated, but nearly everything can be done just with plain command line arguments (see <a href="clarguments-basic.html">Command Line: basic usage</a>), though in this case the ordering of the arguments is more important.
+  </p>
+
+
+  <h2><a name="headlessmode"></a>Headless mode</h2>
+
+  <p>
+  Jalview can be run in headless mode, i.e. without the usual graphical user interface (GUI), by specifying the <code>--headless</code> 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.
+  </p>
+  <p>
+  <strong>If you specify an argument for an output file</strong> (one or more of <code>--output</code>, <code>--image</code> or <code>--structureimage</code>) then it will be assumed that you wish to <strong>run in headless mode</strong>.
+  </p>
+  <p>
+  You can force Jalview to run in graphical mode using the <code>--gui</code> argument.
+  </p>
+
+  <p>
+  </p>
+
 
-      <td><div align="left">Create alignment file FILE in
-          Jalview format.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-png FILE</div></td>
-      <td><div align="left">Create PNG image FILE from
-          alignment.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-imgMap FILE</div></td>
+  <hr/>
+  Continue to <a href="clarguments-basic.html">Command Line: basic usage</a>.
+  <br/>
+  <a href="clarguments-reference.html">Command Line: reference</a>
 
-      <td><div align="left">Create HTML file FILE with image
-          map of PNG image.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-eps FILE</div></td>
-      <td><div align="left">Create EPS file FILE from
-          alignment.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-svg FILE</div></td>
-      <td><div align="left">Create Scalable Vector Graphics
-          file FILE from alignment.</div></td>
-    </tr>
-    <tr>
-      <td><div align="center">-biojsMSA FILE</div></td>
-      <td><div align="left">Write an HTML page to display
-          the alignment with the <a href="biojsmsa.html">
-          BioJS MSAviewer MSA</a>
-          </div>
-      </td>
-    </tr>
-    <tr>
-      <td><div align="center">-jvmmempc=PERCENT</div></td>
-      <td><div align="left"><em>Only available with standalone executable jar or jalview.bin.Launcher.</em>
-          Limit maximum heap size (memory) to PERCENT% of total physical memory detected.
-         This defaults to 90 if total physical memory can be detected.
-         See <a href="../memory.html">Memory usage settings for Jalview</a> for more details.
-          </div>
-      </td>
-    </tr>
-    <tr>
-      <td><div align="center">-jvmmemmax=MAXMEMORY</div></td>
-      <td><div align="left"><em>Only available with standalone executable jar or jalview.bin.Launcher.</em>
-          Limit maximum heap size (memory) to MAXMEMORY. MAXMEMORY can be specified in bytes, kilobytes(k), megabytes(m),
-         gigabytes(g) or if you're lucky enough, terabytes(t).
-         This defaults to 32g if total physical memory can be detected, or to 8g if total physical memory cannot be detected.
-         See <a href="../memory.html">Memory usage settings for Jalview</a> for more details.
-          </div>
-      </td>
-    </tr>
-  </table>
 </body>
 </html>