JAL-629 Make arguments appear correctly using all non-breaking hyphens
[jalview.git] / help / help / html / features / clarguments-basic.html
index 626fb8c..44c3459 100644 (file)
   <li><a href="#alloutputwildcard">The all output wildcard</a></li>
   </ul>
 
-  <h2><a name="openingalignments"></a>Opening alignments (<code>--open</code>, <code>--append</code>, <code>--new</code>)</h2>
+  <h2><a name="openingalignments"></a>Opening alignments (<code>&#8209;&#8209;open</code>, <code>&#8209;&#8209;append</code>, <code>&#8209;&#8209;new</code>)</h2>
 
   <p>
-  To simply open one or more alignment files in different windows just put the filenames as the first arguments:
+  To simply open one or more alignment files in different alignment windows just put the filenames as the first arguments:
   <pre>
   jalview filename1 filename2 ...
   </pre>
   </p>
 
   <p>
-  (Using initial filenames is the same as using the <code>--open</code> argument, and further arguments can be used
+  (Using initial filenames is the same as using the <code>&#8209;&#8209;open</code> argument, and further arguments can be used
   after the initial filenames.)
   </p>
 
-  <h3><a name="open"></a><code>--open</code></h3>
+  <h3><a name="open"></a><code>&#8209;&#8209;open</code></h3>
 
   <p>
-  Use the <code>--open</code> argument to open alignment files each in their own window.
+  Use the <code>&#8209;&#8209;open</code> argument to open alignment files each in their own window.
   </p>
 
   <p>
   </pre>
   </p>
 
-  <h3><a name="append"></a><code>--append</code></h3>
+  <h3><a name="append"></a><code>&#8209;&#8209;append</code></h3>
 
   <p>
   To append several alignment files together use:
   <pre>
   jalview --open filename1.fa --append filename2.fa filename3.fa
   </pre>
-  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:
+  or, if you haven't previously used <code>&#8209;&#8209;open</code> then you can use --append to open one new window and keep appending each set of alignments:
   <pre>
   jalview --append these/filename*.fa --append more/filename*.fa
 
   </p>
 
   <p>
-  <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.
+  <strong>Note</strong> that whilst you can include a Jalview Project File (<code>.jvp</code>) as an <code>&#8209;&#8209;append</code> value, the items in the file will always open in their original windows and not append to another.
   </p>
 
-  <h3><a name="new"></a><code>--new</code></h3>
+  <h3><a name="new"></a><code>&#8209;&#8209;new</code></h3>
 
   <p>
-  To append different sets of alignment files in different windows, use <code>--new</code> to move on to a new alignment window:
+  To append different sets of alignment files in different windows, use <code>&#8209;&#8209;new</code> to move on to a new alignment window:
   <pre>
   jalview --append these/filename*.fa --new --append other/filename*.fa
   </pre>
   </p>
 
   <p>
-  <code>--open</code> is like using <code>--new --append</code> applied to every filename/URL given to <code>--open</code>
+  <code>&#8209;&#8209;open</code> is like using <code>&#8209;&#8209;new --append</code> applied to every filename/URL given to <code>&#8209;&#8209;open</code>
   </p>
 
 
-  <h2><a name="alignmentoptions"></a>Alignment options (<code>--colour</code>, <code>--wrap</code>, <code>--showannotations</code>, <code>--title</code>)</h2>
+  <h2><a name="alignmentoptions"></a>Alignment options (<code>&#8209;&#8209;colour</code>, <code>&#8209;&#8209;wrap</code>, <code>&#8209;&#8209;showannotations</code>, <code>&#8209;&#8209;title</code>)</h2>
 
-  <h3><a name="colour"></a><code>--colour</code></h3>
+  <p>
+  An opened alignment window (or set of opened alignment windows) can be modified in its appearance using the following arguments before the next <code>&#8209;&#8209;open</code> argument.  These modifying arguments apply to the one or more files that were opened with the preceding <code>&#8209;&#8209;open</code> argument.  E.g. <code>&#8209;&#8209;open file.fa --colour gecos-flower</code> will colour the one alignment window with <code>file.fa</code>.  However, <code>&#8209;&#8209;open *.fa --colour gecos-flower</code> will colour every alignment window matching <code>file*.fa</code>, and <code> --open file1.fa file2.fa --colour gecos-flower</code>
+  will colour both opened alignment windows.
+  </p>
+
+  <h3><a name="colour"></a><code>&#8209;&#8209;colour</code></h3>
 
   <p>
-  You can specify a residue/base colouring for the alignment using the <code>--colour</code> option (note spelling -- Jalview is made in Scotland!):
+  You can specify a residue/base colouring for the alignment using the <code>&#8209;&#8209;colour</code> option (note spelling -- Jalview is made in Scotland!):
   <pre>
   jalview --open examples/uniref50.fa --colour gecos-flower
   </pre>
   <code>sequence-id</code>
   </p>
 
-  <h3><a name="wrap"></a><code>--wrap</code></h3>
+  <h3><a name="wrap"></a><code>&#8209;&#8209;wrap</code></h3>
   <p>
-  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>:
+  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>&#8209;&#8209;open</code> (or first <code>&#8209;&#8209;append</code>) argument use the argument <code>&#8209;&#8209;wrap</code>:
   <pre>
   jalview --open examples/uniref50.fa --wrap
   </pre>
-  To ensure an alignment is not wrapped use <code>--nowrap</code>:
+  To ensure an alignment is not wrapped use <code>&#8209;&#8209;nowrap</code>:
   <pre>
   jalview --open examples/uniref50.fa --nowrap
   </pre>
   </p>
 
-  <h3><a name="showannotations"></a><code>--showannotations</code> / <code>--noshowannotations</code></h3>
+  <h3><a name="showannotations"></a><code>&#8209;&#8209;showannotations</code> / <code>&#8209;&#8209;noshowannotations</code></h3>
 
   <p>
-  You can specify whether the currently opened alignment window should show alignment annotations (e.g. Conservation, Quality, Consensus...) or not with either <code>--showannotations</code> or <code>--noshowannotations</code>.  If you don't specify then your saved preference will be used.
+  You can specify whether the currently opened alignment window should show alignment annotations (e.g. Conservation, Quality, Consensus...) or not with either <code>&#8209;&#8209;showannotations</code> or <code>&#8209;&#8209;noshowannotations</code>.  If you don't specify then your saved preference will be used.
   <pre>
   jalview --open examples/uniref50.fa --noshowannotations
   </pre>
   </p>
 
-  <h3><a name="title"></a><code>--title</code></h3>
+  <h3><a name="title"></a><code>&#8209;&#8209;title</code></h3>
 
   <p>
-  If you would like to give the alignment window a specific title you can do so with the <code>--title</code> option:
+  If you would like to give the alignment window a specific title you can do so with the <code>&#8209;&#8209;title</code> option:
   <pre>
   jalview --open examples/uniref50.fa --title "My example alignment"
   </pre>
 
 
 
-  <h2><a name="adding3dstructures"></a>Adding 3D structures (<code>--structure</code>, <code>--seqid</code>, <code>--structureviewer</code>, <code>--paematrix</code>, <code>--tempfac</code>, <code>--showssannotations</code>)</h2>
+  <h2><a name="adding3dstructures"></a>Adding 3D structures (<code>&#8209;&#8209;structure</code>, <code>&#8209;&#8209;seqid</code>, <code>&#8209;&#8209;structureviewer</code>, <code>&#8209;&#8209;paematrix</code>, <code>&#8209;&#8209;tempfac</code>, <code>&#8209;&#8209;showssannotations</code>)</h2>
 
   <p>
   </p>
 
-  <h3><a name="structure"></a><code>--structure</code></h3>
+  <h3><a name="structure"></a><code>&#8209;&#8209;structure</code></h3>
 
   <p>
-  You can add a 3D structure file to a sequence in the current alignment window with the <code>--structure</code> option:
+  You can add a 3D structure file to a sequence in the current alignment window with the <code>&#8209;&#8209;structure</code> option:
   <pre>
   jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb
   </pre>
   By default this attaches to the first sequence in the alignment but most likely you will want to attach it to a specific sequence.
   </p>
 
-  <h3><a name="seqid"></a><code>--seqid</code></h3>
+  <h3><a name="seqid"></a><code>&#8209;&#8209;seqid</code></h3>
 
   <p>
-  The easiest way to specify a sequence ID for your structure is to follow the <code>--structure</code> argument with a <code>--seqid</code> argument with a value of a sequence ID in the alignment.  This does of course require some knowledge of the sequences in the alignment files
+  The easiest way to specify a sequence ID for your structure is to follow the <code>&#8209;&#8209;structure</code> argument with a <code>&#8209;&#8209;seqid</code> argument with a value of a sequence ID in the alignment.  This does of course require some knowledge of the sequences in the alignment files
   that have been opened.
   <br/>
-  Alternatively you can specify a <em>sub-value</em> with the <code>--structure</code> argument value.  You do this by preceding the value with square brackets and <code>seqid=SequenceId</code>,
+  Alternatively you can specify a <em>sub-value</em> with the <code>&#8209;&#8209;structure</code> argument value.  You do this by preceding the value with square brackets and <code>seqid=SequenceId</code>,
   like this:
   <pre>
   jalview --open examples/uniref50.fa --structure [seqid=FER1_SPIOL]examples/AlphaFold/AF-P00221-F1-model_v4.pdb
   </p>
 
   <p>
-  The sub-value <code>seqid=FER1_SPIOL</code> takes precedence over the following argument <code>--seqid FER1_SPIOL</code> if you accidentally specify both (in which case the argument will probably be completely unused).
+  The sub-value <code>seqid=FER1_SPIOL</code> takes precedence over the following argument <code>&#8209;&#8209;seqid FER1_SPIOL</code> if you accidentally specify both (in which case the argument will probably be completely unused).
   </p>
 
   <p>
   Remember that you might need to escape any spaces in the sequence ID or enclose the ID in quotation marks.
   </p>
 
-  <h3><a name="structureviewer"></a><code>--structureviewer</code></h3>
+  <h3><a name="structureviewer"></a><code>&#8209;&#8209;structureviewer</code></h3>
 
   <p>
-  You can specify which structure viewer (or none) to use to open the structure using either the <code>--structureviewer</code> argument or the <code>structureviewer</code> sub-value.  Multiple sub-values can be specified together, separated by a comma ','.  Possible values for the <code>structureviewer</code> are:
+  You can specify which structure viewer (or none) to use to open the structure using either the <code>&#8209;&#8209;structureviewer</code> argument or the <code>structureviewer</code> sub-value.  Multiple sub-values can be specified together, separated by a comma ','.  Possible values for the <code>structureviewer</code> are:
   <br/>
   <code>none</code>,
   <br/>
   </pre>
   </p>
 
-  <h3><a name="paematrix"></a><code>--paematrix</code></h3>
+  <h3><a name="paematrix"></a><code>&#8209;&#8209;paematrix</code></h3>
 
   <p>
-  If you are opening a structure file that has a PAE matrix (provided as a JSON file), such as from an AlphaFold model or an nf-core pipeline, you can add the PAE matrix as an annotation by following the <code>--structure</code> argument with a <code>--paematrix</code> argument with the filename.  You can also specify a <code>paematrix=filename</code> sub-value.
+  If you are opening a structure file that has a PAE matrix (provided as a JSON file), such as from an AlphaFold model or an nf-core pipeline, you can add the PAE matrix as an annotation by following the <code>&#8209;&#8209;structure</code> argument with a <code>&#8209;&#8209;paematrix</code> argument with the filename.  You can also specify a <code>paematrix=filename</code> sub-value.
   <pre>
   jalview --open examples/uniref50.fa --structure [seqid=FER1+SPIOL,structureviewer=pymol]examples/AlphaFold/AF-P00221-F1-model_v4.pdb --paematrix examples/AlphaFold/AF-P00221-F1-predicted_aligned_error_v4.json
   </pre>
   </p>
 
-  <h3><a name="tempfac"></a><code>--tempfac</code></h3>
+  <h3><a name="tempfac"></a><code>&#8209;&#8209;tempfac</code></h3>
 
   <p>
-  Structure files may have a temperature factor associated with the structure component positions.  If the temperature factor is a pLDDT confidence score, such as with an AlphaFold model, you can specify this by using a following argument of <code>--tempfac</code> with a value of <code>plddt</code>.  This will enable standard pLDDT colouring of the temperature factor annotation.  Valid values are:
+  Structure files may have a temperature factor associated with the structure component positions.  If the temperature factor is a pLDDT confidence score, such as with an AlphaFold model, you can specify this by using a following argument of <code>&#8209;&#8209;tempfac</code> with a value of <code>plddt</code>.  This will enable standard pLDDT colouring of the temperature factor annotation.  Valid values are:
   <code>default</code>,
   <code>plddt</code>.
   More types of temperature factor may be added in future releases of Jalview.
 
   <!-- notempfac not yet working. undocumented until then -->
 
-  <h3><a name="showssannotations"></a><code>--showssannotations</code> / <code>--noshowssannotations</code></h3>
+  <h3><a name="showssannotations"></a><code>&#8209;&#8209;showssannotations</code> / <code>&#8209;&#8209;noshowssannotations</code></h3>
 
   <p>
-  You can specify whether the currently opened alignment window should show secondary structure annotations or not with either <code>--showssannotations</code> or <code>--noshowssannotations</code>.  If you don't specify then your saved preference will be used.
+  You can specify whether the currently opened alignment window should show secondary structure annotations or not with either <code>&#8209;&#8209;showssannotations</code> or <code>&#8209;&#8209;noshowssannotations</code>.  If you don't specify then your saved preference will be used.
   <pre>
   jalview --open examples/uniref50.fa --structure examples/AlphaFold/AF-P00221-F1-model_v4.pdb --noshowssannotations
   </pre>
   </pre>
   </p>
 
-  <h2><a name="outputtingalignmentfiles"></a>Outputting/converting alignment files and images (<code>--output</code>, <code>--format</code>, <code>--image</code>, <code>--type</code>, <code>--textrenderer</code>, <code>--scale</code>, <code>--backups</code>, <code>--overwrite</code>)</h2>
+  <h2><a name="outputtingalignmentfiles"></a>Outputting/converting alignment files and images (<code>&#8209;&#8209;output</code>, <code>&#8209;&#8209;format</code>, <code>&#8209;&#8209;image</code>, <code>&#8209;&#8209;structureimage</code>, <code>&#8209;&#8209;type</code>, <code>&#8209;&#8209;scale</code>, <code>&#8209;&#8209;width</code>, <code>&#8209;&#8209;height</code>, <code>&#8209;&#8209;imagecolour</code>, <code>&#8209;&#8209;bgcolour</code>, <code>&#8209;&#8209;textrenderer</code>, <code>&#8209;&#8209;overwrite</code>, <code>&#8209;&#8209;backups</code>, <code>&#8209;&#8209;mkdirs</code>)</h2>
 
   <p>
   You can save an alignment as an alignment file, or exported as an image, in different formats.  Jalview's alignment output formats are:
   In bitmap formats (currently only PNG, but what else would you want?!) you can specify a scaling factor to improve the resolution of the output image.
   </p>
 
-  <h3><a name="output"></a><code>--output</code></h3>
+  <h3><a name="output"></a><code>&#8209;&#8209;output</code></h3>
 
   <p>
-  To save the open alignment in a new alignment file use <code>--output filename</code>.  The format for the file can be found from the extension of <code>filename</code>, or if you are using a non-standard extension you can use a following <code>--format</code> argument, or specify it as a sub-value modifier.
+  To save the open alignment in a new alignment file use <code>&#8209;&#8209;output filename</code>.  The format for the file can be found from the extension of <code>filename</code>, or if you are using a non-standard extension you can use a following <code>&#8209;&#8209;format</code> argument, or specify it as a sub-value modifier.
   </p>
   <p>
   Recognised formats and their recognised extensions are:
   <code>phylip</code> (<code>phy</code>),
   <br/>
   <code>jalview</code> (<code>jvp, jar</code>).
+  </p>
   <p>
   For example, to open a FASTA file, append another FASTA file and then save the concatenation as a Stockholm file, do
   <pre>
   </pre>
   </p>
 
-  <h3><a name="format"></a><code>--format</code></h3>
+  <p>
+  <em>Important!</em> If you use <code>&#8209;&#8209;output</code> or any other argument that outputs a file, then it will be assumed you want to run Jalview in headless mode (as if you had specified <code>&#8209;&#8209;headless</code>).  To use Jalview with <code>&#8209;&#8209;output</code> and not assume headless mode, use the <code>&#8209;&#8209;gui</code> argument (the order doesn't matter).
+  </p>
+
+  <p>
+  If you would like to output an alignment file directly to standard output (often referred to as STDOUT), then use the filename <code>-</code> (a single hyphen).  In this case any messages that would normally appear on STDOUT will be diverted to STDERR to avoid invalidating the output file.
+  </p>
+  <p>
+  For example, to open a Stockholm file and pipe it to another command as a Block file, do
+  <pre>
+  jalview --open alignment1.stk --output - --format blc | another_command
+  </pre>
+  or equivalently
+  <pre>
+  jalview alignment1.stk --output=[format=blc]- | another_command
+  </pre>
+  </p>
+
+  <h3><a name="format"></a><code>&#8209;&#8209;format</code></h3>
 
   <p>
-  To specify the format of the output file (if using an unrecognised file extension) use the <code>--format</code> argument to specify a value (see above).  A sub-value modifier on the <code>--output</code> value can also be used.
+  To specify the format of the output file (if using an unrecognised file extension) use the <code>&#8209;&#8209;format</code> argument to specify a value (see above).  A sub-value modifier on the <code>&#8209;&#8209;output</code> value can also be used.
   </p>
 
-  <h3><a name="image"></a><code>--image</code></h3>
-  To export the open alignment window as an image, use the <code>--image</code> argument, which will give an image of the alignment and annotations as it appears (or would appear if not in <code>--headless</code> mode) in the alignment window if it was large enough for the whole alignment, including colour choice and features.
+  <h3><a name="image"></a><code>&#8209;&#8209;image</code></h3>
+  <p>
+  To export the open alignment window as an image, use the <code>&#8209;&#8209;image</code> argument, which will give an image of the alignment and annotations as it appears (or would appear if not in <code>&#8209;&#8209;headless</code> mode) in the alignment window if it was large enough for the whole alignment, including colour scheme and features.
+  </p>
   <p>
   <pre>
   jalview --open examples/plantfdx.fa --colour gecos-blossom --features examples/plantfdx.features --annotations examples/plantfdx.annotations --image plantfdx.png --headless
   </pre>
   </p>
 
+  <h3><a name="structureimage"></a><code>&#8209;&#8209;structureimage</code></h3>
   <p>
-  This by default produces a PNG image of screen or webpage resolution, which you may want to improve upon.  There are two ways of doing this with Jalview: increasing the scale of the PNG image, or using a vector based image format (EPS, SVG, HTML).
+  To export an open structure as an image, use the <code>&#8209;&#8209;structureimage</code> argument, which will give an image of the structure as it appears (or would appear if not in <code>&#8209;&#8209;headless</code> mode) in a Jmol window including colour scheme. <code>&#8209;&#8209;structureimage</code> can currently only be used with structures opened with the <code>jmol</code> structureviewer (the default viewer).
+  </p>
   <p>
+  <pre>
+  jalview --open examples/plantfdx.fa --colour gecos-blossom --features examples/plantfdx.features --annotations examples/plantfdx.annotations --image plantfdx.png --headless
+  </pre>
+  </p>
+
+  <p>
+  These by default produce a PNG image of screen or webpage resolution, which you will probably want to improve upon.  There are two ways of doing this with Jalview: increasing the scale of the PNG image, or using a vector based image format (EPS, SVG, HTML).
+  <p>
+
+  <h3><a name="type"></a><code>&#8209;&#8209;type</code></h3>
+
+  <p>
+  To specify the type of image file to write (if using an unrecognised file extension) use the <code>&#8209;&#8209;type</code> argument to specify a value (see above).  A sub-value modifier on the <code>&#8209;&#8209;image</code> and <code>&#8209;&#8209;structureimage</code> value can also be used.  Valid values are:
+  <br/>
+  <code>png</code> - A Portable Network Graphics image (bitmap, default),
+  <br/>
+  <code>svg</code> - A Scalable Vector Graphics image (vector),
+  <br/>
+  <code>eps</code> - An Encapsulated PostScript file (vector),
+  <br/>
+  <code>html</code> - An HTML rendition of the alignment with embedded source data (vector/web browser),
+  <br/>
+  <code>biojs</code> - An HTML rendition of the alignment with interactive MSA viewer <a href="biojsmsa.html">BioJS-MSA</a> (vector).
+  </p>
 
   <h3><a name="bitmap"></a>Bitmap image types (<code>png</code>)</h3>
 
   Let's increase the resolution of the PNG image:
   </p>
 
-  <h3><a name="scale"></a><code>--scale</code></h3>
+  <h3><a name="scale"></a><code>&#8209;&#8209;scale</code></h3>
 
   <p>
-  We can increase the size of the PNG image by a factor of <em>S</em> by following the <code>--image</code> argument with a <code>--scale <em>S</em></code> argument and value.  The value doesn't have to be an integer and should be given as an integer or floating point formatted number, e.g.
+  We can increase the size of the PNG image by a factor of <em>S</em> by following the <code>&#8209;&#8209;image</code> or <code>&#8209;&#8209;structureimage</code> argument with a <code>&#8209;&#8209;scale <em>S</em></code> argument and value.  The value doesn't have to be an integer and should be given as an integer or floating point formatted number, e.g.
   <pre>
   jalview --open examples/uniref50.fa --colour gecos-ocean --image mypic.png --scale 5.5 --headless
   </pre>
-  which will produce a PNG image 5.5 times larger (and more detailed) than without the <code>--scale</code> argument.
+  which will produce a PNG image 5.5 times larger (and more detailed) than without the <code>&#8209;&#8209;scale</code> argument.
   </p>
   <p>
   However, since you won't necessarily already know the size of an alignment's exported image you can specify either an exact width or height (in pixels) with either one of the
-  <code>--width</code> and <code>--height</code> arguments:
+  <code>&#8209;&#8209;width</code> and <code>&#8209;&#8209;height</code> arguments:
 
-  <h3><a name="width"></a><code>--width</code></h3>
+  <h3><a name="width"></a><code>&#8209;&#8209;width</code></h3>
 
   <p>
-  Specify an exact width of an exported PNG image with <code>--width</code>:
+  Specify an exact width of an exported PNG image with <code>&#8209;&#8209;width</code>:
   <pre>
   jalview --headless --open https://www.ebi.ac.uk/interpro/api/entry/pfam/PF03760/?annotation=alignment%3Aseed --noshowannotations --colour gecos-sunset --image wallpaper.png --width 3840
   </pre>
   </p>
 
-  <h3><a name="height"></a><code>--height</code></h3>
+  <h3><a name="height"></a><code>&#8209;&#8209;height</code></h3>
 
   <p>
-  Alternatively specify an exact height with the <code>--height</code> argument:
+  Alternatively specify an exact height with the <code>&#8209;&#8209;height</code> argument:
   <pre>
   jalview --headless --open https://www.ebi.ac.uk/interpro/api/entry/pfam/PF03760/?annotation=alignment%3Aseed --noshowannotations --colour gecos-ocean --image wallpaper.png --height 2160
   </pre>
   </p>
 
   <p>
-  You can specify two or all of <code>--scale</code>, <code>--width</code> and <code>--height</code> as limits to the size of the image (think of one or two bounding boxes) and the one which produces the smallest scale of image is used.  You can also specify each of these as sub-value modifiers to the <code>--image</code> value:
+  You can specify two or all of <code>&#8209;&#8209;scale</code>, <code>&#8209;&#8209;width</code> and <code>&#8209;&#8209;height</code> as limits to the size of the image (think of one or two bounding boxes) and the one which produces the smallest scale of image is used.  You can also specify each of these as sub-value modifiers to the <code>&#8209;&#8209;image</code> or <code>&#8209;&#8209;structureimage</code> value:
   <pre>
   jalview --headless --open https://www.ebi.ac.uk/interpro/api/entry/pfam/PF03760/?annotation=alignment%3Aseed --noshowannotations --colour gecos-flower --image [scale=0.25,width=320,height=240]thumbnail.png
   </pre>
   </p>
 
+  <h3><a name="imagecolour"></a><code>&#8209;&#8209;imagecolour</code></h3>
+
+  <p>
+  Specify a colour scheme to use just for this image using the <code>&#8209;&#8209;imagecolour</code> argument:
+  <pre>
+  jalview --open examples/uniref50.fa --colour gecos-flower --image uniref50-residues.png --height 2160 --image uniref50-helix.png --imagecolour helix-propensity --width 800 --image uniref50-turn.png --imagecolour turn-propensity --width 800
+  </pre>
+  </p>
+
+  <h3><a name="bgcolour"></a><code>&#8209;&#8209;bgcolour</code></h3>
+
+  <p>
+  <strong>Only applies to <code>&#8209;&#8209;structureimage</code>.</strong> Specify a background colour for a structure image.  The colour can be specified as a named colour recognised by Java (e.g. <code>"white"</code>, <code>"cyan"</code>) or as a #RRGGBB hash-6-digit-hex-string as used in web pages (e.g. <code>"#ffffff"</code>, <code>"#00ffff"</code>).  Note that if you're using a hash in a bash-like shell then you should quote the string to avoid problems with it being interpreted as a comment character.
+  </p>
+  <p>
+  E.g.
+  <pre>
+  jalview --open examples/uniref50.fa --colour gecos-sunset --structure examples/AF-P00221-F1-model_v4.pdb --seqid FER1_SPIOL --structureimage temp.png  --bgcolour magenta
+  </pre>
+  </p>
+
   <p>
   Next we look at vector image formats, which maintain detail at all resolutions.
   </p>
 
-  <h3><a name="vector"></a>Vector image export</h3>
+  <h3><a name="vector"></a>Vector image export (<code>svg</code>, <code>eps</code>, <code>html</code>, <code>biojs</code>)</h3>
 
   <p>
   Jalview can export an alignment in Encapsulated PostScript (<code>eps</code>), Scalable Vector Graphics (<code>svg</code>), HTML (<code>html</code>) or BioJSON -- another HTML format (<code>biojs</code>), by using, e.g.
   <pre>
   jalview --open examples/uniref50.fa --colour gecos-flower --image printable.eps
   </pre>
-  The image format can be specified with the <code>--type</code> argument or as a sub-value modifier on the <code>--image</code> value.  If neither is used the <code>type</code> will be guessed from the image file extension.  The following three examples should produce the same contents:
+  The image format can be specified with the <code>&#8209;&#8209;type</code> argument or as a sub-value modifier on the <code>&#8209;&#8209;image</code> value.  If neither is used the <code>type</code> will be guessed from the image file extension.  The following three examples should produce the same contents:
   <pre>
   jalview --open examples/uniref50.fa --colour gecos-flower --image printable.eps
   jalview --open examples/uniref50.fa --colour gecos-flower --image printable.postscript --type eps
   </pre>
   </p>
 
-  <h3><a name="textrenderer"></a><code>--textrenderer</code></h3>
+  <h3><a name="textrenderer"></a><code>&#8209;&#8209;textrenderer</code></h3>
 
   <p>
-  In a vector format any text that appears on the page (including residue/base labels) can be saved in the image file either as <code>text</code> or as <code>lineart</code> using the <code>--textrenderer</code> argument.  This is only available for <code>eps</code>, <code>svg</code> and <code>html</code> formats.
+  In a vector format any text that appears on the page (including residue/base labels) can be saved in the image file either as <code>text</code> or as <code>lineart</code> using the <code>&#8209;&#8209;textrenderer</code> argument.  This is only available for <code>eps</code>, <code>svg</code> and <code>html</code> formats.
   </p>
 
   <p>
   </p>
 
   <p>
-  The type of <code>--textrenderer</code> can be specified with an argument following <code>--image</code> or as a sub-value modifier:
+  The type of <code>&#8209;&#8209;textrenderer</code> can be specified with an argument following <code>&#8209;&#8209;image</code> or as a sub-value modifier:
   <pre>
   jalview --open examples/uniref50.fa --colour gecos-flower --image printable.html --type biojs
   jalview --open examples/uniref50.fa --colour gecos-flower --image [type=eps,textrenderer=lineart]printable.ps
   </pre>
   </p>
 
+  <h3><a name="outputbehaviour"></a>Output behaviour</h3>
 
-  <h2><a name="filenamesubstitutionsandbatchprocessing"></a>Filename substitutions and batch processing (<code>--substitutions</code>, <code>--close</code>, <code>--all</code>)</h2>
+  <h3><a name="overwrite"></a><code>&#8209;&#8209;overwrite</code></h3>
+
+  <p>
+  By default, Jalview will refuse to overwrite an output file (alignment or image) unless backups are in operation (alignment files only).  To force overwriting files, use the <code>&#8209;&#8209;overwrite</code> argument.
+  </p>
+
+  <h3><a name="backups"></a><code>&#8209;&#8209;backups / --nobackups</code></h3>
+
+  <p>
+  Jalview should honour your preferences for backup files of output alignment files.  Using <code>&#8209;&#8209;backups</code> or <code>&#8209;&#8209;nobackups</code> forces the behaviour.  With no backups set, you will need to use <code>&#8209;&#8209;overwrite</code> to overwrite an existing file.  Note that Jalview does not make backup files of exported images.
+  </p>
+
+  <h3><a name="mkdirs"></a><code>&#8209;&#8209;mkdirs</code></h3>
+
+  <p>
+  If you want to output a file into a folder that doesn't yet exist (this might happen particularly when using <code>{dirname}</code> substitutions -- see below), then Jalview will fail to write the file since the parent directory doesn't exist.  You can use <code>&#8209;&#8209;mkdirs</code> to tell Jalview to make the new directory (or directories, it will create several nested directories if necessary) before writing the file.  <code>&#8209;&#8209;mkdirs</code> is cautious and will generally refuse to make a new directory using a relative path with <code>..</code> in.
+  </p>
+
+  <h2><a name="filenamesubstitutionsandbatchprocessing"></a>Filename substitutions and batch processing (<code>&#8209;&#8209;substitutions</code>, <code>&#8209;&#8209;close</code>, <code>&#8209;&#8209;all</code>)</h2>
 
   <p>
   One of the more powerful aspects of Jalview's command line operations is that stores all of the different opened alignment arguments (before opening them) and can apply some arguments to <em>all</em> of the alignments as they are opened.  This includes display and output arguments.
   </p>
 
   <p>
+  Specifically for <code>&#8209;&#8209;structureimage</code> output, you can also use substitutions using parts of the structure filename:
+  <ul>
+  <li><code>{structuredirname}</code> -- is replaced by the directory path to the opened structure file.</li>
+  <li><code>{structurebasename}</code> -- is replaced by the base of the filename of the opened structure file. This is without the path or file extension (if there is one).</li>
+  <li><code>{structureextension}</code> -- is replaced by the extension of the filename of the opened structure file.</li>
+  </ul>
+  </p>
+
+  <p>
   These filename substitutions are on by default, but if for whatever reason you wish to disable the substitutions, they can be turned off (or back on again) through the list of arguments with:
   </p>
 
-  <h3><a name="substitutions"></a><code>--substitutions / --nosubstitutions</code></h3>
+  <h3><a name="substitutions"></a><code>&#8209;&#8209;substitutions / --nosubstitutions</code></h3>
 
   <p>
   Enable (or disable) filename substitutions in the following argument values and sub-value modifier values.
   </p>
 
   <p>
-  For opening single files this is less useful, since you could obviously just type the output filename, but for multiple opened alignments you can also use these substituted values and they will be replaced by the relevant part of the filename given for each opened alignment window.  Normally an <code>--output</code> or <code>--image</code> argument will only be applied to the latest opened alignment window, but you can tell Jalview to apply some arguments to all alignments that have been opened (so far) by using the <code>--all</code> argument.
+  For opening single files this is less useful, since you could obviously just type the output filename, but for multiple opened alignments you can also use these substituted values and they will be replaced by the relevant part of the filename given for each opened alignment window.  Normally an <code>&#8209;&#8209;output</code> or <code>&#8209;&#8209;image</code> argument will only be applied to the latest opened alignment window, but you can tell Jalview to apply some arguments to all alignments that have been opened (so far) by using the <code>&#8209;&#8209;all</code> argument.
   </p>
 
-  <h3><a name="all"></a><code>--all / -noall</code></h3>
+  <h3><a name="all"></a><code>&#8209;&#8209;all / -noall</code></h3>
 
   <p>
-  When using the <code>--all</code> argument, following arguments will apply to all of the previously opened alignment windows.  You can turn this behaviour off again for following arguments using the <code>--noall</code> argument.  The arguments that can apply to all previously opened alignments are:
+  When using the <code>&#8209;&#8209;all</code> argument, following arguments will apply to all of the previously opened alignment windows.  You can turn this behaviour off again for following arguments using the <code>&#8209;&#8209;noall</code> argument.  The arguments that can apply to all previously opened alignments are:
   <br/>
-  <code>--colour</code>
+  <code>&#8209;&#8209;colour</code>
   <br/>
-  <code>--sortbytree</code>
+  <code>&#8209;&#8209;sortbytree</code>
   <br/>
-  <code>--showannotations</code>
+  <code>&#8209;&#8209;showannotations</code>
   <br/>
-  <code>--wrap</code>
+  <code>&#8209;&#8209;wrap</code>
   <br/>
-  <code>--nostructure</code>
+  <code>&#8209;&#8209;nostructure</code>
   <br/>
-  <code>--notempfac</code>
+  <code>&#8209;&#8209;notempfac</code>
   <br/>
-  <code>--showssannotations</code>
+  <code>&#8209;&#8209;showssannotations</code>
   <br/>
-  <code>--image</code>
+  <code>&#8209;&#8209;image</code>
   <br/>
-  <code>--type</code>
+  <code>&#8209;&#8209;type</code>
   <br/>
-  <code>--textrenderer</code>
+  <code>&#8209;&#8209;textrenderer</code>
   <br/>
-  <code>--scale</code>
+  <code>&#8209;&#8209;scale</code>
   <br/>
-  <code>--width</code>
+  <code>&#8209;&#8209;width</code>
   <br/>
-  <code>--height</code>
+  <code>&#8209;&#8209;height</code>
   <br/>
-  <code>--output</code>
+  <code>&#8209;&#8209;output</code>
   <br/>
-  <code>--format</code>
+  <code>&#8209;&#8209;format</code>
   <br/>
-  <code>--groovy</code>
+  <code>&#8209;&#8209;groovy</code>
   <br/>
-  <code>--backups</code>
+  <code>&#8209;&#8209;backups</code>
   <br/>
-  <code>--overwrite</code>
+  <code>&#8209;&#8209;overwrite</code>
   <br/>
-  <code>--close</code>
+  <code>&#8209;&#8209;close</code>
   </p>
   <p>
-  In particular, for our example above, we can use <code>-all</code> and <code>--output</code> like this (<code>--close</code> will be explained in a moment):
+  In particular, for our example above, we can use <code>-all</code> and <code>&#8209;&#8209;output</code> like this (<code>&#8209;&#8209;close</code> will be explained in a moment):
   <pre>
   jalview --open all_my_fasta_files/*.fa --all --output all_my_converted_stockholm_files/{basename}.stk --close --headless
   </pre>
   </pre>
   </p>
 
-  <h3><a name="close"></a><code>--close</code></h3>
+  <h3><a name="close"></a><code>&#8209;&#8209;close</code></h3>
 
   <p>
-  The <code>--close</code> tag is used to close an alignment window after all output files or image exports are performed.  This reduces memory use, especially if an <code>--open</code> value is set to open many files.  These will be opened, formatted and output sequentially so since they are closed before the next one is opened memory use will not build up over a large number of alignments.
+  The <code>&#8209;&#8209;close</code> tag is used to close an alignment window after all output files or image exports are performed.  This reduces memory use, especially if an <code>&#8209;&#8209;open</code> value is set to open many files.  These will be opened, formatted and output sequentially so since they are closed before the next one is opened memory use will not build up over a large number of alignments.
   <pre>
   </pre>
   </p>
 
 
-  <h2><a name="alloutputwildcard"></a>The all output wildcard: <code>--output "*.ext"</code>,  <code>--image "*.ext"</code></h2>
+  <h2><a name="alloutputwildcard"></a>The all output wildcard: <code>&#8209;&#8209;output "*/*.ext"</code>,  <code>&#8209;&#8209;image "*/*.ext"</code></h2>
+
+  <p>
+  Purely as an intuitive syntactic sweetener, you can use the <code>&#8209;&#8209;output</code> wildcard <code>*</code> in two places as part of an output path and filename.
+  </p>
+
+  <p>
+  Using an asterisk (<code>*</code>) as a filename before an extension, e.g. <code>&#8209;&#8209;image "tmp/*.png"</code> will result in that asterisk being treated as a <code>{basename}</code> substitution.
+  </p>
+
+  <p>
+  Using an asterisk (<code>*</code>) before a file separator (usually </code>/</code>), e.g. <code>&#8209;&#8209;image "tmp/*/file1.png"</code> will result in that asterisk being treated as a <code>{dirname}</code> substitution.
+  </p>
+
+  <p>
+  You can combine these, using an asterisk (<code>*</code>) before and after the last file separator, e.g. <code>&#8209;&#8209;image "tmp/*/*.png"</code> will result in being substituted like <code>tmp/{dirname}/{basename}.png</code>.
+  </p>
 
   <p>
-  Purely as an intuitive syntactic sweetener, you can use the <code>--output</code> wildcard <code>*</code> <em>at the beginning of the output filename</em> as shorthand for <code>--all --output {dirname}/{basename}</code> followed by whatever you put after the '<code>*</code>'.  For example, to achieve the same as the thumbnails example above, you could use
+  For example, to achieve the same as the thumbnails example above, you could use
   <pre>
-  jalview --open */*.fa --image "*.png" --colour gecos-flower --width 256 --height 256 --close --headless
+  jalview --open */*.fa --image "*/*.png" --colour gecos-flower --width 256 --height 256 --close --headless
   </pre>
-  Here we move the <code>--colour</code> argument after the <code>--output</code> argument (it will still be applied before the image export or file output) so that it is included after the implied <code>--all</code> argument.  The thumbnails will be placed in the same directory as the alignment file with the same filename except for a different extension of <code>.png</code>.
+  Here we move the <code>&#8209;&#8209;colour</code> argument after the <code>&#8209;&#8209;output</code> argument (it will still be applied before the image export or file output) so that it is included after the implied <code>&#8209;&#8209;all</code> argument.  The thumbnails will be placed in the same directory as the alignment file with the same filename except for a different extension of <code>.png</code>.
   </p>
 
   <p>
   </p>
 
   <p>
-  An alternative is to use an equals sign ('=') with no spaces between the argument and the value, <code>--output=*.ext</code>, which Jalview will interpret the same, but the shell will not automatically expand before it is sent to Jalview, e.g.
+  An alternative is to use an equals sign ('=') with no spaces between the argument and the value, <code>&#8209;&#8209;output=*.ext</code>, which Jalview will interpret the same, but the shell will not automatically expand before it is sent to Jalview, e.g.
   <pre>
   jalview --open all_my_fasta_files/*.fa --output=*.stk --close --headless
   </pre>