Integration of Freemarker API to the Jalview help system to aid self-documentation... JAL-1562_help-documentation-system-refactoring
authorCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 8 Oct 2014 16:28:10 +0000 (17:28 +0100)
committerCharles Ofoegbu <tcnofoegbu@dundee.ac.uk>
Wed, 8 Oct 2014 16:28:10 +0000 (17:28 +0100)
.classpath
help/html/menus/alignmentMenu.html
lib/freemarker.jar [new file with mode: 0644]
src/jalview/help/freemarker/AllignmentMenuTemplateData.java [new file with mode: 0644]
src/jalview/io/AppletFormatAdapter.java
src/jalview/io/PhylipFile.java
test/jalview/ws/jabaws/MinJabawsClientTests.java

index a7270ff..82f7b5e 100644 (file)
@@ -52,5 +52,6 @@
        <classpathentry kind="lib" path="lib/slf4j-log4j12-1.7.7.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/plugin.jar"/>
        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+       <classpathentry kind="lib" path="lib/freemarker.jar"/>
        <classpathentry kind="output" path="classes"/>
 </classpath>
index f219269..2a65e43 100755 (executable)
@@ -1,4 +1,5 @@
-<html>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head>
 <!--
  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
  * Copyright (C) 2014 The Jalview Authors
  * along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
  * The Jalview Authors are detailed in the 'AUTHORS' file.
  -->
-<head>
-<title>Alignment Window Menus</title>
-</head>
+  <title>Alignment Window Menus</title>
 
