JAL-3111 clarify exercise step in sub-family covariation analysis
[jalview-manual.git] / TheJalviewTutorial.tex
index 5f2ba63..64885d6 100644 (file)
@@ -74,7 +74,7 @@ Exercise \theecount  :  #1  }
 
 {\Huge
  
-Jalview 2.10.3}
+Jalview 2.11}
 \vspace{0.5in}
 {\huge 
 
@@ -101,12 +101,12 @@ School of Life Sciences, University of Dundee
 Dundee, Scotland DD1 5EH, UK
 \vspace{2in}
 
-Manual Version 1.9.1
+Manual Version 1.9.2
 % post CLS lifesci course on 15th January
 % draft. Remaining items are AACon, RNA visualization/editing and Protein disorder analysis exercises.
 
 
-21st November 2017
+26th April 2019
 
 
 \end{center}
@@ -115,7 +115,7 @@ Manual Version 1.9.1
 
 \clearemptydoublepage
 
-% ($Revision$) 11th October 2010.}
+% ($Revision: 1.55 $) 11th October 2010.}
 % TODO revise for 2.6
 
 \pagenumbering{roman}
@@ -437,7 +437,8 @@ The major features of the Jalview Desktop are illustrated in Figure \ref{anatomy
 \begin{figure}[htb]
 \begin{center}
 \includegraphics[width=6.5in]{images/jalview_anatomy.pdf}
-\caption{{\bf The anatomy of Jalview.} The major features of the Jalview Desktop Application are labeled.}
+\caption{{\bf The anatomy of Jalview.} The major features of the Jalview Desktop
+Application are labeled.}
 % TODO: modify text labels to be clearer - black on grey and black border for clarity
 \label{anatomy}
 \end{center}
@@ -458,13 +459,13 @@ scroll bars will not be visible.
  screen because only a small area can be shown at a time. Here, it helps, to
  have an overview of the whole alignment, especially when it is large.
  Select {\sl View $\Rightarrow$ Overview Window} from the Alignment
- window menu bar (Figure \ref{overview}\footnote{the menu shown in this figure
- is from Jalview 2.2, later versions have more options.}).
+ window menu bar (Figure \ref{overview}).
 % (Figure4)
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=4.5in]{images/overview.pdf}
-\caption{{\bf Alignment Overview Window.} The overview window for a view is opened from the {\em View} menu.}
+\caption{{\bf Alignment Overview Window.} The overview window for a view is
+opened from the {\em View} menu.}
 \label{overview}
 \end{center}
 \end{figure}
@@ -671,9 +672,9 @@ accession numbers understood by the source.
  
 \subsection{Memory Limits}
 \label{memorylimits}
-Jalview is a Java program. One unfortunate implication of this is that Jalview
-cannot dynamically request additional memory from the operating system. It is
-important, therefore, that you ensure that you have allocated enough memory to
+Jalview 2.11 and later will automatically maximise the amount of memory available,
+but if you are using an earlier version or launching Jalview in a specialised way
+you may need ensure that you have allocated enough memory to
 work with your data. On most occasions, Jalview will warn you when you have
 tried to load an alignment that is too big to fit in to memory (for instance,
 some of the PFAM alignments are {\bf very} large). You can find out how much
@@ -773,11 +774,11 @@ project files.
 %[fig 10]
 \begin{figure}[htbp]
 \begin{center}
-\parbox[c]{1.0in}{
-\includegraphics[width=1.0in]{images/saveas.pdf}
+\parbox[c]{3.0in}{
+\includegraphics[width=3in]{images/saveas.pdf}
 }
-\parbox[c]{4in}{
-\includegraphics[width=4in]{images/saveas2.pdf}
+\parbox[c]{3in}{
+\includegraphics[width=3in]{images/saveas2.pdf}
 }
 \caption{{\bf Saving alignments in Jalview to disk.}}
 \label{savealign}
@@ -795,8 +796,8 @@ From the main menu select {\sl File $\Rightarrow$ Save Project} and a file save
 dialog box will appear. Loading a project will restore Jalview to exactly the
 view at which the file was saved, complete with all alignments, trees,
 annotation and displayed structures rendered appropriately.
-} \parbox[c]{2in}{ \centerline {
-\includegraphics[width=1.5in]{images/saveproj.pdf} }}
+} \parbox[c]{2.3in}{ \centerline {
+\includegraphics[width=2.2in]{images/saveproj.pdf} }}
 
 \exercise{Saving Alignments}{
 \label{save}
@@ -891,7 +892,8 @@ selection. }
 \begin{figure}[htb]
 \begin{center}
 \includegraphics[width=4in]{images/select3.pdf}
-\caption{{\bf Selecting multiple sequences in an alignment.} Use [CTRL] or [SHIFT] to select many sequences at once.}
+\caption{{\bf Selecting multiple sequences in an alignment.} Use [CTRL] or
+[SHIFT] to select many sequences at once.}
 \label{selectrows}
 \end{center}
 \end{figure}
@@ -1001,10 +1003,10 @@ to include newly selected sequences, and the Percentage Identity colouring chang
 \exstep{ Another way to resize the group is by using the mouse to click and drag
 the right-hand edge of the selected group.}
 