-<body>
-       <p>
-               <strong>Alignment Window Menus</strong>
-       </p>
-       <ul>
-               <li><strong>File</strong>
-                       <ul>
-                               <li><strong>Fetch Sequence</strong><br> <em>Shows a
-                                               dialog window in which you can retrieve known ids from Uniprot,
-                                               EMBL, EMBLCDS, PFAM, Rfam, or PDB database using Web Services provided by the
-                                               European Bioinformatics Institute. See <a
-                                               href="../features/seqfetch.html">Sequence Fetcher</a> </em>.</li>
-                               <li><strong>Add Sequences</strong><em><br> Add
-                                               sequences to the visible alignment from file, URL, or cut &amp;
-                                               paste window </em>
-                               </li>
-                               <li><strong>Reload</strong><em><br> Reloads the
-                                               alignment from the original file, if available.<br> <strong>Warning:
-                                                       This will delete any edits, analyses and colourings applied since
-                                                       the alignment was last saved, and cannot be undone.</strong> </em>
-                               </li>
-                               <li><strong>Save (Control S)</strong><em><br> Saves
-                                               the alignment to the file it was loaded from (if available), in
-                                               the same format, updating the original in place. </em>
-                               </li>
-                               <li><strong>Save As (Control Shift S)<br> </strong><em>Save
-                                               the alignment to local file. A file selection window will open,
-                                               use the &quot;Files of type:&quot; selection box to determine
-                                               which <a href="../io/index.html">alignment format</a> to save as.</em>
-                               </li>
-                               <li><strong>Output to Textbox<br> </strong><em>The
-                                               alignment will be displayed in plain text in a new window, which
-                                               you can &quot;Copy and Paste&quot; using the pull down menu, or
-                                               your standard operating system copy and paste keys. The output
-                                               window also has a <strong>&quot;New Window&quot;</strong> button
-                                               to import the (possibly edited) text as a new alignment.<br>
-                                               Select the format of the text by selecting one of the following
-                                               menu items.</em>
-                                       <ul>
-                                               <li><strong>FASTA</strong> <em></em>
-                                               </li>
-                                               <li><strong>MSF</strong>
-                                               </li>
-                                               <li><strong>CLUSTAL</strong>
-                                               </li>
-                                               <li><strong>BLC</strong>
-                                               </li>
-                                               <li><strong>PIR</strong>
-                                               </li>
-                                               <li><strong>PFAM</strong>
-                                               </li>
-                                       </ul></li>
-                               <li><strong>Print (Control P)<br> </strong><em>Jalview
-                                               will print the alignment using the current fonts and colours of
-                                               your alignment. If the alignment has annotations visible, these
-                                               will be printed below the alignment. If the alignment is wrapped
-                                               the number of residues per line of your alignment will depend on
-                                               the paper width or your alignment window width, whichever is the
-                                               smaller. </em>
-                               </li>
-                               <li><strong>Export Image</strong> <em><br> Creates an
-                                               alignment graphic with the current view's annotation, alignment
-                                               background colours and group colours. If the alignment is <a
-                                               href="../features/wrap.html">wrapped</a>, the output will also be
-                                               wrapped and will have the same visible residue width as the open
-                                               alignment. </em>
-                                       <ul>
-                                               <li><strong>HTML<br> </strong><em>Create a <a
-                                                               href="../io/export.html">web page</a> from your alignment.</em>
-                                               </li>
-                                               <li><strong>EPS<br> </strong><em>Create an <a
-                                                               href="../io/export.html">Encapsulated Postscript</a> file from
-                                                               your alignment.</em>
-                                               </li>
-                                               <li><strong>PNG<br> </strong><em>Create a <a
-                                                               href="../io/export.html">Portable Network Graphics</a> file from
-                                                               your alignment.</em>
-                                               </li>
-                                       </ul></li>
-                               <li><strong>Export Features</strong><em><br> All
-                                               features visible on the alignment can be saved to file or
-                                               displayed in a textbox in either Jalview or GFF format</em>
-                               </li>
-                               <li><strong>Export Annotations</strong><em><br> All
-                                               annotations visible on the alignment can be saved to file or
-                                               displayed in a textbox in Jalview annotations format. </em>
-                               </li>
-                               <li><strong>Load Associated Tree<br> </strong><em>Jalview
-                                               can <a href="../calculations/treeviewer.html">view trees</a>
-                                               stored in the Newick file format, and associate them with the
-                                               alignment. Note: the ids of the tree file and your alignment MUST
-                                               be the same.</em></li>
-                               <li><strong>Load Features / Annotations<br> </strong><em>Load
-                                               files describing precalculated <a
-                                               href="../features/featuresFormat.html">sequence features</a> or <a
-                                               href="../features/annotationsFormat.html">alignment
-                                                       annotations</a>.</em></li>
-                               <li><strong>Close (Control W)</strong><br> <em>Close
-                                               the alignment window. Make sure you have saved your alignment
-                                               before you close - either as a Jalview project or by using the <strong>Save
-                                                       As</strong> menu.</em>
-                               </li>
-                       </ul></li>
-               <li><strong>Edit</strong>
-                       <ul>
-                               <li><strong>Undo (Control Z)</strong><em><br> This
-                                               will undo any edits you make to the alignment. This applies to
-                                               insertion or deletion of gaps, cutting residues or sequences from
-                                               the alignment or pasting sequences to the current alignment or
-                                               sorting the alignment. <strong>NOTE:</strong> It DOES NOT undo
-                                               colour changes, adjustments to group sizes, or changes to the
-                                               annotation panel. </em>
-                               </li>
-                               <li><strong>Redo (Control Y)<br> </strong><em>Any
-                                               actions which you undo can be redone using redo. </em>
-                               </li>
-                               <li><strong>Cut (Control X)<br> </strong><em>This
-                                               will make a copy of the currently selected residues before
-                                               removing them from your alignment. Click on a sequence name if you
-                                               wish to select a whole sequence. <br> Use &lt;CTRL&gt; and X
-                                               (&lt;APPLE&gt; and X on MacOSX) to cut.</em>
-                               </li>
-                               <li><strong>Copy (Control C)</strong><br> <em>Copies
-                                               the currently selected residues to the system clipboard - you can
-                                               also do this by pressing &lt;CTRL&gt; and C (&lt;APPLE&gt; and C
-                                               on MacOSX). <br> If you try to paste the clipboard contents
-                                               to a text editor, you will see the format of the copied residues
-                                               FASTA.</em></li>
-                               <li><strong>Paste </strong>
-                                       <ul>
-                                               <li><strong>To New Alignment (Control Shift V)<br>
-                                               </strong><em>A new alignment window will be created from sequences
-                                                               previously copied or cut to the system clipboard. <br> Use
-                                                               &lt;CTRL&gt; and &lt;SHIFT&gt; and V(&lt;APPLE&gt; and
-                                                               &lt;SHIFT;&gt; and and V on MacOSX) to paste.</em>
-                                               </li>
-                                               <li><strong>Add To This Alignment (Control V)<br>
-                                               </strong><em>Copied sequences from another alignment window can be
-                                                               added to the current Jalview alignment. </em>
-                                               </li>
-                                       </ul></li>
-                               <li><strong>Delete (Backspace)<br> </strong><em>This
-                                               will delete the currently selected residues without copying them
-                                               to the clipboard. Like the other edit operations, this can be
-                                               undone with <strong>Undo</strong>.</em>
-                               </li>
-                               <li><strong>Remove Left (Control L)<br> </strong><em>If
-                                               the alignment has marked columns, the alignment will be trimmed to
-                                               the left of the leftmost marked column. To mark a column, mouse
-                                               click the scale bar above the alignment. Click again to unmark a
-                                               column, or select &quot;Deselect All&quot; to deselect all
-                                               columns.</em></li>
-                               <li><strong>Remove Right (Control R)<br> </strong><em>If
-                                               the alignment has marked columns, the alignment will be trimmed to
-                                               the left of the leftmost marked column. To mark a column, mouse
-                                               click the scale bar above the alignment. Click again to unmark a
-                                               column, or select &quot;Deselect All&quot; to deselect all
-                                               columns.</em></li>
-                               <li><strong>Remove Empty Columns (Control E)<br>
-                               </strong><em>All columns which only contain gap characters
-                                               (&quot;-&quot;, &quot;.&quot;) will be deleted.<br> You may
-                                               set the default gap character in <a
-                                               href="../features/preferences.html">preferences</a>. </em>
-                               </li>
-                               <li><strong>Remove All Gaps (Control Shift E)</strong><br>
-                                       <em>Gap characters (&quot;-&quot;, &quot;.&quot;) will be
-                                               deleted from the selected area of the alignment. If no selection
-                                               is made, ALL the gaps in the alignment will be removed.<br>
-                                               You may set the default gap character in <a
-                                               href="../features/preferences.html">preferences</a>. </em>
-                               </li>
-                               <li><strong>Remove Redundancy (Control D)<br> </strong><em>Selecting
-                                               this option brings up a window asking you to select a threshold.
-                                               If the percentage identity between any two sequences (under the
-                                               current alignment) exceeds this value then one of the sequences
-                                               (the shorter) is discarded. Press the &quot;Apply&quot; button to
-                                               remove redundant sequences. The &quot;Undo&quot; button will undo
-                                               the last redundancy deletion.</em>
-                               </li>
-                               <li><strong>Pad Gaps<br> </strong><em>When selected,
-                                               the alignment will be kept at minimal width (so there no empty
-                                               columns before or after the first or last aligned residue) and all
-                                               sequences will be padded with gap characters to the before and
-                                               after their terminating residues.<br> This switch is useful
-                                               when making a tree using unaligned sequences and when working with
-                                               alignment analysis programs which require 'properly aligned
-                                               sequences' to be all the same length.<br> You may set the
-                                               default for <strong>Pad Gaps</strong> in the <a
-                                               href="../features/preferences.html">preferences</a>. </em>
-                               </li>
-                       </ul></li>
-               <li><strong>Select</strong>
-                       <ul>
-                               <li><strong><a href="../features/search.html">Find...
-                                                       (Control F)</a> </strong><em><br> Opens the Find dialog box to
-                                               search for residues, sequence name or residue position within the
-                                               alignment and create new sequence features from the queries. </em>
-                               </li>
-                               <li><strong>Select All (Control A)<br> </strong><em>Selects
-                                               all the sequences and residues in the alignment. <br> Use
-                                               &lt;CTRL&gt; and A (&lt;APPLE&gt; and A on a MacOSX) to select
-                                               all.</em></li>
-                               <li><strong>Deselect All (Escape)<br> </strong><em>Removes
-                                               the current selection box (red dashed box) from the alignment
-                                               window. All selected sequences, residues and marked columns will
-                                               be deselected. </em><em> <br> Use &lt;ESCAPE&gt; to deselect
-                                               all.</em></li>
-                               <li><strong>Invert Sequence Selection (Control I)<br>
-                               </strong><em>Any sequence ids currently not selected will replace the
-                                               current selection. </em>
-                               </li>
-                               <li><strong>Invert Column Selection (Control Alt I)<br>
-                               </strong><em>Any columns currently not selected will replace the current
-                                               column selection. </em>
-                               </li>
-                                 <li><strong>Create Group (Control G)<br></strong>
-  <em>Create a group containing the currently selected sequences.</em></li>
-  <li><strong>Remove Group (Shift Control G)<br></strong>
-  <em>Ungroup the currently selected sequence group. (Create/Remove group new in Jalview 2.8.1)</em></li>
-                       <li><strong>Make Groups for selection<br /> </strong> <em>The currently
-                                               selected groups of the alignment will be subdivided according to
-                                               the contents of the currently selected region. <br />Use this to
-                                               subdivide an alignment based on the different combinations of
-                                               residues observed at specific positions. (new in jalview 2.5)</em>
-                               </li>
-       <li><strong>Undefine Groups (Control U)<br> </strong><em>The
-            alignment will be reset with no defined groups.<br> <strong>WARNING</strong>:
-            This cannot be undone.</em>
-        </li>
-               </ul></li>
-               <li><strong>View</strong>
-                       <ul>
-                               <li><strong>New View (Control T)</strong><em><br>
-                                               Creates a new view from the current alignment view. </em>
-                               </li>
-                               <li><strong>Expand Views (X)</strong><em><br> Display
-                                               each view associated with the alignment in its own alignment
-                                               window, allowing several views to be displayed simultaneously. </em>
-                               </li>
-                               <li><strong>Gather Views (G)</strong><em><br> Each
-                                               view associated with the alignment will be displayed within its
-                                               own tab on the current alignment window. </em>
-                               </li>
-                               <li><strong>Show&#8594;(all Columns / Sequences /
-                                               Sequences and Columns)</strong><em><br> All hidden Columns /
-                                               Sequences / Sequences and Columns will be revealed. </em>
-                               </li>
-                               <li><strong>Hide&#8594;(all Columns / Sequences /
-                                               Selected Region / All but Selected Region )</strong><em><br>
-                                               Hides the all the currently selected Columns / Sequences / Region
-                                               or everything but the selected Region.</em>
-                               </li>
-                               <li><strong>Automatic Scrolling<br> </strong><em>When
-                                               selected, the view will automatically scroll to display the
-                                               highlighted sequence position corresponding to the position under
-                                               the mouse pointer in a linked alignment or structure view.</em></li>
-                               <li><strong>Show Annotations<br> </strong><em>If this
-                                               is selected the &quot;Annotation Panel&quot; will be displayed
-                                               below the alignment. The default setting is to display the
-                                               conservation calculation, quality calculation and consensus values
-                                               as bar charts. </em>
-                               </li>
-                               <li><strong>Autocalculated Annotation<br> </strong><em>Settings
-                                       for the display of autocalculated annotation.</em>
-                                       <ul>
-                                               <li><strong>Apply to all groups<br> </strong><em> When
-                                                       ticked, any modification to the current settings will be applied
-                                                       to all autocalculated annotation.</em></li>
-                                               <li><strong>Show Consensus Histogram<br> </strong><em>
-                                                       Enable or disable the display of the histogram above the
-                                                       consensus sequence.</em></li>
-                                               <li><strong>Show Consensus Logo<br> </strong><em> Enable
-                                                       or disable the display of the Consensus Logo above the consensus
-                                                       sequence.</em></li>
-                                               <li><strong>Normalise Consensus Logo<br>
-                                               </strong><em>When enabled, scales all logo stacks to the same height,
-                                                               making it easier to compare symbol diversity in highly variable
-                                                               regions.</em></li>
-                                               <li><strong>Group Conservation<br> </strong><em> When
-                                                       ticked, display a conservation row for all groups (only available
-                                                       for protein alignments).</em></li>
-                                               <li><strong>Apply to all groups<br> </strong><em> When
-                                                       ticked, display a consensus row for all groups.</em></li>
-                                       </ul></li>
-                               <li><strong>Show Sequence Features</strong><br> <em>Show
-                                               or hide sequence features on this alignment.</em>
-                               </li>
-                               <li><strong><a href="../features/featuresettings.html">Seqence
-                                                       Feature Settings...</a> </strong><em><br> <em>Opens the
-                                                       Sequence Feature Settings dialog box to control the colour and
-                                                       display of sequence features on the alignment, and configure and
-                                                       retrieve features from DAS annotation servers.</em>
-                               </li>
-                               <li><strong>Sequence ID Tooltip</strong><em> (application
-                                               only) <br>This submenu's options allow the inclusion or
-                                               exclusion of non-positional sequence features or database cross
-                                               references from the tooltip shown when the mouse hovers over the
-                                               sequence ID panel.</em>
-                               </li>
-                               <li><strong>Alignment Properties...<br /> </strong><em>Displays
-                                               some simple statistics computed for the current alignment view and
-                                               any named properties defined on the whole alignment.</em>
-                               </li>
-                               <li><strong><a href="../features/overview.html">Overview
-                                                       Window</a><br> </strong><em>A scaled version of the alignment will
-                                               be displayed in a small window. A red box will indicate the
-                                               currently visible area of the alignment. Move the visible region
-                                               using the mouse. </em>
-                               </li>
-                       </ul></li>
-               <li><strong>Alignment Window Format Menu</strong>
-                       <ul>
-                               <li><strong>Font...<br> </strong><em>Opens the
-                                               &quot;Choose Font&quot; dialog box, in order to change the font of
-                                               the display and enable or disable 'smooth fonts' (anti-aliasing)
-                                               for faster alignment rendering. </em></li>
-                               <li><strong>Wrap<br> </strong><em>When ticked, the
-                                               alignment display is &quot;<a href="../features/wrap.html">wrapped</a>&quot;
-                                               to the width of the alignment window. This is useful if your
-                                               alignment has only a few sequences to view its full width at once.</em><br>
-                                       Additional options for display of sequence numbering and scales are
-                                       also visible in wrapped layout mode:<br>
-                                       <ul>
-                                               <li><strong>Scale Above</strong><br><em> Show the alignment
-                                                       column position scale.</em></li>
-                                               <li><strong>Scale Left</strong><br><em> Show the sequence
-                                                       position for the first aligned residue in each row in the left
-                                                       column of the alignment.</em></li>
-                                               <li><strong>Scale Right</strong><br><em> Show the sequence
-                                                       position for the last aligned residue in each row in the
-                                                       right-most column of the alignment.</em></li>
-                                               <li><strong>Show Sequence Limits<br> </strong><em>If
-                                                               this box is selected the sequence name will have the start and
-                                                               end position of the sequence appended to the name, in the format
-                                                               NAME/START-END</em>
-                                               </li>
-                                               <li><strong>Right Align Sequence ID<br> </strong><em>If
-                                                               this box is selected then the sequence names displayed in the
-                                                               sequence label area will be aligned against the left-hand edge
-                                                               of the alignment display, rather than the left-hand edge of the
-                                                               alignment window. 
-                                               </li>
-                                               <li><strong>Show Hidden Markers<br> </strong><em>When
-                                                               this box is selected, positions in the alignment where rows and
-                                                               columns are hidden will be marked by blue arrows. 
-                                               </li>
-                                               <li><strong>Boxes</strong><em><br> If this is
-                                                               selected the background of a residue will be coloured using the
-                                                               selected background colour. Useful if used in conjunction with
-                                                               &quot;Colour Text.&quot; </em>
-                                               </li>
-                                               <li><strong>Text<br> </strong><em>If this is
-                                                               selected the residues will be displayed using the standard 1
-                                                               character amino acid alphabet.</em>
-                                               </li>
-                                               <li><strong>Colour Text<br> </strong><em>If this is
-                                                               selected the residues will be coloured according to the
-                                                               background colour associated with that residue. The colour is
-                                                               slightly darker than background so the amino acid symbol remains
-                                                               visible. </em>
-                                               </li>
-                                               <li><strong>Show Gaps<br> </strong><em>When this is
-                                                               selected, gap characters will be displayed as &quot;.&quot; or
-                                                               &quot;-&quot;. If unselected, then gap characters will appear as
-                                                               blank spaces. <br> You may set the default gap character in
-                                                               <a href="../features/preferences.html">preferences</a>.</em>
-                                               </li>
-                                               <li><strong>Centre Annotation Labels<br> </strong><em>Select
-                                                               this to center labels along an annotation row relative to their
-                                                               associated column (default is off, i.e. left-justified).</em>
-                                               </li>
-                                               <li><strong>Show Unconserved<br> </strong><em>When
-                                                               this is selected, all consensus sequence symbols will be
-                                                               rendered as a '.', highlighting mutations in highly conserved
-                                                               alignments. </em>
-                                               </li>
+  
+</head><body>
+<p> <strong>Alignment Window Menus x</strong> </p>
 
-                                       </ul></li>
-                       </ul>
-       </li>
+<ul>
 
-               </ul>
-               </li>
+  <li><strong>File</strong>
+    <ul>
+      <li><strong>Fetch Sequence</strong><br>
+        <em>Shows a dialog window in which you can retrieve known ids
+from Uniprot, EMBL, EMBLCDS, PFAM, Rfam, or PDB database using Web
+Services provided by the European Bioinformatics Institute. See <a href="../features/seqfetch.html">Sequence Fetcher</a> </em>.</li>
+      <li><strong>Add Sequences</strong><em><br>
+Add sequences to the visible alignment from file, URL, or cut &amp;
+paste window </em> </li>
+      <li><strong>Reload</strong><em><br>
+Reloads the alignment from the original file, if available.<br>
+        <strong>Warning: This will delete any edits, analyses and
+colourings applied since the alignment was last saved, and cannot be
+undone.</strong> </em> </li>
+      <li><strong>Save (Control S)</strong><em><br>
+Saves the alignment to the file it was loaded from (if available), in
+the same format, updating the original in place. </em> </li>
+      <li><strong>Save As (Control Shift S)<br>
+        </strong><em>Save the alignment to local file. A file selection
+window will open, use the "Files of type:" selection box to determine
+which <a href="../io/index.html">alignment format</a> to save as.</em>
+      </li>
+      <li><strong>Output to Textbox<br>
+        </strong><em>The alignment will be displayed in plain text in a
+new window, which you can "Copy and Paste" using the pull down menu, or
+your standard operating system copy and paste keys. The output window
+also has a <strong>"New Window"</strong> button to import the
+(possibly edited) text as a new alignment.<br>
+Select the format of the text by selecting one of the following menu
+items.</em>
+        <script src="../scripts/supported_format.js"></script>
+        <ul>
+          <li><strong>FASTA</strong> <em></em> </li>
+          <li><strong>MSF</strong> </li>
+          <li><strong>CLUSTAL</strong> </li>
+          <li><strong>BLC</strong> </li>
+          <li><strong>PIR</strong> </li>
+          <li><strong>PFAM</strong> </li>
+        </ul>
+      </li>
+      <li><strong>Print (Control P)<br>
+        </strong><em>Jalview will print the alignment using the current
+fonts and colours of your alignment. If the alignment has annotations
+visible, these will be printed below the alignment. If the alignment is
+wrapped the number of residues per line of your alignment will depend
+on the paper width or your alignment window width, whichever is the
+smaller. </em> </li>
+      <li><strong>Export Image</strong> <em><br>
+Creates an alignment graphic with the current view's annotation,
+alignment background colours and group colours. If the alignment is <a href="../features/wrap.html">wrapped</a>, the output will also be
+wrapped and will have the same visible residue width as the open
+alignment. </em>
+        <ul>
+          <li><strong>HTML<br>
+            </strong><em>Create a <a href="../io/export.html">web page</a>
+from your alignment.</em> </li>
+          <li><strong>EPS<br>
+            </strong><em>Create an <a href="../io/export.html">Encapsulated
+Postscript</a> file from your alignment.</em> </li>
+          <li><strong>PNG<br>
+            </strong><em>Create a <a href="../io/export.html">Portable
+Network Graphics</a> file from your alignment.</em> </li>
+        </ul>
+      </li>
+      <li><strong>Export Features</strong><em><br>
+All features visible on the alignment can be saved to file or displayed
+in a textbox in either Jalview or GFF format</em> </li>
+      <li><strong>Export Annotations</strong><em><br>
+All annotations visible on the alignment can be saved to file or
+displayed in a textbox in Jalview annotations format. </em> </li>
+      <li><strong>Load Associated Tree<br>
+        </strong><em>Jalview can <a href="../calculations/treeviewer.html">view trees</a> stored in the
+Newick file format, and associate them with the alignment. Note: the
+ids of the tree file and your alignment MUST be the same.</em></li>
+      <li><strong>Load Features / Annotations<br>
+        </strong><em>Load files describing precalculated <a href="../features/featuresFormat.html">sequence features</a> or <a href="../features/annotationsFormat.html">alignment annotations</a>.</em></li>
+      <li><strong>Close (Control W)</strong><br>
+        <em>Close the alignment window. Make sure you have saved your
+alignment before you close - either as a Jalview project or by using
+the <strong>Save As</strong> menu.</em> </li>
+    </ul>
+  </li>
+  <li><strong>Edit</strong>
+    <ul>
+      <li><strong>Undo (Control Z)</strong><em><br>
+This will undo any edits you make to the alignment. This applies to
+insertion or deletion of gaps, cutting residues or sequences from the
+alignment or pasting sequences to the current alignment or sorting the
+alignment. <strong>NOTE:</strong> It DOES NOT undo colour changes,
+adjustments to group sizes, or changes to the annotation panel. </em> </li>
+      <li><strong>Redo (Control Y)<br>
+        </strong><em>Any actions which you undo can be redone using
+redo. </em> </li>
+      <li><strong>Cut (Control X)<br>
+        </strong><em>This will make a copy of the currently selected
+residues before removing them from your alignment. Click on a sequence
+name if you wish to select a whole sequence. <br>
+Use &lt;CTRL&gt; and X (&lt;APPLE&gt; and X on MacOSX) to cut.</em> </li>
+      <li><strong>Copy (Control C)</strong><br>
+        <em>Copies the currently selected residues to the system
+clipboard - you can also do this by pressing &lt;CTRL&gt; and C
+(&lt;APPLE&gt; and C on MacOSX). <br>
+If you try to paste the clipboard contents to a text editor, you will
+see the format of the copied residues FASTA.</em></li>
+      <li><strong>Paste </strong>
+        <ul>
+          <li><strong>To New Alignment (Control Shift V)<br>
+            </strong><em>A new alignment window will be created from
+sequences previously copied or cut to the system clipboard. <br>
+Use &lt;CTRL&gt; and &lt;SHIFT&gt; and V(&lt;APPLE&gt; and
+&lt;SHIFT;&gt; and and V on MacOSX) to paste.</em> </li>
+          <li><strong>Add To This Alignment (Control V)<br>
+            </strong><em>Copied sequences from another alignment window
+can be added to the current Jalview alignment. </em> </li>
+        </ul>
+      </li>
+      <li><strong>Delete (Backspace)<br>
+        </strong><em>This will delete the currently selected residues
+without copying them to the clipboard. Like the other edit operations,
+this can be undone with <strong>Undo</strong>.</em> </li>
+      <li><strong>Remove Left (Control L)<br>
+        </strong><em>If the alignment has marked columns, the alignment
+will be trimmed to the left of the leftmost marked column. To mark a
+column, mouse click the scale bar above the alignment. Click again to
+unmark a column, or select "Deselect All" to deselect all columns.</em></li>
+      <li><strong>Remove Right (Control R)<br>
+        </strong><em>If the alignment has marked columns, the alignment
+will be trimmed to the left of the leftmost marked column. To mark a
+column, mouse click the scale bar above the alignment. Click again to
+unmark a column, or select "Deselect All" to deselect all columns.</em></li>
+      <li><strong>Remove Empty Columns (Control E)<br>
+        </strong><em>All columns which only contain gap characters
+("-", ".") will be deleted.<br>
+You may set the default gap character in <a href="../features/preferences.html">preferences</a>. </em> </li>
+      <li><strong>Remove All Gaps (Control Shift E)</strong><br>
+        <em>Gap characters ("-", ".") will be deleted from the selected
+area of the alignment. If no selection is made, ALL the gaps in the
+alignment will be removed.<br>
+You may set the default gap character in <a href="../features/preferences.html">preferences</a>. </em> </li>
+      <li><strong>Remove Redundancy (Control D)<br>
+        </strong><em>Selecting this option brings up a window asking
+you to select a threshold. If the percentage identity between any two
+sequences (under the current alignment) exceeds this value then one of
+the sequences (the shorter) is discarded. Press the "Apply" button to
+remove redundant sequences. The "Undo" button will undo the last
+redundancy deletion.</em> </li>
+      <li><strong>Pad Gaps<br>
+        </strong><em>When selected, the alignment will be kept at
+minimal width (so there no empty columns before or after the first or
+last aligned residue) and all sequences will be padded with gap
+characters to the before and after their terminating residues.<br>
+This switch is useful when making a tree using unaligned sequences and
+when working with alignment analysis programs which require 'properly
+aligned sequences' to be all the same length.<br>
+You may set the default for <strong>Pad Gaps</strong> in the <a href="../features/preferences.html">preferences</a>. </em> </li>
+    </ul>
+  </li>
+  <li><strong>Select</strong>
+    <ul>
+      <li><strong><a href="../features/search.html">Find... (Control F)</a>
+        </strong><em><br>
+Opens the Find dialog box to search for residues, sequence name or
+residue position within the alignment and create new sequence features
+from the queries. </em> </li>
+      <li><strong>Select All (Control A)<br>
+        </strong><em>Selects all the sequences and residues in the
+alignment. <br>
+Use &lt;CTRL&gt; and A (&lt;APPLE&gt; and A on a MacOSX) to select all.</em></li>
+      <li><strong>Deselect All (Escape)<br>
+        </strong><em>Removes the current selection box (red dashed box)
+from the alignment window. All selected sequences, residues and marked
+columns will be deselected. </em><em> <br>
+Use &lt;ESCAPE&gt; to deselect all.</em></li>
+      <li><strong>Invert Sequence Selection (Control I)<br>
+        </strong><em>Any sequence ids currently not selected will
+replace the current selection. </em> </li>
+      <li><strong>Invert Column Selection (Control Alt I)<br>
+        </strong><em>Any columns currently not selected will replace
+the current column selection. </em> </li>
+      <li><strong>Create Group (Control G)<br>
+        </strong> <em>Create a group containing the currently selected
+sequences.</em></li>
+      <li><strong>Remove Group (Shift Control G)<br>
+        </strong> <em>Ungroup the currently selected sequence group.
+(Create/Remove group new in Jalview 2.8.1)</em></li>
+      <li><strong>Make Groups for selection<br>
+        </strong> <em>The currently selected groups of the alignment
+will be subdivided according to the contents of the currently selected
+region. <br>
+Use this to subdivide an alignment based on the different combinations
+of residues observed at specific positions. (new in jalview 2.5)</em> </li>
+      <li><strong>Undefine Groups (Control U)<br>
+        </strong><em>The alignment will be reset with no defined groups.<br>
+        <strong>WARNING</strong>: This cannot be undone.</em> </li>
+    </ul>
+  </li>
+  <li><strong>View</strong>
+    <ul>
+      <li><strong>New View (Control T)</strong><em><br>
+Creates a new view from the current alignment view. </em> </li>
+      <li><strong>Expand Views (X)</strong><em><br>
+Display each view associated with the alignment in its own alignment
+window, allowing several views to be displayed simultaneously. </em> </li>
+      <li><strong>Gather Views (G)</strong><em><br>
+Each view associated with the alignment will be displayed within its
+own tab on the current alignment window. </em> </li>
+      <li><strong>Show&#8594;(all Columns / Sequences / Sequences and Columns)</strong><em><br>
+All hidden Columns / Sequences / Sequences and Columns will be
+revealed. </em> </li>
+      <li><strong>Hide&#8594;(all Columns / Sequences / Selected Region / All
+but Selected Region )</strong><em><br>
+Hides the all the currently selected Columns / Sequences / Region or
+everything but the selected Region.</em> </li>
+      <li><strong>Automatic Scrolling<br>
+        </strong><em>When selected, the view will automatically scroll
+to display the highlighted sequence position corresponding to the
+position under the mouse pointer in a linked alignment or structure
+view.</em></li>
+      <li><strong>Show Annotations<br>
+        </strong><em>If this is selected the "Annotation Panel" will be
+displayed below the alignment. The default setting is to display the
+conservation calculation, quality calculation and consensus values as
+bar charts. </em> </li>
+      <li><strong>Autocalculated Annotation<br>
+        </strong><em>Settings for the display of autocalculated
+annotation.</em>
+        <ul>
+          <li><strong>Apply to all groups<br>
+            </strong><em> When ticked, any modification to the current
+settings will be applied to all autocalculated annotation.</em></li>
+          <li><strong>Show Consensus Histogram<br>
+            </strong><em> Enable or disable the display of the
+histogram above the consensus sequence.</em></li>
+          <li><strong>Show Consensus Logo<br>
+            </strong><em> Enable or disable the display of the
+Consensus Logo above the consensus sequence.</em></li>
+          <li><strong>Normalise Consensus Logo<br>
+            </strong><em>When enabled, scales all logo stacks to the
+same height, making it easier to compare symbol diversity in highly
+variable regions.</em></li>
+          <li><strong>Group Conservation<br>
+            </strong><em> When ticked, display a conservation row for
+all groups (only available for protein alignments).</em></li>
+          <li><strong>Apply to all groups<br>
+            </strong><em> When ticked, display a consensus row for all
+groups.</em></li>
+        </ul>
+      </li>
+      <li><strong>Show Sequence Features</strong><br>
+        <em>Show or hide sequence features on this alignment.</em> </li>
+      <li><strong><a href="../features/featuresettings.html">Seqence
+Feature Settings...</a> </strong><em><br>
+        <em>Opens the Sequence Feature Settings dialog box to control
+the colour and display of sequence features on the alignment, and
+configure and retrieve features from DAS annotation servers.</em> </em></li>
+      <em> </em>
+      <li><em><strong>Sequence ID Tooltip</strong><em> (application
+only) <br>
+This submenu's options allow the inclusion or exclusion of
+non-positional sequence features or database cross references from the
+tooltip shown when the mouse hovers over the sequence ID panel.</em> </em></li>
+      <em> </em>
+      <li><em><strong>Alignment Properties...<br>
+        </strong><em>Displays some simple statistics computed for the
+current alignment view and any named properties defined on the whole
+alignment.</em> </em></li>
+      <em> </em>
+      <li><em><strong><a href="../features/overview.html">Overview
+Window</a><br>
+        </strong><em>A scaled version of the alignment will be
+displayed in a small window. A red box will indicate the currently
+visible area of the alignment. Move the visible region using the mouse.
+        </em> </em></li>
+      <em> </em>
+    </ul>
+  </li>
+  <em> </em>
+  <li><em><strong>Alignment Window Format Menu</strong> </em>
+    <ul>
+      <em> </em>
+      <li><em><strong>Font...<br>
+        </strong><em>Opens the "Choose Font" dialog box, in order to
+change the font of the display and enable or disable 'smooth fonts'
+(anti-aliasing) for faster alignment rendering. </em></em></li>
+      <em> </em>
+      <li><em><strong>Wrap<br>
+        </strong><em>When ticked, the alignment display is "<a href="../features/wrap.html">wrapped</a>" to the width of the
+alignment window. This is useful if your alignment has only a few
+sequences to view its full width at once.</em><br>
+Additional options for display of sequence numbering and scales are
+also visible in wrapped layout mode:<br>
+        </em>
+        <ul>
+          <em> </em>
+          <li><em><strong>Scale Above</strong><br>
+            <em> Show the alignment column position scale.</em></em></li>
+          <em> </em>
+          <li><em><strong>Scale Left</strong><br>
+            <em> Show the sequence position for the first aligned
+residue in each row in the left column of the alignment.</em></em></li>
+          <em> </em>
+          <li><em><strong>Scale Right</strong><br>
+            <em> Show the sequence position for the last aligned
+residue in each row in the right-most column of the alignment.</em></em></li>
+          <em> </em>
+          <li><em><strong>Show Sequence Limits<br>
+            </strong><em>If this box is selected the sequence name will
+have the start and end position of the sequence appended to the name,
+in the format NAME/START-END</em> </em></li>
+          <em> </em>
+          <li><em><strong>Right Align Sequence ID<br>
+            </strong><em>If this box is selected then the sequence
+names displayed in the sequence label area will be aligned against the
+left-hand edge of the alignment display, rather than the left-hand edge
+of the alignment window. </em></em></li>
+          <em><em> </em></em>
+          <li><em><em><strong>Show Hidden Markers<br>
+            </strong><em>When this box is selected, positions in the
+alignment where rows and columns are hidden will be marked by blue
+arrows. </em></em></em></li>
+          <em><em><em> </em></em></em>
+          <li><em><em><em><strong>Boxes</strong><em><br>
+If this is selected the background of a residue will be coloured using
+the selected background colour. Useful if used in conjunction with
+"Colour Text." </em> </em></em></em></li>
+          <em><em><em> </em></em></em>
+          <li><em><em><em><strong>Text<br>
+            </strong><em>If this is selected the residues will be
+displayed using the standard 1 character amino acid alphabet.</em> </em></em></em></li>
+          <em><em><em> </em></em></em>
+          <li><em><em><em><strong>Colour Text<br>
+            </strong><em>If this is selected the residues will be
+coloured according to the background colour associated with that
+residue. The colour is slightly darker than background so the amino
+acid symbol remains visible. </em> </em></em></em></li>
+          <em><em><em> </em></em></em>
+          <li><em><em><em><strong>Show Gaps<br>
+            </strong><em>When this is selected, gap characters will be
+displayed as "." or "-". If unselected, then gap characters will appear
+as blank spaces. <br>
+You may set the default gap character in <a href="../features/preferences.html">preferences</a>.</em> </em></em></em></li>
+          <em><em><em> </em></em></em>
+          <li><em><em><em><strong>Centre Annotation Labels<br>
+            </strong><em>Select this to center labels along an
+annotation row relative to their associated column (default is off,
+i.e. left-justified).</em> </em></em></em></li>
+          <em><em><em> </em></em></em>
+          <li><em><em><em><strong>Show Unconserved<br>
+            </strong><em>When this is selected, all consensus sequence
+symbols will be rendered as a '.', highlighting mutations in highly
+conserved alignments. </em> </em></em></em></li>
+          <em><em><em> </em></em></em>
+        </ul>
+      </li>
+      <em><em><em> </em></em></em>
+    </ul>
+    <em><em><em> </em></em></em></li>
+  <em><em><em> </em></em></em>
+</ul>
 