-\exstep{The current selection can be exported and saved by right clicking the
-mouse when on the text area to open the Sequence ID context menu. Follow the
-menus and pick an output format (eg BLC) from the {\sl Selection $\Rightarrow$ Output to Textbox
-\ldots} submenu.
+\exstep{The current selection can be exported and saved, place mouse on the text
+area and right clicking the mouse to open the Sequence ID context menu.
+Select appropriate menu option and pick an output format (eg BLC) from the
+{\sl Selection $\Rightarrow$ Output to Textbox \ldots} submenu.
 }
 \exstep{In the Alignment output window that opens, try manually editing the
 alignment before clicking the {\sl New Window} button. This opens the
@@ -1062,11 +1064,11 @@ Sequences} and the sequences will be concealed, with a small blue triangle indic
 
  \begin{figure}[htbp]
 \begin{center}
-\includegraphics[width=1.5in]{images/hide1.pdf}
-\includegraphics[width=2.5in]{images/hide2.pdf}
-\includegraphics[width=1.75in]{images/hide3.pdf}
-\caption{{\bf Hiding Sequences} Hidden sequences are represented by a small blue
-triangle in the sequence ID panel.}
+\includegraphics[width=1.9in]{images/hide1.pdf}
+\includegraphics[width=2.7in]{images/hide2.pdf}
+\includegraphics[width=1.8in]{images/hide3.pdf}
+\caption{{\bf Hiding Sequences} Hidden sequences are represented by a small
+blue triangle in the sequence ID panel.}
 \label{hideseq}
 \end{center}
 \end{figure}
@@ -1078,9 +1080,9 @@ selection is indicated by a small blue triangle in the ruler bar.
 
  \begin{figure}[htbp]
 \begin{center}
-\includegraphics[width=2in]{images/hide4.pdf}
+\includegraphics[width=1.7in]{images/hide4.pdf}
 \includegraphics[width=3in]{images/hide5.pdf}
-\includegraphics[width=1in]{images/hide6.pdf}
+\includegraphics[width=1.2in]{images/hide6.pdf}
 \caption{{\bf Hiding Columns} Hidden columns are represented by a small blue
 triangle in the ruler bar.}
 \label{hidecol}
@@ -1200,8 +1202,8 @@ leftwards whilst holding down [SHIFT] (for single sequences) or [CTRL] (for a gr
 \label{editingalignex}
 You are going to manually reconstruct part of the example Jalview
 alignment available at
- \href{http://www.jalview.org/examples/exampleFile.jar}
- {http://www.jalview.org/examples/exampleFile.jar}.
+ \href{http://www.jalview.org/examples/exampleFile.jvp}
+ {http://www.jalview.org/examples/exampleFile.jvp}.
 
 {\sl {\bf Mac Users:} Please use the Apple or [CMD] key in place of [CTRL]
 for key combinations such as [CTRL]-A. }
@@ -1403,7 +1405,8 @@ Selecting a higher value limits colouring to more highly conserved columns (Figu
 \includegraphics[width=2in]{images/colourcons1.pdf}
 \includegraphics[width=2in]{images/colourcons3.pdf}
 \includegraphics[width=2in]{images/colourcons5.pdf}
-\caption{{\bf Conservation Shading} The density of the ClustalX style residue colouring is controlled by the conservation threshold. The effect of 0\% (left), 50\% (center) and 100\% (right) thresholds are shown.
+\caption{{\bf Conservation Shading} The density of the ClustalX style residue
+colouring is controlled by the conservation threshold. The effect of 0\% (left), 50\% (center) and 100\% (right) thresholds are shown.
 }
 \label{colcons}
 \end{center}
@@ -1559,10 +1562,11 @@ named. If you save the colour scheme, this name will appear on the Colour menu
 
 \begin{figure}[htbp]
 \begin{center}
-\includegraphics[width=2.5in]{images/col_user1.pdf}
+\includegraphics[width=2.1in]{images/col_user1.pdf}
 \includegraphics[width=2in]{images/col_user2.pdf}
-\includegraphics[width=1.75in]{images/col_user3.pdf}
-\caption{{\bf Creation of a user defined colour scheme.} Residue types are assigned colours (left). The profile is saved (center) and can then be accessed {\sl via} the {\sl Colour} menu (right).}
+\includegraphics[width=2.1in]{images/col_user3.pdf}
+\caption{{\bf Creation of a user defined colour scheme.} Residue types are
+assigned colours (left). The profile is saved (center) and can then be accessed {\sl via} the {\sl Colour} menu (right).}
 \label{usercol}
 \end{center}
 \end{figure}
@@ -1676,7 +1680,7 @@ column, and render all others with a `.'.
 % TODO: describe consensus, conservation, quality user preferences, and group
 % annotation preferences.
 The annotation lines which appear below the sequence alignment are described in
-detail in Section \ref{featannot}. They can be hidden by toggling the {\sl View
+detail in Section \ref{featannot}. They can be hidden by toggling the {\sl Annotations
 $\Rightarrow$ Show Annotations} menu option. Additionally, each annotation line
 can be hidden and revealed in the same way as sequences {\sl via} the
 pop-up context menu on the annotation name panel (Figure \ref{annot}).
@@ -1689,14 +1693,14 @@ displayed, Click-dragging up and down provides more space in the alignment windo
 \includegraphics[width=2.5in]{images/annot1.pdf}
 \includegraphics[width=2.5in]{images/annot2.pdf}
 \caption{{\bf Hiding Annotations} Annotations can either be hidden from the {\sl
-View} menu (left) or individually from the context menu (right).}
+Annotations} menu (left) or individually from the context menu opened by right clicking their label (right).}
 \label{annot}
 \end{center}
 \end{figure}
 
 \exercise{Alignment Layout}{
 \label{exscreen}
-\exstep{Start Jalview and open the URL \textsf{http://www.jalview.org/examples/exampleFile.jar}. 
+\exstep{Start Jalview and open the URL \textsf{http://www.jalview.org/examples/exampleFile.jvp}. 
 Select {\sl Format $\Rightarrow$ Wrap} from the alignment window menu. 
 Experiment with the various options from the {\sl Format} menu, for example adjust the ruler placement, 
 sequence ID format and so on. }
@@ -1716,29 +1720,34 @@ by clicking and dragging this icon up or down.}
 \subsection{Graphical Output}
 \label{figuregen}
 \parbox[c]{4in}{Jalview allows alignments figures to be exported in three different formats, each of which is suited to a particular purpose. Image export is {\sl via} the {\sl File $\Rightarrow$ Export Image $\Rightarrow$ \ldots } alignment window menu option. }
-\parbox[c]{2in}{\centerline{\includegraphics[width=1.25in]{images/image.pdf}}}
+\parbox[c]{2in}{\centerline{\includegraphics[width=2in]{images/image.pdf}}}
 
 \subsubsection{HTML}
 
-\parbox[c]{3in}{HTML is the format used by web pages. Jalview outputs the alignment as an HTML table with all the colours and fonts as seen. Any additional annotation will also be embedded as sensitive areas on the page, such as URL links for each sequence's ID label. This file can then be viewed directly with any web browser. Each residue is placed in an individual table cell. Unwrapped alignments will produce a very wide page.}
+\parbox[c]{4in}{HTML is the format used by web pages. Jalview outputs the
+alignment as a 'Scalable Vector Graphics' (or SVG) file with all the colours and fonts as seen, which is in turn embedded as a scrollable component within an HTML page.
+%% Functionality lost in 2.9 Any additional annotation will also be embedded as sensitive areas on the page, such as URL links for each sequence's ID label. 
+This file can then be viewed directly with any web browser. Unwrapped alignments will produce a very wide page. Export options allow original data to be embedded in the HTML file as BioJSON.\footnote{BioJSON was introduced in Jalview 2.9 and fully described at \url{https://jalview.github.io/biojson/}}}
 \parbox[c]{3.5in}{\centerline{\includegraphics[width=3in]{images/image_html.pdf}}}
 
 \subsubsection{EPS}
-\parbox[c]{3in}{EPS is Encapsulated Postscript. {\bf It is the format of choice
+\parbox[c]{4in}{EPS is Encapsulated Postscript. {\bf It is the format of choice
 for publications and posters} as it gives the highest quality output of any of
 the image types. It can be scaled to any size, so will still look good on an A0
 poster.
 This format can be read by most good presentation and graphics packages such as Adobe Illustrator or Inkscape.
 }
-\parbox[c]{3.5in}{\centerline{\includegraphics[width=3in]{images/image_eps.pdf}} \par \centerline{Zoom Detail of EPS image.}}
+\parbox[c]{3.5in}{\centerline{\includegraphics[width=2.8in]{images/image_eps.pdf}}
+\par \centerline{Zoom Detail of EPS image.}}
 
 \subsubsection{PNG}
-\parbox[c]{3in}{
+\parbox[c]{4in}{
 PNG is Portable Network Graphics. This output option produces an image that can be easily included in web pages and incorporated in presentations using e.g. Powerpoint or Open Office. It is a bitmap image so does not scale and is unsuitable for use on posters, or in publications.
 
 For submission of alignment figures to journals, please use EPS\footnote{If the journal complains, {\em insist}.}.
 }
-\parbox[c]{3.5in}{\centerline{\includegraphics[width=3in]{images/image_png.pdf}} \par \centerline{Zoom Detail of PNG image.}}
+\parbox[c]{4in}{\centerline{\includegraphics[width=3in]{images/image_png.pdf}}
+\par \centerline{Zoom Detail of PNG image.}}
 
  \exercise{Graphical Output}{
  \label{graphicex}
@@ -1757,7 +1766,9 @@ Notice that the image is a bitmap and it becomes pixelated when zoomed.
 $\Rightarrow$ EPS} menu option. Open the file in a suitable program such as
 Photoshop, Illustrator, Inkscape, Ghostview, Powerpoint (Windows), or
 Preview (Mac OS X). Zoom in and note that the image has near-infinite
-resolution.} 
+resolution.}
+\exstep{Experiment with Jalview's other output options: try exporting an alignment view as 'BioJS', which employs the BioJS Multiple Sequence Alignment viewer. When would you use this type of export option ?}
+\exstep{Working with embedded BioJSON data. Drag and drop (or load via the file browser) the 'BioJS' HTML file in the previous step. Compare the original and imported alignment views - are there differences ?}
 \bf See the video at:
 \url{http://www.jalview.org/training/Training-Videos}.
 }
@@ -1814,7 +1825,7 @@ data sources. Webservices like JPred (see \ref{jpred} above) can be used to
 analyse a given sequence or alignment and generate annotation for it.
 
 
-\section{Conservation, Quality and Consensus Annotation}
+\section{Conservation, Quality, Consensus and other Annotation}
 \label{annotationintro}
 Jalview automatically calculates several quantitative alignment annotations
 which are displayed as histograms below the multiple sequence alignment columns. 
@@ -1859,6 +1870,13 @@ the mutations (if any) in a particular column of the alignment. The quality scor
 for all mutations, the ratio of the two BLOSUM 62 scores for a mutation pair and each residue's conserved BLOSUM62 score (which is higher). 
 This value is normalised for each column, and then plotted on a scale from 0 to 1.
 
+\subsubsection{Occupancy Annotation}
+
+Alignment occupancy simply reflects the number of residues aligned at each column
+in the multiple sequence alignment. To see this annotation you may first need to enable it by ticking the {\sl Occupancy} check-box
+in the {\sl Visual} tab in Jalview's {\sl Preferences} before opening an alignment. Occupancy is particularly useful in conjunction with
+the {\sl Select/Hide by Annotations} dialog since it allows the view to be filtered to exclude regions of the alignment with a high proportion of gaps.
+
 \subsubsection{Group Associated Annotation}
 \label{groupassocannotation}
 Group associated consensus and conservation annotation rows reflect the
@@ -1985,13 +2003,40 @@ annotation.
 \url{http://www.jalview.org/training/Training-Videos}.}
 
 
+\section{Sequence Features}
+Sequence features are annotation associated with a specific sequence - often marking a specific region, such as a domain or binding site. Jalview allows features to be created simply by selecting the area in a sequence (or sequences) to form the feature and selecting {\sl Selection $\Rightarrow$ Create Sequence Feature } from the right-click context menu (Figure \ref{features}). A dialog box allows the user to customise the feature with respect to name, group, and colour. The feature is then associated with the sequence. Moving the mouse over a residue associated with a feature brings up a tool tip listing all features associated with the residue.
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=2in]{images/feature1.pdf}
+\includegraphics[width=2.5in]{images/feature2.pdf}
+\includegraphics[width=1.5in]{images/feature3.pdf}
+\caption{{\bf Creating sequence features.} Features can readily be created from selections via the context menu and are then displayed on the sequence. }
+\label{features}
+\end{center}
+\end{figure}
+
+Creation of features from a selection spanning multiple sequences results in the creation of one feature per sequence. 
+Each feature remains associated with its own sequence.
+
+
+
 \section{Importing Features from Databases}
 \label{featuresfromdb}
 Jalview supports feature retrieval from public databases.
-It includes built in parsers for Uniprot and ENA (or EMBL) records retrieved
+It includes built in parsers for Uniprot, Ensembl and ENA (or EMBL) records retrieved
 from the EBI. Sequences retrieved from these sources using the sequence fetcher (see
 Section \ref{fetchseq}) will already possess features.
 
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=4in]{images/features4.pdf}
+\caption{{\bf Multiple sequence features.} An alignment with JPred secondary structure prediction annotation below it, and many sequence features overlaid onto the aligned sequences. The tooltip lists the features annotating the residue below the mouse-pointer.}
+\end{center}
+\end{figure}
+
+
 \subsection{Sequence Database Reference Retrieval}
 \label{fetchdbrefs}
 Jalview maintains a list of external database references for each sequence in
@@ -2033,7 +2078,7 @@ start and end numbering against any of the sequence databases that the {\sl
 Sequence Fetcher} has access to. This function is accessed from the {\sl
 Webservice $\Rightarrow$ Fetch DB References} sub-menu in the Alignment
 window. This menu allows you to query either the set of {\sl Standard
-Databases}, which includes EMBL, Uniprot, the PDB, or just a specific datasource from one of the submenus.
+Databases}, which includes EMBL, Ensembl, Uniprot, the PDB, or just a specific datasource from one of the submenus.
 When one of the entries from this menu is selected, Jalview will use the ID
 string from each sequence in the alignment or in the currently selected set to
 retrieve records from the external source. Any sequences that are retrieved are
@@ -2052,12 +2097,6 @@ the database did not exactly contain the sequence given in the alignment (the
 {\sl ``Sequence not 100\% match'' dialog box}).
 
 
-\subsubsection{The Fetch Uniprot IDs Dialog Box}
-\label{discoveruniprotids}
-If any sources are selected which refer to Uniprot coordinates as their reference system, 
-then you may be asked if you wish to retrieve Uniprot IDs for your sequence. Pressing OK instructs Jalview to verify the sequences against Uniprot records retrieved using the sequence's ID string. This operates in much the same way as the {\sl Web Service $\Rightarrow$ Fetch Database References } function described in Section \ref{fetchdbrefs}. 
-If a sequence is verified, then the start/end numbering will be adjusted to match the Uniprot record. 
-
 \subsubsection{Rate of Feature Retrieval}
 Feature retrieval can take some time if a large number of sources are selected
 and if the alignment contains a large number of sequences.  
@@ -2065,37 +2104,64 @@ As features are retrieved, they are immediately added to the current alignment v
 The retrieved features are shown on the sequence and can be customised as described previously.
 
 
-\subsection{Colouring Features by Score or Description
-Text}
+\subsection{Customising Feature Display}
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=5in]{images/features5.pdf}
+\caption{{\bf Customising sequence features.} Features can be recoloured, switched on or off and have the rendering order changed. }
+\label{custfeat}
+\end{center}
+\end{figure}
+
+Feature display can be toggled on or off by selecting the {\sl View
+$\Rightarrow$ Show Sequence Features} menu option. When multiple features are
+present it is usually necessary to customise the display. Jalview allows the
+display, colour, rendering order and transparency of features to be modified
+{\sl via} the {\sl View $\Rightarrow$ Feature Settings\ldots} menu option. This
+brings up a dialog window (Figure \ref{custfeat}) which allows the
+visibility of individual feature types to be selected, assigned colours to be changed (by
+clicking on the colour of each sequence feature type) and the rendering order
+modified by dragging feature types to a new position in the list. Dragging the
+slider alters the transparency of the feature rendering. Clicking in the {\sl Configuration} column
+ opens the {\sl Display Settings} dialog which allows more complex shading schemes 
+ and also the creation of filters, and right-clicking opens a context sensitive menu
+  that offers options for selecting and hiding columns or sorting the alignment according
+   the the feature's distribution or score attribute.
+These capabilities are described further in sections
+\ref{featureschemes} and \ref{featureordering}.
+
+
+\subsection{Changing how Features are coloured and displayed}
 \label{featureschemes}
 Sometimes, you may need to visualize the differences in information carried by
 sequence features of the same type. This is most often the case when features
-of a particular type are the result of a specific type of database query or calculation. Here, they may also carry information within their textual description, or most commonly for calculations, a score related to the property being investigated. Jalview can shade sequence
-features using a graduated colourscheme in order to highlight these variations.
-In order to apply a graduated scheme to a feature type, select the `Graduated
-colour' entry in the Sequence {\sl Feature Type}'s popup menu, which is opened by
-right-clicking the {\sl Feature Type} or {\sl Color} in the {\sl Sequence Feature Settings} dialog box. Two types
-of colouring styles are currently supported: the default is quantitative
-colouring, which shades each feature based on its score, with the highest
-scores receiving the `Max' colour, and the lowest scoring features coloured
-with the `Min' colour. Alternately, you can select the `Colour by label'
+of a particular type are the result of a specific type of database query or calculation.
+Here, they may also carry information within their textual description, or most commonly
+for calculations, a score related to the property being investigated. Features imported
+from genomic databases and Variant Call Format files may also have a number of additional
+attributes. Jalview allow filters and different types of colouring to be applied to allow variations in these attributes to be highlighted.
+In order to create a filter or modify the way a feature type is coloured, select the `Configuration' column for that {\sl Feature Type} in the {\sl Sequence Feature Settings} dialog box. 
+
+Instead of shading a feature with an assigned colour according to its type, you can select the `Colour by text'
 option to create feature colours according to the description text associated
 with each feature. This is useful for general feature types - such as
 Uniprot's `DOMAIN' feature - where the actual type of domain is given in the
-feature's description.
+feature's description. If other attributes are present you can choose one of them from the drop-down menu.
 
-Graduated feature colourschemes can also be used to exclude low or
+If Scores or numeric attributes are present, the {\sl Graduated Colour} section of the dialog allows a quantitative
+shading scheme to be defined, with the highest
+scores receiving the `Max' colour, and the lowest scoring features coloured
+with the `Min' colour. Alternately, 
+you can define a threshold to exclude low or
 high-scoring features from the alignment display. This is done by choosing your
 desired threshold type (either above or below), using the drop-down menu in the
 dialog box. Then, adjust the slider or enter a value in the text box to set the
 threshold for displaying this type of feature.
 
-The feature settings dialog box allows you to toggle between a graduated and
-simple feature colourscheme using the pop-up menu for the feature type. When a
-graduated scheme is applied, it will be indicated in the colour column for
-that feature type - with coloured blocks or text to indicate the colouring
-style and a greater than ($>$) or less than ($<$) symbol to indicate when a
-threshold has been defined.
+When a filters and complex colourschemes are applied, the configuration column will show coloured blocks or text to indicate the colouring
+style and any attribute filters. 
+
 
 \subsection{Using Features to Re-order the Alignment}
 \label{featureordering}
@@ -2159,53 +2225,6 @@ create the new alignment ordering.
 % colour styles are encoded. }
 % }
 
-\subsection{Creating Sequence Features}
-Sequence features can be created simply by selecting the area in a sequence (or sequences) to form the feature and selecting {\sl Selection $\Rightarrow$ Create Sequence Feature } from the right-click context menu (Figure \ref{features}). A dialog box allows the user to customise the feature with respect to name, group, and colour. The feature is then associated with the sequence. Moving the mouse over a residue associated with a feature brings up a tool tip listing all features associated with the residue.
-
-\begin{figure}[htbp]
-\begin{center}
-\includegraphics[width=2in]{images/feature1.pdf}
-\includegraphics[width=2.5in]{images/feature2.pdf}
-\includegraphics[width=1.5in]{images/feature3.pdf}
-\caption{{\bf Creating sequence features.} Features can readily be created from selections via the context menu and are then displayed on the sequence. }
-\label{features}
-\end{center}
-\end{figure}
-
-Creation of features from a selection spanning multiple sequences results in the creation of one feature per sequence. 
-Each feature remains associated with its own sequence.
-
-\subsection{Customising Feature Display}
-
-Feature display can be toggled on or off by selecting the {\sl View
-$\Rightarrow$ Show Sequence Features} menu option. When multiple features are
-present it is usually necessary to customise the display. Jalview allows the
-display, colour, rendering order and transparency of features to be modified
-{\sl via} the {\sl View $\Rightarrow$ Feature Settings\ldots} menu option. This
-brings up a dialog window (Figure \ref{custfeat}) which allows the
-visibility of individual feature types to be selected, colours changed (by
-clicking on the colour of each sequence feature type) and the rendering order
-modified by dragging feature types to a new position in the list. Dragging the
-slider alters the transparency of the feature rendering. The Feature
-Settings dialog also includes functions for more advanced feature shading
-schemes and buttons for sorting the alignment according to the distribution of
-features. These capabilities are described further in sections
-\ref{featureschemes} and \ref{featureordering}.
-
-\begin{figure}[htbp]
-\begin{center}
-\includegraphics[width=4in]{images/features4.pdf}
-\caption{{\bf Multiple sequence features.} An alignment with JPred secondary structure prediction annotation below it, and many sequence features overlaid onto the aligned sequences. The tooltip lists the features annotating the residue below the mouse-pointer.}
-\end{center}
-\end{figure}
-
-\begin{figure}[htbp]
-\begin{center}
-\includegraphics[width=4in]{images/features5.pdf}
-\caption{{\bf Customising sequence features.} Features can be recoloured, switched on or off and have the rendering order changed. }
-\label{custfeat}
-\end{center}
-\end{figure}
 
 \subsection{Sequence Feature File Formats}
 
@@ -2391,7 +2410,7 @@ usually able to modify the following types of parameters:
 \begin{figure}[htbc]
 \center{
 \includegraphics[width=3in]{images/jvaliwsparamsbox.pdf}
-\caption{{\bf Jalview's JABA alignment service parameter editing dialog box}.}
+\caption{{\bf An alignment service's parameter editing dialog box}.}
 \label{jwsparamsdialog} }
 \end{figure}
 
@@ -2555,18 +2574,16 @@ the matrix formed from the sum of pairwise substitution scores at each aligned
 position between each pair of sequences. The basic method is described in the
 1995 paper by {\sl G. Casari, C. Sander} and {\sl A. Valencia} \footnote{{\sl
 Nature Structural Biology} (1995) {\bf 2}, 171-8.
-PMID: 7749921} and implemented at the SeqSpace server at the EBI.
-
-Jalview provides two different options for the PCA calculation: SeqSpace and
-Jalview mode. In SeqSpace mode, PCAs are computed using the identity matrix, and
-gaps are treated as 'the unknown residue' (this actually differs from the
-original SeqSpace paper, and will be adjusted in a future version of Jalview).
-In Jalview mode, PCAs are computed using the chosen score matrix - which for
-protein sequences, defaults to BLOSUM 62, and for nucleotides, is the
-DNA identity matrix that also treats Us and Ts as identical, to support analysis
-of both RNA and DNA alignments. The {\sl Change Parameters} allows the
-calculation method and score models to be changed.\footnote{See
-\url{http://www.jalview.org/help/html/calculations/pca.html}.}
+PMID: 7749921} and implemented at the SeqSpace server at the EBI.\footnote{See \url{http://www.jalview.org/help/html/calculations/pca.html}.}
+% 
+% Jalview provides two different options for the PCA calculation: SeqSpace and
+% Jalview mode. In SeqSpace mode, PCAs are computed using the identity matrix, and
+% gaps are treated as 'the unknown residue' (this actually differs from the
+% original SeqSpace paper, and will be adjusted in a future version of Jalview).
+% In Jalview mode, PCAs are computed using the chosen score matrix - which for
+% protein sequences, defaults to BLOSUM 62, and for nucleotides, is the
+% DNA identity matrix that also treats Us and Ts as identical, to support analysis
+% of both RNA and DNA alignments.
 
 \subsubsection{The PCA Viewer}
 
@@ -2631,6 +2648,7 @@ as {\bf R} or {\bf gnuplot} in order to graph the data.
 
 \section{Trees}
 \label{trees}
+
 Jalview can calculate and display trees, providing interactive tree-based
 grouping of sequences though a tree viewer. All trees are calculated {\sl via}
 the {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ \ldots} submenu.
@@ -2650,6 +2668,41 @@ option. Leaf names on imported trees will be matched to the associated alignment
 - unmatched leaves will still be displayed, and can be highlighted using the
 {\sl View $\Rightarrow$ Mark Unlinked Leaves} menu option.
 
+
+
+\begin{figure}
+\begin{center}
+\includegraphics[width=2.5in]{images/trees1.pdf}
+\includegraphics[width=2.5in]{images/trees2.pdf}
+\includegraphics[width=1.25in]{images/trees4.pdf}
+\caption{{\bf Calculating Trees} Jalview provides a range of options 
+for calculating trees.
+Jalview can also load precalculated trees in Newick format (right).}
+\label{trees1}
+\end{center}
+\end{figure}
+
+\begin{figure}
+\begin{center}
+\includegraphics[width=5in]{images/trees3.pdf}
+\caption{{\bf Interactive Trees} The tree level cutoff can be used to designate
+groups in Jalview.}
+\label{trees2}
+\end{center}
+\end{figure}
+
+Clicking on the tree brings up a cursor across the height of the tree. The
+sequences are automatically partitioned and coloured (Figure \ref{trees2}). To
+group them together, select the {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$
+By Tree Order $\Rightarrow$ \ldots} alignment window menu option and choose the
+correct tree. The sequences will then be sorted according to the leaf order
+currently shown in the tree view. The coloured background to the sequence IDs
+can be removed with {\sl Select $\Rightarrow$ Undefine Groups} from the
+alignment window menu. Note that tree partitioning will also remove any groups
+and colourschemes on a view, so create a new view ([CTRL-T]) if you wish to
+preserve these.
+
+
 \exercise{Trees}
 {\label{treeex}
 \begin{list}{$\circ$}{Ensure that you have at least 1G memory available in Jalview.}
@@ -2703,39 +2756,6 @@ alignment for the calculation of trees.
 
 }
 
-\begin{figure}
-\begin{center}
-\includegraphics[width=2.5in]{images/trees1.pdf}
-\includegraphics[width=2.5in]{images/trees2.pdf}
-\includegraphics[width=1.25in]{images/trees4.pdf}
-\caption{{\bf Calculating Trees} Jalview provides a range of options 
-for calculating trees.
-Jalview can also load precalculated trees in Newick format (right).}
-\label{trees1}
-\end{center}
-\end{figure}
-
-
-Clicking on the tree brings up a cursor across the height of the tree. The
-sequences are automatically partitioned and coloured (Figure \ref{trees2}). To
-group them together, select the {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$
-By Tree Order $\Rightarrow$ \ldots} alignment window menu option and choose the
-correct tree. The sequences will then be sorted according to the leaf order
-currently shown in the tree view. The coloured background to the sequence IDs
-can be removed with {\sl Select $\Rightarrow$ Undefine Groups} from the
-alignment window menu. Note that tree partitioning will also remove any groups
-and colourschemes on a view, so create a new view ([CTRL-T]) if you wish to
-preserve these.
-
-\begin{figure}
-\begin{center}
-\includegraphics[width=5in]{images/trees3.pdf}
-\caption{{\bf Interactive Trees} The tree level cutoff can be used to designate
-groups in Jalview.}
-\label{trees2}
-\end{center}
-\end{figure}
-
 %\subsubsection{Multiple Views and Input Data recovery from PCA and Tree Viewers}
 % move to ch. 3 ?
 %Both PCA and Tree viewers are linked analysis windows. This means that their selection and display are linked to a particular alignment, and control and reflect the selection state for a particular view.
@@ -2764,7 +2784,7 @@ conservation between and within groups can be visually compared in order to
 better understand the pattern of similarity revealed by the tree and the
 variation within the clades partitioned by the grouping. The conservation based
 colourschemes and the group associated conservation and consensus annotation
-(enabled using the alignment window's {\sl View $\Rightarrow$ Autocalculated
+(enabled using the alignment window's {\sl Annotations $\Rightarrow$ Autocalculated
 Annotation $\Rightarrow$ Group Conservation} and {\sl Group Consensus} options)
 can help when working with larger alignments.
 
@@ -2823,7 +2843,12 @@ it is used in the next set of exercises. }
 
 \subsection{Redundancy Removal}
 
-The redundancy removal dialog box is opened using the {\sl Edit $\Rightarrow$ Remove Redundancy\ldots} option in the alignment menu. As its menu option placement suggests, this is actually an alignment editing function, but it is convenient to describe it here. The redundancy removal dialog box presents a percentage identity slider which sets the redundancy threshold. Aligned sequences which exhibit a percentage identity greater than the current threshold are highlighted in black. The [Remove] button can then be used to delete these sequences from the alignment as an edit operation\footnote{Which can usually be undone. A future version of Jalview may allow redundant sequences to be hidden, or represented by a chosen sequence, rather than deleted.}.
+The redundancy removal dialog box is opened using the {\sl Edit $\Rightarrow$ Remove Redundancy\ldots} option 
+in the alignment menu. As its menu option placement suggests, this is actually an alignment editing function, 
+but it is convenient to describe it here. The redundancy removal dialog box presents a percentage identity 
+slider which sets the redundancy threshold. Aligned sequences which exhibit a percentage identity greater 
+than the current threshold are highlighted in black. The [Remove] button can then be used to delete these 
+sequences from the alignment as an edit operation.
 \begin{figure}
 \begin{center}
 \includegraphics[width=5.5in]{images/redundancy.pdf}
@@ -2914,8 +2939,9 @@ Autocalculated Annotation } submenu in the alignment window.}
 logos will make it easier to see the different residue populations within each
 group. Activate the logo by right clicking on the Consensus annotation row to
 open the context menu and select the {\sl Show Logo} option.} 
-\exstep{In the column alignment ruler, select a column exhibiting about 50\%
-conservation that lies within the central conserved region of the alignment.
+\exstep{In the column alignment ruler, select a column exhibiting with about 50\%
+  of its residues conserved ({\em ie. about 50\% in the consensus histogram})
+  that lies within the central conserved region of the alignment.
 (Column 74 is used in \href{https://youtu.be/m-PjynicXRg}{the Tree video}).} 
 \exstep{Subdivide the alignment
 according to this selection using {\sl Select $\Rightarrow$ Make groups for selection}.}
@@ -3190,7 +3216,7 @@ when associated alignment views are modified.
 \exercise{Viewing Structures with the integrated Jmol Viewer}{
 \label{viewingstructex}
 \exstep{Load the alignment at
-\textsf{http://www.jalview.org/examples/exampleFile.jar}.}
+\textsf{http://www.jalview.org/examples/exampleFile.jvp}.}
 \exstep{Right-click on the
 sequence ID label of {\sl FER1\_SPIOL} to open
 the ID popup menu and select {\sl 3D Structure}. After a short pause, a
@@ -3248,14 +3274,13 @@ Verify that the Jmol display is as it was when you just saved the file.}
 \exstep{Continue with the Jalview project created in exercise
 \ref{viewingstructex}}
 
-\exstep{Open the 3D Structure chooser dialog from the popup menu for FER1\_SPIOL
+\exstep{Open the 3D Structure chooser dialog from the popup menu for FER1\_MAIZE
 by right-clicking its ID (CMD-click on Macs), and selecting {\sl $\Rightarrow$
 3D Structure Data \ldots } }
 
-\exstep{Pick 1A70 from the Structure Chooser dialog, and click the {\bf View}
-button. Jalview will give you the option of aligning the
-structure to the one already open. To superimpose the structure associated with
-FER1\_MAIZE with the one associated with FER1\_SPIOL, press {\sl Yes}.
+\exstep{Pick 1gaq from the Structure Chooser dialog, and make sure the {\sl Superpose} option is checked before clicking the {\bf Add}
+button to superimpose the structure associated with
+FER1\_MAIZE with the one associated with FER1\_SPIOL.
 
 {\sl The Jmol view should update to show both structures, and one will be
 moved on to the other. If this doesn't happen, use the Align function in the
@@ -3436,12 +3461,6 @@ Interfaces}{\label{dnmtcomplexex}
 \textsf{\url{http://www.jalview.org/tutorial/DNMT1\_MOUSE.pdb}} to your desktop. 
 This is the biological unit for PDB ID 3pt6, as identified by the PDBe's PISA
 server.}
-\exstep{Launch the Jalview desktop and ensure you have at least 1G of
-free memory available.
-{\sl See section \ref{memorylimits} for how to do this or click the following
-link:
-
-\url{http://www.jalview.org/services/launchApp?jvm-max-heap=2G} }}
 
 \exstep{Retrieve the following PFAM alignments from the {\bf PFAM (full)} source
 :
@@ -3459,7 +3478,7 @@ each one, open the Structure Chooser dialog box by right clicking the mouse on
 sequence name to open the context menu and select {\sl
 $\Rightarrow$ 3D Structure Data}.
 Select `Cached Structures' from
-the drop-down menu in the Structure Chooser dialog box, select the
+the drop-down menu in the Structure Chooser dialog box and select the
 DNMT1\_MOUSE.pdb structure, and click {\bf View}.
 
 {\em Part of the newly opened structure will be coloured the same way as
@@ -3470,10 +3489,9 @@ the associated DNMT1\_MOUSE sequence is in the alignment view.}
 sequences in the alignment.}
 }
 \exstep{Repeat the previous two steps for each of the other
-alignments. In each case, after selecting the DNMT1\_MOUSE.pdb structure and
-hitting the `View' button on the Structure Chooser dialog. Jalview will ask if
-you wish to create a new Jmol view, respond {\bf `Yes'} each time. This will
-ensure each sequence fragment is associated with the {\bf same} Jmol view. }
+  alignments. For those, after selecting the DNMT1\_MOUSE.pdb structure you
+  should select `Add' to ensure each domain alignment is associated
+  with the {\bf same} Jmol view. }
 
 \exstep{Pick a different
 colourscheme for each alignment, and use the {\sl Colour by ..} submenu to