-               <li><strong>Colour</strong>
-                       <ul>
-                               <li><strong>Apply Colour To All Groups<br> </strong><em>If
-                                               this is selected, any changes made to the background colour will
-                                               be applied to all currently defined groups.<br> </em>
-                               </li>
-                               <li><strong><a href="../colourSchemes/textcolour.html">Colour
-                                                       Text...</a> </strong><em><br> Opens the Colour Text dialog box to
-                                               set a different text colour for light and dark background, and the
-                                               intensity threshold for transition between them. </em>
-                               </li>
-                               <li>Colour Scheme options: <strong>None, ClustalX,
-                                               Blosum62 Score, Percentage Identity, Zappo, Taylor,
-                                               Hydrophobicity, Helix Propensity, Strand Propensity, Turn
-                                               Propensity, Buried Index, Nucleotide, Purine/Pyrimidine, User Defined<br> </strong> <em>See
-                                               <a href="../colourSchemes/index.html">colours</a> for a
-                                               description of all colour schemes.</em><br></li>
-                               <li><strong>By Conservation<br> </strong><em>See <a
-                                               href="../colourSchemes/conservation.html">Colouring by
-                                                       Conservation</a>.</em><br></li>
-                               <li><strong>Modify Conservation Threshold<br> </strong><em>Use
-                                               this to display the conservation threshold slider window. Useful
-                                               if the window has been closed, or if the 'by conservation' option
-                                               appears to be doing nothing!</em><br></li>
-                               <li><strong>Above Identity Threshold<br> </strong><em>See
-                                               <a href="../colourSchemes/abovePID.html">Above Percentage
-                                                       Identity</a> </em><strong>.<br> </strong>
-                               </li>
-                               <li><strong>Modify Identity Threshold<br> </strong><em>Use
-                                               this to set the threshold value for colouring above Identity.
-                                               Useful if the window has been closed.<br> </em>
-                               </li>
-                               <li><strong>By Annotation</strong><br> <em>Colours
-                                               the alignment on a per-column value from a specified annotation.
-                                               See <a href="../colourSchemes/annotationColouring.html">Annotation
-                                                       Colouring</a>.</em><br></li>
-               <li><strong>By RNA Helices</strong><br>
-               <em>Colours the helices of an RNA alignment loaded from a Stockholm file. See 
-               <a href="../colourSchemes/rnahelicesColouring.html">RNA Helices
-               Colouring</a>.</em><br>
-               </li>
-                       </ul></li>
-               <li><strong>Calculate</strong>
-                       <ul>
-                               <li><strong>Sort </strong>
-                                       <ul>
-                                               <li><strong>by ID</strong><em><br> This will sort
-                                                               the sequences according to sequence name. If the sort is
-                                                               repeated, the order of the sorted sequences will be inverted. </em>
-                                               </li>
-                                               <li><strong>by Length</strong><em><br> This will
-                                                               sort the sequences according to their length (excluding gap
-                                                               characters). If the sort is repeated, the order of the sorted
-                                                               sequences will be inverted. </em></li>
-                                               <li><strong>by Group</strong><strong><br> </strong><em>This
-                                                               will sort the sequences according to sequence name. If the sort
-                                                               is repeated, the order of the sorted sequences will be inverted.
-                                               </em><strong></strong></li>
-                                               <li><strong>by Pairwise Identity<br> </strong><em>This
-                                                               will sort the selected sequences by their percentage identity to
-                                                               the consensus sequence. The most similar sequence is put at the
-                                                               top. </em></li>
-                                               <li><em>The <a href="../calculations/sorting.html">Sort
-                                                                       menu</a> will have some additional options if you have just done a
-                                                               multiple alignment calculation, or opened a tree viewer window.</em><br>
-                                               </li>
-                                       </ul>
-                               </li>
-                               <li><strong>Calculate Tree </strong> <br> <em>Functions
-                                               for calculating trees on the alignment or the currently selected
-                                               region. See <a href="../calculations/tree.html">calculating
-                                                       trees</a>.</em>
-                                       <ul>
-                                               <li><strong>Average Distance Using % Identity</strong></li>
-                                               <li><strong>Neighbour Joining Using % Identity</strong></li>
-                                               <li><strong>Average Distance Using Blosum62</strong></li>
-                                               <li><strong>Neighbour Joining Using Blosum62<br>
-                                               </strong></li>
-                                       </ul>
-                                       <strong>Note: Since Version 2.8.1, a number of additional similarity measures for tree calculation are provided in this menu.</strong>
-                               </li>
-                               <li><strong>Pairwise Alignments</strong><br> <em>Applies
-                                               Smith and Waterman algorithm to selected sequences. See <a
-                                               href="../calculations/pairwise.html">pairwise alignments</a>.</em><br>
-                               </li>
-                               <li><strong>Principal Component Analysis</strong><br> <em>Shows
-                                               a spatial clustering of the sequences based on similarity scores calculated with
-                                               the alignment. See <a href="../calculations/pca.html">Principal
-                                                       Component Analysis</a>.</em> <br>
-                               </li>
-                               <li><strong>Extract Scores ... (optional)</strong><br> <em>This
-                                               option is only visible if Jalview detects one or more white-space
-                                               separated values in the description line of the alignment
-                                               sequences.<br> When selected, these numbers are parsed into
-                                               sequence associated annotation which can then be used to sort the
-                                               alignment via the Sort by&#8594;Score menu.</em> <br>
-                               </li>
-                               <li><strong>Autocalculate Consensus</strong><br> <em>For
-                                               large alignments it can be useful to deselect &quot;Autocalculate
-                                               Consensus&quot; when editing. This prevents the sometimes lengthy
-                                               calculations performed after each sequence edit.</em> <br>
-                               </li>
-                               <li><strong>Sort With New Tree</strong><br> <em>When
-                                               enabled, Jalview will automatically sort the alignment when a new
-                                               tree is calculated or loaded onto it.</em> <br></li>
-                       <li><strong>Show Flanking Regions</strong><br> <em>Opens
-                                       a new alignment window showing any additional sequence data either
-                                       side of the current alignment. Useful in conjunction with 'Fetch
-                                       Database References' when the 'Trim Retrieved Sequences' option is
-                                       disabled to retrieve full length sequences for a set of aligned
-                                       peptides. </em></li>
-               </ul></li>
+<em><em><em> </em></em></em>
+<li><em><em><em><strong>Colour</strong> </em></em></em>
+  <ul>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Apply Colour To All Groups<br>
+      </strong><em>If this is selected, any changes made to the
+background colour will be applied to all currently defined groups.<br>
+      </em> </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong><a href="../colourSchemes/textcolour.html">Colour
+Text...</a> </strong><em><br>
+Opens the Colour Text dialog box to set a different text colour for
+light and dark background, and the intensity threshold for transition
+between them. </em> </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em>Colour Scheme options: <strong>None, ClustalX,
+Blosum62 Score, Percentage Identity, Zappo, Taylor, Hydrophobicity,
+Helix Propensity, Strand Propensity, Turn Propensity, Buried Index,
+Nucleotide, Purine/Pyrimidine, User Defined<br>
+      </strong> <em>See <a href="../colourSchemes/index.html">colours</a>
+for a description of all colour schemes.</em><br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>By Conservation<br>
+      </strong><em>See <a href="../colourSchemes/conservation.html">Colouring
+by Conservation</a>.</em><br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Modify Conservation Threshold<br>
+      </strong><em>Use this to display the conservation threshold
+slider window. Useful if the window has been closed, or if the 'by
+conservation' option appears to be doing nothing!</em><br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Above Identity Threshold<br>
+      </strong><em>See <a href="../colourSchemes/abovePID.html">Above
+Percentage Identity</a> </em><strong>.<br>
+      </strong> </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Modify Identity Threshold<br>
+      </strong><em>Use this to set the threshold value for colouring
+above Identity. Useful if the window has been closed.<br>
+      </em> </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>By Annotation</strong><br>
+      <em>Colours the alignment on a per-column value from a specified
+annotation. See <a href="../colourSchemes/annotationColouring.html">Annotation
+Colouring</a>.</em><br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>By RNA Helices</strong><br>
+      <em>Colours the helices of an RNA alignment loaded from a
+Stockholm file. See <a href="../colourSchemes/rnahelicesColouring.html">RNA
+Helices Colouring</a>.</em><br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+  </ul>
+</li>
 
-               <li><strong>Web Service Menu</strong><br /> <em>This menu
-                               is dynamic, and may contain user-defined web service entries in
-                               addition to any of the following ones:</em>
-                       <ul>
-                               <li><strong>Fetch DB References</strong><br> <em>This
-        submenu contains options for accessing any of the database services
-        that Jalview is aware of (e.g. DAS sequence servers and the
-        WSDBFetch service provided by the EBI) to verify sequence start/end
-        positions and retrieve all database cross references and PDB ids
-        associated with all or just the selected sequences in the alignment.
-        <ul>
-          <li>'Trim Retrieved Sequences' - when checked, Jalview will
-            discard any additional sequence data for accessions associated with
-            sequences in the alignment. <br> <strong>Note: Disabling this
-              could cause out of memory errors when working with genomic
-              sequence records !</strong><br> <strong>Added in Jalview 2.8.1</strong>
-        </li>
-          <li>'Standard Databases' will check sequences against the EBI
-            databases plus any active DAS sequence sources<</li>
-        </ul> Other sub-menus allow you to pick a specific source to query -
-        sources are listed alphabetically according to their nickname.
-    </em><br></li>
-                       </ul>
-                       <p>Selecting items from the following submenus will start a
-                               remote service on compute facilities at the University of Dundee, or
-                               elsewhere. You need a continuous network connection in order to use
-                               these services through Jalview.
-                       </p>
-                       <ul>
-                               <li><strong>Alignment</strong><br /><em> Align the currently
-                                       selected sequences or all sequences in the alignment, or re-align
-                                       unaligned sequences to the aligned sequences. Entries in this menu
-                                       provide access to the various alignment programs supported by <a
-                                       href="../webServices/JABAWS.html">JABAWS</a>. See the <a
-                                       href="../webServices/msaclient.html">Multiple Sequence
-                                               Alignment webservice client</a> entry for more information.</em></li>
-                               <li><strong>Secondary Structure Prediction</strong>
-                                       <ul>
-                                               <li><strong>JPred Secondary Structure Prediction</strong><br>
-                                                       <em>Secondary structure prediction by network consensus. See
-                                                               the <a href="../webServices/jnet.html">Jpred3</a> client entry for
-                                                               more information. The behaviour of this calculation depends on
-                                                               the current selection:
-                                                               <ul>
-                                                                       <li>If nothing is selected, and the displayed sequences
-                                                                               appear to be aligned, then a JNet prediction will be run for
-                                                                               the first sequence in the alignment, using the current
-                                                                               alignment. Otherwise the first sequence will be submitted for
-                                                                               prediction.</li>
-                                                                       <li>If just one sequence (or a region on one sequence) has
-                                                                               been selected, it will be submitted to the automatic JNet
-                                                                               prediction server for homolog detection and prediction.</li>
-                                                                       <li>If a set of sequences are selected, and they appear to
-                                                                               be aligned, then the alignment will be used for a Jnet
-                                                                               prediction on the <strong>first</strong> sequence in the set
-                                                                               (that is, the one that appears first in the alignment window).
-                                                                       </li>
-                                                               </ul> </em>
-                                       </ul></li>
-                               <li><strong>Analysis</strong><br />
-                                       <ul>
-                                               <li><strong>Multi-Harmony</strong><br> <em>Performs
-                                                               functional residue analysis on a protein family alignment with
-                                                               sub-families defined on it. See the <a
-                                                               href="../webServices/shmr.html">Multi-Harmony service</a> entry for more
-                                                               information.</em>
-                                               </li>
-                                       </ul></li>
-                       </ul></li>
-       </ul>
+<em><em><em> </em></em></em>
+<li><em><em><em><strong>Calculate</strong> </em></em></em>
+  <ul>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Sort </strong> </em></em></em>
+      <ul>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>by ID</strong><em><br>
+This will sort the sequences according to sequence name. If the sort is
+repeated, the order of the sorted sequences will be inverted. </em> </em></em></em></li>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>by Length</strong><em><br>
+This will sort the sequences according to their length (excluding gap
+characters). If the sort is repeated, the order of the sorted sequences
+will be inverted. </em></em></em></em></li>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>by Group</strong><strong><br>
+          </strong><em>This will sort the sequences according to
+sequence name. If the sort is repeated, the order of the sorted
+sequences will be inverted. </em><strong></strong></em></em></em></li>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>by Pairwise Identity<br>
+          </strong><em>This will sort the selected sequences by their
+percentage identity to the consensus sequence. The most similar
+sequence is put at the top. </em></em></em></em></li>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><em>The <a href="../calculations/sorting.html">Sort
+menu</a> will have some additional options if you have just done a
+multiple alignment calculation, or opened a tree viewer window.</em><br>
+          </em></em></em></li>
+        <em><em><em> </em></em></em>
+      </ul>
+      <em><em><em> </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Calculate Tree </strong> <br>
+      <em>Functions for calculating trees on the alignment or the
+currently selected region. See <a href="../calculations/tree.html">calculating
+trees</a>.</em> </em></em></em>
+      <ul>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>Average Distance Using % Identity</strong></em></em></em></li>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>Neighbour Joining Using % Identity</strong></em></em></em></li>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>Average Distance Using Blosum62</strong></em></em></em></li>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>Neighbour Joining Using Blosum62<br>
+          </strong></em></em></em></li>
+        <em><em><em> </em></em></em>
+      </ul>
+      <em><em><em> <strong>Note: Since Version 2.8.1, a number of
+additional similarity measures for tree calculation are provided in
+this menu.</strong> </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Pairwise Alignments</strong><br>
+      <em>Applies Smith and Waterman algorithm to selected sequences.
+See <a href="../calculations/pairwise.html">pairwise alignments</a>.</em><br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Principal Component Analysis</strong><br>
+      <em>Shows a spatial clustering of the sequences based on
+similarity scores calculated with the alignment. See <a href="../calculations/pca.html">Principal Component Analysis</a>.</em>
+      <br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Extract Scores ... (optional)</strong><br>
+      <em>This option is only visible if Jalview detects one or more
+white-space separated values in the description line of the alignment
+sequences.<br>
+When selected, these numbers are parsed into sequence associated
+annotation which can then be used to sort the alignment via the Sort
+by&#8594;Score menu.</em> <br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Autocalculate Consensus</strong><br>
+      <em>For large alignments it can be useful to deselect
+"Autocalculate Consensus" when editing. This prevents the sometimes
+lengthy calculations performed after each sequence edit.</em> <br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Sort With New Tree</strong><br>
+      <em>When enabled, Jalview will automatically sort the alignment
+when a new tree is calculated or loaded onto it.</em> <br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Show Flanking Regions</strong><br>
+      <em>Opens a new alignment window showing any additional sequence
+data either side of the current alignment. Useful in conjunction with
+'Fetch Database References' when the 'Trim Retrieved Sequences' option
+is disabled to retrieve full length sequences for a set of aligned
+peptides. </em></em></em></em></li>
+    <em><em><em> </em></em></em>
+  </ul>
+</li>
+
+<em><em><em> </em></em></em>
+<li><em><em><em><strong>Web Service Menu</strong><br>
+  <em>This menu is dynamic, and may contain user-defined web service
+entries in addition to any of the following ones:</em> </em></em></em>
+  <ul>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Fetch DB References</strong><br>
+      <em>This submenu contains options for accessing any of the
+database services that Jalview is aware of (e.g. DAS sequence servers
+and the WSDBFetch service provided by the EBI) to verify sequence
+start/end positions and retrieve all database cross references and PDB
+ids associated with all or just the selected sequences in the
+alignment. </em></em></em></em>
+      <ul>
+        <em><em><em><em> </em></em></em></em>
+        <li><em><em><em><em>'Trim Retrieved Sequences' - when checked,
+Jalview will discard any additional sequence data for accessions
+associated with sequences in the alignment. <br>
+          <strong>Note: Disabling this could cause out of memory errors
+when working with genomic sequence records !</strong><br>
+          <strong>Added in Jalview 2.8.1</strong> </em></em></em></em></li>
+        <em><em><em><em> </em></em></em></em>
+        <li><em><em><em><em>'Standard Databases' will check sequences
+against the EBI databases plus any active DAS sequence sources&lt;</em></em></em></em></li>
+        <em><em><em><em> </em></em></em></em>
+      </ul>
+      <em><em><em><em> Other sub-menus allow you to pick a specific
+source to query - sources are listed alphabetically according to their
+nickname. </em><br>
+      </em></em></em></li>
+    <em><em><em> </em></em></em>
+  </ul>
+  <em><em><em> </em></em></em>
+  <p><em><em><em>Selecting items from the following submenus will start
+a remote service on compute facilities at the University of Dundee, or
+elsewhere. You need a continuous network connection in order to use
+these services through Jalview. </em></em></em></p>
+  <em><em><em> </em></em></em>
+  <ul>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Alignment</strong><br>
+      <em> Align the currently selected sequences or all sequences in
+the alignment, or re-align unaligned sequences to the aligned
+sequences. Entries in this menu provide access to the various alignment
+programs supported by <a href="../webServices/JABAWS.html">JABAWS</a>.
+See the <a href="../webServices/msaclient.html">Multiple Sequence
+Alignment webservice client</a> entry for more information.</em></em></em></em></li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Secondary Structure Prediction</strong> </em></em></em>
+      <ul>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>JPred Secondary Structure Prediction</strong><br>
+          <em>Secondary structure prediction by network consensus. See
+the <a href="../webServices/jnet.html">Jpred3</a> client entry for
+more information. The behaviour of this calculation depends on the
+current selection: </em></em></em></em>
+          <ul>
+            <em><em><em><em> </em></em></em></em>
+            <li><em><em><em><em>If nothing is selected, and the
+displayed sequences appear to be aligned, then a JNet prediction will
+be run for the first sequence in the alignment, using the current
+alignment. Otherwise the first sequence will be submitted for
+prediction.</em></em></em></em></li>
+            <em><em><em><em> </em></em></em></em>
+            <li><em><em><em><em>If just one sequence (or a region on
+one sequence) has been selected, it will be submitted to the automatic
+JNet prediction server for homolog detection and prediction.</em></em></em></em></li>
+            <em><em><em><em> </em></em></em></em>
+            <li><em><em><em><em>If a set of sequences are selected, and
+they appear to be aligned, then the alignment will be used for a Jnet
+prediction on the <strong>first</strong> sequence in the set (that is,
+the one that appears first in the alignment window). </em></em></em></em></li>
+            <em><em><em><em> </em></em></em></em>
+          </ul>
+          <em><em><em><em> </em> </em></em></em></li>
+      </ul>
+    </li>
+    <em><em><em> </em></em></em>
+    <li><em><em><em><strong>Analysis</strong><br>
+      </em></em></em>
+      <ul>
+        <em><em><em> </em></em></em>
+        <li><em><em><em><strong>Multi-Harmony</strong><br>
+          <em>Performs functional residue analysis on a protein family
+alignment with sub-families defined on it. See the <a href="../webServices/shmr.html">Multi-Harmony service</a> entry for
+more information.</em> </em></em></em></li>
+        <em><em><em> </em></em></em>
+      </ul>
+    </li>
+    <em><em><em> </em></em></em>
+  </ul>
+</li>
 
-</body>
-</html>
+<em><em><em> </em></em></em>
+</body></html>
\ No newline at end of file
diff --git a/lib/freemarker.jar b/lib/freemarker.jar
new file mode 100644 (file)
index 0000000..2d59e2d
Binary files /dev/null and b/lib/freemarker.jar differ
diff --git a/src/jalview/help/freemarker/AllignmentMenuTemplateData.java b/src/jalview/help/freemarker/AllignmentMenuTemplateData.java
new file mode 100644 (file)
index 0000000..a1b808b
--- /dev/null
@@ -0,0 +1,59 @@
+package jalview.help.freemarker;
+
+import jalview.io.AppletFormatAdapter;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Map;
+
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+
+public class AllignmentMenuTemplateData
+{
+
+  public static void main(String[] args)
+  {
+    // System.out.println("Absolute Path " + new File().getAbsoluteFile());
+    generateAllignmentMenuTemplateData();
+  }
+  public static void generateAllignmentMenuTemplateData()
+  {
+    Configuration cfg = new Configuration();
+    try
+    {
+      // Load template from source folder
+      Template template = cfg
+              .getTemplate("/help/freemarker_templates/alignmentMenu.ftl");
+
+      // Build the data-model
+      Map<String, Object> data = new HashMap<String, Object>();
+      data.put("format_adapters", AppletFormatAdapter.WRITEABLE_FORMATS);
+
+      // Console output
+      Writer out = new OutputStreamWriter(System.out);
+      template.process(data, out);
+      out.flush();
+
+      // File output
+      Writer file = new FileWriter(
+              new File(
+                      "help/html/freemarker_html_output/alignmentMenu.html"));
+      template.process(data, file);
+      file.flush();
+      file.close();
+
+    } catch (IOException e)
+    {
+      e.printStackTrace();
+    } catch (TemplateException e)
+    {
+      e.printStackTrace();
+    }
+  }
+}
index ed49d5e..d56d853 100755 (executable)
@@ -54,8 +54,8 @@ public class AppletFormatAdapter
    * method
    */
   public static final String[] WRITEABLE_FORMATS = new String[]
-          { "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR", "PFAM", "AMSA",
-    "STH", PhylipFile.FILE_DESC };
+  { "AMSA", "BLC", "CLUSTAL", "FASTA", "MSF", "PileUp", "PIR",
+      PhylipFile.FILE_DESC, "PFAM", "STH" };
 
   /**
    * List of extensions corresponding to file format types in WRITABLE_FNAMES
index ce65eea..faf6714 100644 (file)
@@ -49,7 +49,7 @@ public class PhylipFile extends AlignFile
   public static final String FILE_DESC = "PHYLIP";
 
   /**
-   * 
+   *
    * @see {@link AlignFile#AlignFile()}
    */
   public PhylipFile()
@@ -58,7 +58,7 @@ public class PhylipFile extends AlignFile
   }
 
   /**
-   * 
+   *
    * @param source
    * @throws IOException
    */
@@ -80,7 +80,7 @@ public class PhylipFile extends AlignFile
 
   /**
    * Parses the input source
-   * 
+   *
    * @see {@link AlignFile#parse()}
    */
   @Override
@@ -98,8 +98,8 @@ public class PhylipFile extends AlignFile
                 "First line must contain the number of specifies and number of characters");
       }
 
-      int numberSpecies = Integer.parseInt(lineElements[0]), numberCharacters = Integer
-              .parseInt(lineElements[1]);
+      int numberSpecies = Integer.parseInt(lineElements[0]);
+      int numberCharacters = Integer.parseInt(lineElements[1]);
 
       if (numberSpecies <= 0)
       {
@@ -163,9 +163,11 @@ public class PhylipFile extends AlignFile
         // first check sequence is the expected length
         if (sequences[i].length() != numberCharacters)
         {
-          throw new IOException(sequenceElements[i].getName()
+          String warnMessage = sequenceElements[i].getName()
                   + " sequence is incorrect length - should be "
-                  + numberCharacters + " but is " + sequences[i].length());
+                  + numberCharacters + " but is " + sequences[i].length();
+
+          throw new IOException(warnMessage);
         }
         sequenceElements[i].setSequence(sequences[i].toString());
         seqs.add(sequenceElements[i]);
@@ -190,7 +192,7 @@ public class PhylipFile extends AlignFile
   /**
    * Removes any whitespace from txt, used to strip and spaces added to
    * sequences to improve human readability
-   * 
+   *
    * @param txt
    * @return
    */
@@ -202,7 +204,7 @@ public class PhylipFile extends AlignFile
   /**
    * According to the specification, the name cannot have parentheses, square
    * brackets, colon, semicolon, comma
-   * 
+   *
    * @param name
    * @return
    * @throws IOException
@@ -210,7 +212,7 @@ public class PhylipFile extends AlignFile
   private String validateName(String name) throws IOException
   {
     char[] invalidCharacters = new char[]
-    { '(', ')', '[', ']', ':', ';', ',' };
+            { '(', ')', '[', ']', ':', ';', ',' };
     for (char c : invalidCharacters)
     {
       if (name.indexOf(c) > -1)
@@ -228,8 +230,8 @@ public class PhylipFile extends AlignFile
    * characters; a blank line is added between each matrix; no spacing is added
    * between the sequence characters.
    * </p>
-   * 
-   * 
+   *
+   *
    * @see {@link AlignFile#print()}
    */
   @Override
@@ -242,7 +244,7 @@ public class PhylipFile extends AlignFile
     sb.append(
             (seqs.size() > 0) ? Integer
                     .toString(seqs.get(0).getSequence().length) : "0")
-            .append(newline);
+                    .append(newline);
 
     // Due to how IO is handled, there doesn't appear to be a way to store
     // if the original file was sequential or interleaved; if there is, then
@@ -309,7 +311,7 @@ public class PhylipFile extends AlignFile
           sb.append(
                   s.getSequence(start, Math.min(start
                           + numInterleavedColumns, sequenceLength)))
-                  .append(newline);
+                          .append(newline);
         }
       }
 
index a938dd6..145cddf 100644 (file)
@@ -5,7 +5,6 @@ import static org.junit.Assert.fail;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.function.Consumer;
 
 import org.junit.Test;
 
@@ -18,67 +17,87 @@ import compbio.ws.client.Services;
 
 public class MinJabawsClientTests {
 
-       /**
-        * simple test for the benefit of JAL-1338
-        * @throws Exception
-        */
-       @SuppressWarnings("rawtypes")
-       @Test
-       public void msaTest() throws Exception {
-               String url;
-               RegistryWS registry = Jws2Client
-                               .connectToRegistry(url = "http://www.compbio.dundee.ac.uk/jabaws");
-               if (registry != null) {
+  /**
+   * simple test for the benefit of JAL-1338
+   * @throws Exception
+   */
+  @SuppressWarnings("rawtypes")
+  @Test
+  public void msaTest() throws Exception {
+    String url;
+    RegistryWS registry = Jws2Client
+            .connectToRegistry(url = "http://www.compbio.dundee.ac.uk/jabaws");
+    if (registry != null)
+    {
 
-                       MsaWS msaservice = null;
-                       for (Services service : registry.getSupportedServices()) {
-                               if (service.equals(Services.ClustalOWS)) {
-                                       msaservice = (MsaWS) Jws2Client.connect(url, service);
-                                       if (msaservice != null) {
-                                               break;
-                                       }
-                               }
-                       }
-                       if (msaservice == null) {
-                               fail("couldn't find a clustalO service on the public registry");
-                       }
-                       FastaSequence fsq = new FastaSequence("seqA",
-                                       "SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE");
-                       List<FastaSequence> iseqs = new ArrayList<FastaSequence>();
-                       for (int i = 0; i < 9; i++) {
-                               iseqs.add(new FastaSequence(fsq.getId() + i, fsq.getSequence()
-                                               + fsq.getSequence().substring(i + 3, i + 3 + i)));
-                       }
+      MsaWS msaservice = null;
+      for (Services service : registry.getSupportedServices())
+      {
+        if (service.equals(Services.ClustalOWS))
+        {
+          msaservice = (MsaWS) Jws2Client.connect(url, service);
+          if (msaservice != null)
+          {
+            break;
+          }
+        }
+      }
+      if (msaservice == null)
+      {
+        fail("couldn't find a clustalO service on the public registry");
+      }
+      FastaSequence fsq = new FastaSequence("seqA",
+              "SESESESESESESESSESESSESESESESESESESESESEEEEEESSESESESESSSSESESESESESESE");
+      List<FastaSequence> iseqs = new ArrayList<FastaSequence>();
+      for (int i = 0; i < 9; i++)
+      {
+        iseqs.add(new FastaSequence(fsq.getId() + i, fsq.getSequence()
+                + fsq.getSequence().substring(i + 3, i + 3 + i)));
+      }
 
-                       String jobid = msaservice.align(iseqs);
-                       if (jobid != null) {
-                               JobStatus js = null;
-                               do {
-                                       try {
-                                               Thread.sleep(500);
-                                       } catch (InterruptedException q) {
-                                       }
-                                       ;
-                                       js = msaservice.getJobStatus(jobid);
-                               } while (!js.equals(JobStatus.FAILED)
-                                               && !js.equals(JobStatus.CANCELLED)
-                                               && !js.equals(JobStatus.FINISHED));
-                               assertEquals("Trial alignment failed. State was " + js.name(),
-                                               js, JobStatus.FINISHED);
-                               assertEquals(
-                                               "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
-                                               msaservice.getResult(jobid).getSequences().size(),
-                                               iseqs.size());
-                               msaservice.getResult(jobid).getSequences()
-                                               .forEach(new Consumer<FastaSequence>() {
-                                                       @Override
-                                                       public void accept(FastaSequence t) {
-                                                               System.out.println(">"+t.getId());
-                                                               System.out.println(t.getFormattedFasta());
-                                                       }
-                                               });
-                       }
+      String jobid = msaservice.align(iseqs);
+      if (jobid != null)
+      {
+        JobStatus js = null;
+        do
+        {
+          try
+          {
+            Thread.sleep(500);
+          } catch (InterruptedException q)
+          {
+          }
+          ;
+          js = msaservice.getJobStatus(jobid);
+        } while (!js.equals(JobStatus.FAILED)
+                && !js.equals(JobStatus.CANCELLED)
+                && !js.equals(JobStatus.FINISHED));
+        assertEquals("Trial alignment failed. State was " + js.name(), js,
+                JobStatus.FINISHED);
+        assertEquals(
+                "Mismatch in number of input and result sequences - assume alignment service wasn't interacted with correctly",
+                msaservice.getResult(jobid).getSequences().size(),
+                iseqs.size());
 
-               }
-       }
+        List<FastaSequence> fastaSequences = msaservice.getResult(jobid).getSequences();
+        for(FastaSequence fastaSequence : fastaSequences){
+          System.out.println(">" + fastaSequence.getId());
+          System.out.println(fastaSequence.getFormattedFasta());
+        }
+      }
+
+      //        msaservice.getResult(jobid).getSequences()
+      //        .forEach(new Consumer<FastaSequence>()
+      //                {
+      //                  @Override
+      //                  public void accept(FastaSequence t)
+      //                  {
+      //                    System.out.println(">" + t.getId());
+      //                    System.out.println(t.getFormattedFasta());
+      //                  }
+      //                });
+    }
+
+  }
 }
+