TODOs from the Jalview 2.11.1.1 course
[jalview-manual.git] / TheJalviewTutorial.tex
index 9611495..a51692f 100644 (file)
@@ -1,10 +1,13 @@
 %\documentclass[a4paper,11pt]{report}
 \documentclass[a4paper,11pt]{book}
+\usepackage[format=hang,margin=10pt]{caption}
 \usepackage{footnote}
 \usepackage{graphicx}
-\usepackage{amssymb}
+\usepackage{fouriernc}
+%\usepackage{amssymb}
 \usepackage{epstopdf}
 \usepackage{hyperref}
+\usepackage{subfigure}
 \DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}
 \voffset = -0.5 in
 \hoffset = -0.85 in
 %\headheight = 0.0 in \headsep = 0.0 in
 \parskip = 0.2in \parindent = 0.0in
 
+
 \newtheorem{theorem}{Theorem}
 \newtheorem{corollary}[theorem]{Corollary}
 \newtheorem{definition}{Definition}
 
 
-\title{Jalview 2.4: A manual and introductory tutorial }
-\author{David Martin, James Procter, Andrew Waterhouse and Geoff Barton}
-\date{Manual version 1.1 1st September 2008}
+\title{Jalview 2.10.3: A manual and introductory tutorial }
+\author{David Martin, James Procter, Andrew Waterhouse, Saif Shehata, Nancy Giang,Suzanne Duce and Geoff Barton}
+\date{Manual version 1.2.3 6th May 2011}
 
 \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}}\cleardoublepage}
 
@@ -48,6 +52,7 @@
 %  \mbox{\addcontentsline{toc}{subsection}{ Exercise \theecount : #1 } }
 Exercise \theecount  :  #1  } 
 \par #2 }} \end{center}
+\pagebreak[0]
 }
 \newcommand{\exstep}[1]{ \stepcounter{exstep} {\sl \theexstep.}  \begin{minipage}[t]{5.5in} #1 \end{minipage} \par \vspace *{1mm} }
 %%% Remove the % on the next 2 lines to hide tutorials.
@@ -60,98 +65,120 @@ Exercise \theecount  :  #1  }
 \pagenumbering{}
 
 %\maketitle
-% we make our own title because JBP is not clever enough to work out how to do this automatically
+% we make our own title because JBP is not clever enough to work out how
+% to
+% do
+% this automatically
 
 \begin{center}
 
 {\Huge
  
-Jalview 2.4
-}
+Jalview 2.11}
 \vspace{0.5in}
 {\huge 
 
-A manual and introductory tutorial }
+Manual and  Introductory Tutorial }
 
-\vspace{2.5in}
+\vspace{2.2in}
 
 {\large
 
-David Martin, James Procter, Andrew Waterhouse and Geoff Barton
+David Martin, James Procter, Ben Soares 
 
-}
+Andrew Waterhouse, Saif Shehata, Nancy Giang 
 
-\vspace{1.5in}
+Mungo Carstairs, Charles Ofoegbu, Kira Mour\~{a}o
 
-College of Life Sciences, University of Dundee
+Suzanne Duce and Geoff Barton 
 
-Dundee, Scotland DD1 5EH, UK
+}
+
+\vspace{0.9in}
 
+School of Life Sciences, University of Dundee
 
+Dundee, Scotland DD1 5EH, UK
 \vspace{2in}
 
-Manual version 1.1
+Manual Version 1.9.3
+% post CLS lifesci course on 15th January
+% draft. Remaining items are AACon, RNA visualization/editing and Protein disorder analysis exercises.
+
 
-EBI/Enfin Function Prediction Course. 1st September 2008
+10th May 2019
 
 
 \end{center}
 
+%\newpage
+
 \clearemptydoublepage
 
-% ($Revision$) 1st September 2008.}
+% ($Revision: 1.55 $) 11th October 2010.}
+% TODO revise for 2.6
 
 \pagenumbering{roman}
 \setcounter{page}{1}
 \tableofcontents 
-\clearemptydoublepage
+%\clearemptydoublepage
 % \listoffigures 
 % \newpage
 % \listoftables 
-% \newpage
+\newpage
 \pagenumbering{arabic}
 \setcounter{page}{1}
-
 \chapter{Basics}
 \label{jalviewbasics}
 \section{Introduction}
 \subsection{Jalview}
-Jalview is a sequence multiple alignment viewer, editor and analysis tool.
-Jalview is designed to be platform independent (running on Mac, MS Windows, Linux
-and any other platform that supports Java), capable of editing and analysing
-large alignments (thousands of sequences) with minimal degradation in
-performance, and able to show multiple integrated views of the alignment and
-other data. Jalview can read and write many common sequence formats including
+Jalview is a multiple sequence alignment viewer, editor and analysis tool.
+It is designed to be platform independent (running on Mac, MS Windows, Linux
+and any other platforms that support Java). Jalview is capable of editing and
+analysing large alignments (thousands of sequences) with minimal degradation in
+performance. It is able to show multiple integrated views of the alignment
+and other data. Jalview can read and write many common sequence formats including
 FASTA, Clustal, MSF(GCG) and PIR.
 
 
-There are two types of Jalview program. The {\bf Jalview Desktop} is a stand
-alone application that provides powerful editing, visualization, annotation and
-analysis capabilities. The {\bf JalviewLite} applet has the same core
+There are two types of Jalview program. The {\bf Jalview Desktop} is a standalone 
+application that provides powerful editing, visualization, annotation and
+analysis capabilities. The {\bf JalviewJS} that has the same core
 visualization, editing and analysis capabilities as the desktop, without the
-desktop's webservice and figure generation capabilities. It is designed to be
-embedded in a web page\footnote{A demonstration version of Jalview (Jalview Micro
-Edition) also runs on a mobile phone but the functionality is limited to sequence
-colouring.}, to allow customisable display of alignments for web sites such as
-{\bf pfam}\footnote{\url{http://pfam.sanger.ac.uk}}.
+desktop's webservice. It is designed to be
+opened in a web browser,\footnote{A demonstration version of Jalview (Jalview Micro
+Edition) also runs on a mobile phone but the functionality is limited.} and includes a javascript API.
 
 
-Jalview 2.4 was released in September 2008. The Jalview Desktop in this version
-provides access to sequence, alignment and protein structure databases, and
-alignment and analysis web services, and includes the Jmol\footnote{ Provided
-under the LGPL licence at \url{http://www.jmol.org}} protein structure viewer. It is
-also a Distributed Annotation System (DAS) client\footnote{with thanks to Andreas
-Prlic} which facilitates the retrieval and display of third party sequence
-annotation in association with sequences and any associated structure. 
+The Jalview Desktop provides access to protein and nucleic acid sequence, alignment and structure
+databases, and includes the Jmol\footnote{ Provided under the LGPL licence at
+\url{http://www.jmol.org}} and Chimera viewer for molecular structures, and the
+VARNA\footnote{Provided under GPL licence at \url{http://varna.lri.fr}} program for the visualization of RNA secondary structure. It also
+provides a graphical user interface for the multiple sequence alignment, conservation analysis 
+and protein disorder prediction methods provided as {\bf Ja}va {\bf B}ioinformatics
+{\bf A}nalysis {\bf W}eb {\bf S}ervices (JABAWS). JABAWS\footnote{released under GPL at \url{http://www.compbio.dundee.ac.uk/jabaws}} is a system for 
+running bioinformatics programs that you can download and run on your own machine or cluster, or install on compute clouds.
 
 \subsection{Jalview's Capabilities}
 % TODO add references to appropriate sections for each capability described here.
-Figure \ref{jvcapabilities} gives an overview of the main features of the Jalview desktop application. Its primary function is the editing and visualization of sequence alignments, and their interactive analysis. Tree building, principal components analysis, physico-chemical property conservation and sequence consensus analyses are built in to the program. Web services enable Jalview to access remote alignment and secondary structure prediction programs, as well as to retrieve protein and nucleic acid sequences, alignments, protein structures and sequence annotation. Sequences, alignments, trees, structures, features and alignment annotation may also be exchanged with the local filesystem. Multiple visualizations of an alignment may be worked on simultaneously, and the user interface provides a comprehensive set of controls for colouring and layout. Alignment views are dynamically linked with Jmol structure displays, a tree viewer and spatial cluster display, facilitating interactive exploration of the alignment's structure. The application provides its own Jalview project file format in order to store the current state of an alignment and analysis windows. Jalview also provides WYSIWIG\footnote{WYSIWIG: What You See Is What You Get.} style figure generation capabilities for the preparation of alignments for publication.
+Figure \ref{jvcapabilities} gives an overview of the main features of the
+Jalview desktop application. Its primary function is the editing and
+visualization of sequence alignments, and their interactive analysis. Tree
+building, principal components analysis, physico-chemical property conservation
+and sequence consensus analyses are built into the program. Web services enable
+Jalview to access online alignment and secondary structure prediction programs,
+as well as to retrieve protein and nucleic acid sequences, alignments, protein structures and sequence annotation. 
+Sequences, alignments, trees, structures, features and alignment annotation may also be exchanged with the local filesystem. 
+Multiple visualizations of an alignment may be worked on simultaneously, and the user interface provides a comprehensive set of controls for colouring and layout. 
+Alignment views are dynamically linked with Jmol and UCSF Chimera\footnote{UCSF Chimera needs to be installed separately. It is available free for academic use from \url{https://www.cgl.ucsf.edu/chimera/download.html}.} structure displays,
+a tree viewer and spatial cluster display, facilitating interactive exploration of the alignment's structure. The application provides its own Jalview project file format in order 
+to store the current state of an alignment and analysis windows. Jalview also provides WYSIWIG\footnote{WYSIWIG: What You See Is What You Get.} style
+ figure generation capabilities for the preparation of alignments for publication.
 \begin{figure}[htbp]
 \begin{center}
-\label{jvcapabilities}
 \includegraphics[width=5.8in]{images/jvcapabilities.pdf}
 \caption{{\bf Capabilities of the Jalview Desktop.} The Jalview Desktop Application provides a stable environment for the creation, editing and analysis of alignments and the generation of figures.}
+\label{jvcapabilities}
 \end{center}
 \end{figure}
 
@@ -160,34 +187,50 @@ Jalview was initially developed in 1996 by Michele Clamp, James Cuff, Steve
 Searle and Geoff Barton at the University of Oxford and then the European
 Bioinformatics Institute. Development of Jalview 2 was made possible with
 eScience funding from the BBSRC\footnote{Biotechnology and Biological Sciences
-Research Council grant  {\sl "VAMSAS: Visualization and Analysis of Molecules,
+Research Council grant  {\sl ``VAMSAS: Visualization and Analysis of Molecules,
 Sequence Alignments and Structures"}, a joint project to enable interoperability
 between Jalview, TOPALi and AstexViewer.} in 2004, enabling Andrew Waterhouse and
 Jim Procter to re-engineer the original program to introduce contemporary developments
-in bioinformatics and take advantage of the latest web and Java technology. The
-2.4 version released in September 2008 introduced experimental support for a data
-exchange framework developed as part of this project, to enable Jalview to be
-used in conjunction with other programs for the analysis of sequences, alignments
-and structures.
+in bioinformatics and take advantage of the latest web and Java technology.
+Jalview's development has been supported from 2009
+onwards by BBSRC funding, and since 2014 by a
+Wellcome Trust Biomedical Resource grant\footnote{Wellcome grant number 101651/Z/13/Z}. In 2010, 2011, and 2012, Jalview benefitted from the
+\href{http://code.google.com/soc/}{Google Summer of Code}, when Lauren Lui and Jan Engelhardt introduced new features for handling RNA alignments and secondary structure annotation, in collaboration with Yann Ponty.\footnote{\url{http://www.lix.polytechnique.fr/~ponty/}}
+
+%TODO describe future plans in history ? not a good idea.
 % Jalview continues to be one of the worlds most popular\footnote{and in the authors opinion, the best.} sequence alignment and analysis tools.
 
 \subsubsection{Citing Jalview}
-If you use Jalview in your work you should cite {\sl "The Jalview Java alignment
-editor"} Michele Clamp, James Cuff, Stephen M. Searle and Geoffrey J. Barton
-(2004) {\sl Bioinformatics} {\bf 20} 426-427. 
+If you use Jalview in your work you should cite:\newline
+{\sl "Jalview Version 2 - a multiple sequence alignment editor and analysis
+workbench"}\newline Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M. and Barton, G. J. (2009) \newline {\sl Bioinformatics}  doi: 10.1093/bioinformatics/btp033
 
-A further publication that highlights the extensive developments since 2004 is in
-preparation.
+This paper supersedes the original Jalview publication:\newline {\sl "The
+Jalview Java alignment editor"} \newline Michele Clamp, James Cuff, Stephen M. Searle and Geoffrey J. Barton (2004) \newline {\sl Bioinformatics} {\bf 20} 426-427. 
 
-  \r\subsection{About this tutorial }
+  
+\subsection{About this Tutorial }
 
 This tutorial is written in a manual format with short exercises where
-appropriate, typically at the end of each section. This chapter concerns the
-basic operation of Jalview and should be sufficient for those who just want to
-load Jalview (Section \ref{startingjv}), open an alignment (Section \ref{loadingseqs}), perform basic editing and colouring (Section \ref{selectingandediting} and Section \ref{colours}), and produce publication
-and presentation quality graphical output (Section \ref{layoutandoutput}).
-
-Chapter \ref{analysisannotation} covers the additional visualization and analysis techniques that Jalview provides. This includes working with the embedded PDB structure viewer, building and viewing trees and PCA plots, and using trees for sequence conservation analysis. The use of the Jalview webservices for alignment and secondary structure prediction is described in Section \ref{jvwebservices}. Following this, Section \ref{featannot} details the creation and visualization of sequence and alignment annotation, and the retrieval of sequences and annotation from databases and DAS Servers. Finally, Section \ref{workingwithnuc} discusses specific features of use when working with nucleic acid sequences and protein coding regions. 
+appropriate. The first few sections concerns the
+basic operation of Jalview and should be sufficient for those who want to
+launch Jalview (Section \ref{startingjv}), open an alignment (Section
+\ref{loadingseqs}), perform basic editing (Section
+\ref{selectingandediting}), colouring (Section \ref{colours}), and produce
+publication and presentation quality graphical output (Section \ref{layoutandoutput}).
+
+The remaining sections of the manual cover the visualization and
+analysis techniques available in Jalview. These include working
+with the embedded Jmol molecular structure viewer (or UCSF Chimera), building
+and viewing trees and Principal Components Analysis (PCA) plots, and using
+trees for sequence conservation analysis. Section \ref{featannot} details the creation and visualization of sequence,
+features and alignment annotation. The alignment and secondary structure prediction services are described
+in detail in Sections \ref{msaservices} and \ref{protsspredservices}
+respectively. Section \ref{workingwithnuc} discusses
+specific features of use when working with nucleic acid sequences, such as translation and linking to protein coding regions, and 
+the display and analysis of RNA secondary structure.  An overview of
+the Jalview Desktop's webservices is given in Section \ref{jvwebservices}.
 
 %^Chapter \ref{jalviewadvanced} The third chapter covers the detail^ of Jalview and is aimed at the user who is
 %already familiar with Jalview operation but wants to get more out of their
@@ -195,147 +238,357 @@ Chapter \ref{analysisannotation} covers the additional visualization and analysi
 
 \subsubsection{Typographic Conventions}
 
-Keystrokes using the special non-symbol keys are represented in the tutorial by enclosing the pressed keys with square brackets ({\em e.g.} [RETURN] or [CTRL]). Keystroke combinations are combined with a `-' symbol ({\em e.g.} [CTRL]-C means press [CTRL] and the `C' key). Menu options are given as a path from the menu that contains them - for example {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From URL} means to select the `From URL' option from the `Input Alignment' submenu of a window's `File' dropdown menu.
-\r\section{Obtaining and starting The Jalview Desktop Application}
+Keystrokes using the special non-symbol keys are represented in the tutorial by
+enclosing the pressed keys with square brackets ({\em e.g.} [RETURN] or [CTRL]).
+
+Keystroke combinations are denoted with a `-' symbol ({\em
+e.g.} [CTRL]-C means press [CTRL] and the `C' key simultaneously).
+
+Menu options are given as a path from the menu
+that contains them. For example {\sl File $\Rightarrow$ Input Alignment
+$\Rightarrow$ From URL} means to select the `From URL' option from the `Input
+Alignment' submenu of a window's `File' dropdown menu.
+
+\section{Launching the Jalview Desktop Application}
 \label{startingjv}
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=4.5in]{images/download.pdf}
-\caption{{\bf Download page on the Jalview web site}}
+\caption{\bf Download page on the Jalview web site at www.jalview.org.}
 \label{download}
 \end{center}
 \end{figure}
 
-This tutorial is based on the application version of Jalview, the Jalview
-Desktop. Much of the information will also be useful for users of the JalviewLite
-applet, which has the same core editing, analysis and visualization capabilities (see the
-\href{http://www.jalview.org/examples/applets.html}{JalviewLite Applet Examples}
-page for examples). The Jalview Desktop, however, is much more powerful, and
+This tutorial is based on the Jalview
+Desktop application. Much of the information will also be useful for users of
+the JalviewJS, which has the same core editing, analysis and visualization capabilities. The Jalview Desktop, however, is much more powerful, and
 includes additional support for interaction with external web services, and
 production of publication quality graphics.
 
 The Jalview Desktop can be run in two ways; as an application launched from the
-web via Java Web Start, or as an application loaded onto your hard drive. Both
-versions are obtained from the Download page at the the Jalview web site
-(http://www.jalview.org/).
-
-Jalview can be started directly with webstart by navigating to the Download page
-(via the menu on the left hand side), and clicking the `Start with Java Webstart'
-button. (Figure \ref{download}). This will always launch the latest stable
-release of Jalview.\par
-
-The application will start automatically though you may be prompted to accept a
-security certificate signed by the Barton Group. You can always trust us, so click trust
-or accept as appropriate. The splash screen (Figure \ref{splash}) gives
-information about the latest version and the paper to cite in your publications.
-This information is also available on the Jalview web site and from the {\sl Help
-$\Rightarrow$ About} menu option.
+web {\sl via} Java webstart, or as an application loaded onto your hard drive. 
+The webstart version is launched from the `Launch Jalview Desktop
+button' at the top right hand side of pages of the website 
+\href{http://www.jalview.org}{(www.jalview.org)}.
+To download the locally installable version, follow the links on the download
+page
+\href{http://www.jalview.org/download}{(www.jalview.org/download) }
+ (Figure \ref{download}).
+These links will launch the latest stable release of Jalview.\par
+
+%% this paragraph needs to be rewritten for the new signed certificate from Certum.
+
+When the application is launched with webstart, dialogs may appear before
+the application starts. If your browser is not set up to handle webstart, then
+clicking the launch link may download a file that needs to be opened
+manually, or prompt you to select the program to handle the webstart
+file. If that is the case, you will need to locate the {\bf javaws} program
+on your system\footnote{The file that is downloaded will have a type of {\bf
+application/x-java-jnlp-file} or {\bf .jnlp}. The {\bf javaws} program that can run
+this file is usually found in the {\bf bin} directory of your Java
+installation}. Once java webstart has been launched, you may also be prompted to
+accept a security certificate signed by the Barton Group.\footnote{On some
+systems, the certificate may be signed by 'UNKNOWN'. In this case, clicking
+through the dialogs to look at the detailed information about the certificate
+should reveal it to be a Barton group certificate.} You can always trust us, so
+click trust or accept as appropriate. The splash screen (Figure \ref{splash})
+gives information about the version and build date that you are running,
+information about later versions (if available), and the paper to cite in your
+publications. This information is also available on the Jalview web site at 
+\url{http://www.jalview.org}.
 
 %[fig 2] 
 \begin{figure}[htbp]
 
 \begin{center}
 \includegraphics[width=4.5in]{images/splash.pdf}
-\caption{{\bf Jalview splash screen}}
+\caption{{\bf Jalview splash screen.}}
 \label{splash}
 \end{center}
 \end{figure}
-\rWhen Jalview starts it will automatically load an example alignment from the
-Jalview site. This behaviour can be changed in the Jalview Desktop preferences dialog opened from the Desktop's {\sl Tools $\Rightarrow$ Preferences..} menu. This alignment looks like Figure \ref{startpage}.
+
+When Jalview starts it will automatically load an example alignment from the
+Jalview site. This behaviour can be switched off in the Jalview Desktop
+preferences dialog  by unchecking the open file option.
+This alignment will look like the one in Figure \ref{startpage} (taken
+from Jalview version 2.10.1).
 
 %[figure 3 ]
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=4in]{images/start.pdf}
-\caption{{\bf Default startup for Jalview}}
+\caption{{\bf Default startup for Jalview.}}
 \label{startpage}
 \end{center}
 \end{figure}
 
 
-\exercise{Starting Jalview}{
+\subsubsection{Jalview News RSS Feed}
+
+Announcements are made available to users of the
+Jalview Desktop {\sl via} the Jalview Newsreader. This window will open
+automatically when new news is available, and can also be accessed {\sl via} the
+Desktop's {\sl Tools $\Rightarrow$ Show Jalview News} menu entry. 
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[height=3in]{images/jvrssnews.pdf}
+\caption{{\bf The Jalview News Reader.} The newsreader opens automatically
+when new articles are available from the Jalview Desktop's news channel.}
+\label{jalviewrssnews}
+\end{center}
+\end{figure}
+
+
+\exercise{Launching Jalview from the Jalview Website}{
 \label{start}
-\exstep{Point your web browser at the \href{http://www.jalview.org}{Jalview web site} and start Jalview by clicking on the `Start with Java WebStart' button.} }
+\exstep{Open the Jalview web site
+\href{http://www.jalview.org}{(www.jalview.org)}
+in your web browser. Launch Jalview by clicking on the
+pink `Launch Jalview' Desktop button in the top right hand corner. This
+will download and open a jalview.jnlp webstart file.}
+\exstep {Dialog boxes
+will open and ask if you want to open the jalview.jnlp file as the file is an application downloaded from the
+Internet, click {\sl Open}. (Note you may be asked to update Java, if you agree
+then it will automatically update the Java software). As Jalview opens, four demo
+Jalview windows automatically load.}
+\exstep {If
+you are having trouble, it may help changing the browser you are using, as the browsers and
+its version may affect this process.}
+\exstep{To disable opening of the demonstration project during the launch, go
+to the {\sl Tools $\Rightarrow$
+Preferences...} menu on the desktop. A `Preference'
+dialog box opens, untick the box adjacent to the `Open file' entry in the
+`Visual' preferences tab.
+Click {\sl OK} to save the preferences.}
+\exstep{Launch another Jalview workbench from the web site by clicking on the
+pink Launch button.
+The example alignment should not be loaded as Jalview starts up.}
+\exstep{To reload the original demo file select the
+{\em File$\Rightarrow$ From URL} entry in the Desktop menu. Click on
+the URL history button (a downward arrow on the right hand side of the dialog
+box) to view the files, select exampleFile\_2\_7.jar
+(\url{http://www.jalview.org/examples/exampleFile_2_7.jar}) 
+then click {\sl OK}.}
+\begin{list}{$\circ$}{\newline
+  \newline {\bf
+  Notes}}
+  
+\item {To make Jalview display a different alignment when it is launched, then go
+to the {\sl Tools $\Rightarrow$
+Preferences...} menu on the desktop. Then tick the `Open file' entry of `Visual'
+preferences tab, type in the URL of the sequence you want to load.}
+\item {You may want to move the jalview.jnlp file from your {\bf downloads} to another folder.}
+\item {Opening Jalview via the jnlp file will also allow Jalview to be launched offline.}
+\end{list}
+
+{\bf See the video at:
+\url{http://www.jalview.org/Help/Getting-Started}.}
+ }
 
 \subsection{Getting Help}
 \label{gettinghelp}
-\subsubsection{Built in documentation}
-Jalview has comprehensive on-line help documentation. Select  {\sl Help $\Rightarrow$ Documentation} from the main window menu and a new window will open (Figure \ref{help}). The appropriate topic can then be selected from the navigation panel on the left hand side. To search for a specific topic, click the `search' tab and enter keywords in the box which appears.
+\subsubsection{Built in Documentation}
+Jalview has comprehensive on-line help documentation. Select  {\sl Help
+$\Rightarrow$ Documentation} from the main desktop window menu and a new window
+will open (Figure \ref{help}). The appropriate topic can then be selected from the
+navigation panel on the left hand side. To search for a specific topic, click
+the `search' tab and enter keywords in the box which appears.
 
 
 \begin{figure}[htbp]
 \begin{center}
 \parbox[c]{2in}{\centerline{\includegraphics[width=2.75in]{images/help1.pdf}}}
 \parbox[c]{4in}{\includegraphics[width=4in]{images/help2.pdf}}
-\caption{{\bf Accessing the built in Jalview documentation}}
+\caption{{\bf Accessing the built in Jalview documentation.}}
 \label{help}
 \end{center}
 \end{figure}
 
-\subsubsection{Email lists}
+\subsubsection{Email Lists}
+
+The Jalview Discussion list ({\tt jalview-discuss@jalview.org}) provides a forum
+for Jalview users and developers to raise problems and exchange ideas - any
+problems, bugs, and requests for help should be raised here. The {\tt
+jalview-announce@jalview.org} list can also be subscribed to if you wish to be
+kept informed of new releases and developments. 
+
+Archives and mailing list
+subscription details can be found in the Jalview web site's \href{http://www.jalview.org/community}{community section}.
 
-The Jalview Discussion list {\tt jalview-discuss@jalview.org} provides a forum for Jalview users and developers to raise problems and exchange ideas - any problems, bugs, and requests for help should be raised here. The {\tt jalview-announce@jalview.org} list can also be subscribed to if you wish to be kept informed of new releases and developments. Archives and mailing list subscription details can be found on the Jalview web site.
-\r\section{Navigation}
-\lavel{jvnavigation}
+
+\section{Navigation}
+\label{jvnavigation}
 The major features of the Jalview Desktop are illustrated in Figure \ref{anatomy}. The alignment window is the primary window for editing and visualization, and can contain several independent views of the alignment being worked with. The other windows (Trees, Structures, PCA plots, etc) are linked to a specific alignment view. Each area of the alignment window has a separate context menu accessed by clicking the right mouse button.  
 
- Jalview has two navigation and editing modes: normal mode, where editing and navigation is performed using the mouse, and cursor mode where editing and navigation are performed using the keyboard. The F2 key is used to switch between these two modes. 
+ Jalview has two navigation and editing modes: {\bf normal mode}, where
+ editing and navigation is performed using the mouse, and {\bf cursor mode}
+ where editing and navigation are performed using the keyboard. The {\bf F2}
+ key is used to switch between these two modes. 
+ {\em Note:} On MacBooks and other laptops with compact keyboards, you may need
+ to press the function key {\bf [Fn]} when pressing any of the numbered function
+ keys. So to toggle between keyboard and normal mode, press {\bf [Fn]-[F2]}.
 
 \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 labelled.}
+\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}
 \end{figure}
 
-\subsection{Navigation in Normal mode}
-\rJalview always starts up in Normal mode, where the mouse is used to interact with the displayed alignment view. You can move about the alignment by clicking and dragging the ruler scroll bar to move horizontally, or by clicking and dragging the alignment scroll bar to the right of the alignment to move vertically.  If all the rows or columns in the alignment are displayed, the scroll bars will not be visible.\r\r Each alignment view shown in the alignment window presents a window onto the visible regions of the alignment. This means that with anything more than a few residues or sequences, alignments can become difficult to visualize on the screen because only a small area can be shown at a time. It can help, especially when examining a large alignment, to have an overview of the whole alignment. Select {\sl View $\Rightarrow$ Overview Window} from the window menu (Figure \ref{overview}).\r%(Figure4)
+\subsection{Navigation in Normal Mode}
+
+Jalview always starts up in Normal mode, where the mouse is used to interact
+with the displayed alignment view. You can move about the alignment by clicking
+and dragging the ruler scroll bar to move horizontally, or by clicking and
+dragging the alignment scroll bar to the right of the alignment to move
+vertically.  If all the rows or columns in the alignment are displayed, the
+scroll bars will not be visible.
+
+ Each alignment view shown in the alignment window presents a window onto the
+ visible regions of the alignment. This means that with anything more than a few
+ residues or sequences, alignments can become difficult to visualize on the
+ 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}).
+% (Figure4)
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=4.5in]{images/overview.pdf}
-\caption{{\bf Alignment Overview Window}}
+\caption{{\bf Alignment Overview Window.} The overview window for a view is
+opened from the {\em View} menu.}
 \label{overview}
 \end{center}
 \end{figure}
-\rThe red box in the overview window shows the current view in the alignment window. A percent identity histogram is plotted below the alignment overview. Shaded parts indicate rows and columns of the alignment that are hidden (in this case, a single row at the bottom of the alignment - see Section \ref{hidingregions}). You can navigate around the alignment by dragging the red box. %Try this now and see how the view in the alignment window changes.\r\r\parbox[c]{3in}{Alignment and analysis windows are closed by clicking on the usual `close' icon (indicated by arrows on Mac OS X). If you want to close all the alignments and analysis windows at once, then use the {\sl Window $\Rightarrow$ Close All} option from the Jalview desktop (\em{warning: make sure you have saved your work because this cannot be undone !}). }
+
+The red box in the overview window shows the current view in the alignment
+window. A percent identity histogram is plotted below the alignment overview.
+Shaded parts indicate rows and columns of the alignment that are hidden (for more information see Section
+\ref{hidingregions}). You can navigate around the alignment by dragging the red
+box. 
+
+%Try this now and see how the view in the alignment window changes.
+
+\parbox[c]{3in}{Alignment and analysis windows are closed by clicking on the
+usual `close' icon (indicated by arrows on Mac OS X). If you want to close all
+the alignments and analysis windows at once, then use the {\sl Window
+$\Rightarrow$ Close All} option from the Jalview desktop.
+
+{\bf \em{Warning: Make sure you have saved your work because this cannot be
+undone!}} }
 \parbox[c]{3in}{\centerline{\includegraphics[width=2.5in]{images/start_closeall.pdf}
 }}
 
-\subsection{Navigation in Cursor mode}
+\subsection{Navigation in Cursor Mode}
 \label{cursormode}
-\parbox[c]{5in}{Cursor mode navigation enables the experienced user to quickly and precisely navigate, select and edit parts of an alignment. On pressing F2 to enter cursor mode the position of the cursor is indicated by a black background and white text. The cursor can be placed using the mouse or moved by pressing the arrow keys ($\uparrow$, $\downarrow$, $\leftarrow$, $\rightarrow$). 
+\parbox[c]{5in}{Cursor mode navigation enables the user to quickly
+and precisely navigate, select and edit parts of an alignment. On pressing F2 to
+enter cursor mode the position of the cursor is indicated by a black background
+and white text. The cursor can be placed using the mouse or moved by pressing
+the arrow keys ($\uparrow$, $\downarrow$, $\leftarrow$, $\rightarrow$).
 }\parbox[c]{1.25in}{\centerline{\includegraphics[width=0.8in]{images/cursor1.pdf}}}
 
 Rapid movement to specific positions is accomplished as listed below:
 \begin{list}{$\circ$}{}
-\item {\bf Jump to Sequence {\sl n}:} Type a number {\sl n} then press [S] to move to sequence (row) {\sl n}  
+\item {\bf Jump to Sequence {\sl n}:} Type a number {\sl n} then press [S] to
+move to sequence (row) {\sl n}.
 \item {\bf Jump to Column {\sl n}:} Type a number {\sl n} then press [C] to move to column {\sl n} in the alignment.  
 \item {\bf Jump to Residue {\sl n}:} Type a number {\sl n} then press [P] to move to residue number {\sl n} in the current sequence.  
 \item {\bf Jump to  column {\sl m} row {\sl n}:} Type the column number {\sl m}, a comma, the row number {\sl n} and press [RETURN]. 
 \end{list}
+\subsection{The Find Dialog Box}
+\label{searchfunction}
+A further option for navigation is to use the {\sl Select $\Rightarrow$
+Find\ldots} function. This opens a dialog box into which can be entered regular
+expressions for searching sequences and sequence IDs, or sequence numbers.
+Hitting the [Find next] button will highlight the first (or next) occurrence of
+that pattern in the sequence ID panel or the alignment, and will adjust the view
+in order to display the highlighted region. The Jalview Help provides
+comprehensive documentation for this function, and a quick guide to the regular
+expressions that can be used with it.
+%TODO insert a figure for the Find dialog box
 
 \exercise{Navigation}{
-\label{navigate}
+\label{navigationEx}
+Jalview has two navigation and editing modes: {\bf normal} mode (where editing
+and navigation are via the mouse) and the {\bf cursor} mode (where editing and
+navigation are via the keyboard).
+The {\bf F2} key is used to switch between these two modes. With a Mac, the key
+combination {\bf Fn and F2} keys are needed, as the {\bf F2} button is
+often assigned to screen brightness. Jalview always starts up in normal mode.
+
+\exstep{Load an example alignment from its URL
+(\url{http://www.jalview.org/examples/exampleFile_2_7.jar}) via the Desktop
+using {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ from URL} dialog
+box.
+(The URL should be stored in its history and clicking on the {\sl down arrow}
+on the dialog box is an easy way to access it.)}
 \exstep{Scroll around the alignment using the alignment (vertical) and ruler (horizontal) scroll bars.}
-\exstep{Find and open the Overview Window. Move around the alignment by clicking and dragging the red box in the overview window.}
-\exstep{Look at the status bar as you move the mouse over the alignment. It should indicate information about the sequence and residue under the cursor.
+\exstep{Find the Overview Window, {\sl View
+$\Rightarrow$ Overview Window} and open it. Move around the
+alignment by clicking and dragging the red box in the overview window.}
+\exstep{Return to the alignment window, look at the status bar (lower left
+hand corner of the alignment window) as you move the mouse over the alignment. It indicates information about the
+sequence and residue under the cursor.}
+\exstep{Press [F2] key, or [Fn]-[F2] on Mac, to enter Cursor mode. Use
+the direction keys to move the cursor around the alignment.}
+\exstep{Move to sequence 7 by pressing {\bf 7 S}. Move to column 18 by pressing
+{\bf 1 8 C}. Move to residue 18 by pressing {\bf 1 8 P}. Note that these can be
+two different positions if gaps are inserted into the sequence. Move to sequence 5,
+column 13 by typing {\bf 1 3 , 5} [RETURN].}
+
+{\bf Note:} To view Jalview's comprehensive on-line help documentations select
+{\sl Help} in desktop window menu, clicking on {\sl Documentation} will open a
+Documentation window. Select topics from the navigation panel on the left hand
+side or use the Search tab to locate specific key words.
+
+{\sl\bf See the video at: 
+\url{http://www.jalview.org/Help/Getting-Started}.}
 }
-\exstep{Press [F2] to enter Cursor mode. Use the arrow keys to move the cursor around the alignment. 
-Move to sequence 7 by pressing {\sl 7 S}. Move to column 18 by pressing {\sl 1 8 C}. Move to residue 18 by pressing {\sl 1 8 P}. Note that these can be two different positions if gaps are inserted into the sequence. Move to sequence 5, column 13 by typing {\sl 1 3 , 5 [RETURN]}.
-}
-} 
-\subsection{The Find Dialog Box}
-\label{searchfunction}
-A further option for navigation is to use the {\sl Select $\Rightarrow$ Find\ldots} function. This opens a dialog box into which can be entered regular expressions for searching sequences and sequence IDs, or sequence numbers. Hitting the [Find next] button will highlight the first (or next) occurence of that pattern in the sequence ID panel or the alignemnt, and will adjust the view in order to display the highlighted region. The Jalview help provides comprehensive documentation for this function, and a quick guide to the regular expressions that can be used with it.
 
-%TODO insert a figure for the Find dialog box
+\section{Loading Sequences and Alignments}
+\label{loadingseqs}
+%Jalview provides many ways to load your own sequences. %For this section of the
+% tutorial you will need to download the file http://www.jalview.org/tutorial/alignment.fa to a suitable location on your hard drive.
+\subsection{Drag and Drop}
+       In most operating systems you can drag a file icon from a file browser
+       window and drop it on an open Jalview application window. The file will then be opened as a new alignment window. 
+       %You can try this with the tutorial file you have downloaded. When you have opened the file, close it again by selecting the close control on the window. If you drop an alignment file onto an open alignment window it will be appended.
+       Drag and drop also works when loading data from a URL -
+simply drag the link or url from the address panel of your browser onto an
+alignment or the Jalview desktop background and Jalview will load data from the
+URL directly.
+%  (Figure \ref{drag})
+% %[fig 5]
+% \begin{figure}[htbp]
+% \begin{center}
+% \includegraphics[width=2in]{images/drag2.pdf}
+% \includegraphics[width=2in]{images/drag3.pdf}
+% \caption{{\bf An alignment can be opened by dragging the file onto the Jalview window. }}
+% \label{drag}
+% \end{center}
+% \end{figure}
+% 
+% %\includegraphics[width=2in]{images/drag1.pdf}
+
 
-\r\section{Loading your own sequences}\r\label{loadingseqs}\rJalview provides many ways to load your own sequences. %For this section of the tutorial you will need to download the file http://www.jalview.org/tutorial/alignment.fa to a suitable location on your hard drive.\r\r\subsection{Drag and Drop}\r     In some operating systems (Mac OS X, Windows XP) you can just drag a file icon from a file browser window and drop it on an open Jalview application window. The file will then be opened as a new alignment window. %You can try this with the tutorial file you have downloaded. When you have opened the file, close it again by selecting the close control on the window.\rIf you drop an alignment file onto an open alignment window it will be appended to that alignment.\r%  (Figure \ref{drag})
-% %[fig 5]\r% \begin{figure}[htbp]\r% \begin{center}\r% \includegraphics[width=2in]{images/drag2.pdf}\r% \includegraphics[width=2in]{images/drag3.pdf}\r% \caption{{\bf An alignment can be opened by dragging the file onto the Jalview window. }}\r% \label{drag}\r% \end{center}\r% \end{figure}\r\r% %\includegraphics[width=2in]{images/drag1.pdf}
+\subsection{From a File}
+Jalview can read sequence alignments from a sequence alignment file. This is a
+text file, {\bf not} a word processor document. For entering sequences from a
+wordprocessor document see Cut and Paste  (Section \ref{cutpaste}). Select
+{\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From File} from the main
+menu (Figure \ref{loadfile}). You will then get a file selection window where
+you can choose the file to open. Remember to select the appropriate file type.
+Jalview can automatically identify some sequence file formats.
 
-\r\subsection{From a File}\r     Jalview can read sequence alignments from a sequence alignment file. This is a text file, not a word processor document. For entering sequences from a wordprocessor document see Cut and Paste  (Section \ref{cutpaste}) below. Select {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From File} from the main menu (Figure \ref{loadfile}). You will then get a file selection window where you can choose the file to open. Remember to select the appropriate file type. Jalview can automatically identify some sequence file formats.\r\r%[fig 6]\r\begin{figure}[htbp]
+%[fig 6]
+\begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=2in]{images/loadfilebox.pdf}
 %\includegraphics[width=2in]{images/loadfilebox2.pdf}
@@ -344,160 +597,324 @@ A further option for navigation is to use the {\sl Select $\Rightarrow$ Find\ldo
 \label{loadfile}
 \end{center}
 \end{figure}
-\r\subsection{From a URL}\r      Jalview can read sequence alignments directly from a URL. Please note that the files must be in a sequence alignment format - a pretty HTML alignment or graphics file cannot be read by Jalview. \rSelect {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From URL} from the main menu and a window will appear asking you to enter the URL (Figure\ref{loadurl}). Jalview will attempt to automatically discover the file format.\r\r%[fig 7]
+
+\subsection{From a URL}
+Jalview can read sequence alignments directly from a URL. Please note that the
+files must be in a sequence alignment format - an HTML alignment or graphics
+file cannot be read by Jalview.
+Select {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From URL} from the
+main menu and a window will appear asking you to enter the URL (Figure
+\ref{loadurl}). Jalview will attempt to automatically discover the file format.
+
+%[fig 7]
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=2in]{images/menuloadurl.pdf}
 \includegraphics[width=3in]{images/loadurlbox.pdf}
-\caption{{\bf Opening an alignment from a URL }}
+\caption{{\bf Opening an alignment from a URL. }}
 \label{loadurl}
 \end{center}
 \end{figure}
-\r\subsection{Cut and Paste}
-\label{cutpaste}\rDocuments such as those produced by Microsoft Word cannot be readily understood by Jalview. The way to read sequences from these documents is to select the data from the document and copy it to the clipboard. Select {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From Textbox} from the main menu and a textbox window will appear (Figure \ref{loadtext}). Paste the sequences you have copied to the clipboard and, presuming that they are in the right format, Jalview will happily read them.\r%[fig 8]
+
+\subsection{Cut and Paste}
+\label{cutpaste}
+Documents such as those produced by Microsoft Word cannot be readily understood
+by Jalview. The way to read sequences from these documents is to select the
+data from the document and copy it to the clipboard. There are two ways to
+do this. One is to right-click on the desktop background, and select the
+`Paste to new window' option in the menu that appears. The other is to select
+{\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From Textbox} from the
+main menu, paste the sequences into the text window that will appear, and select
+{\sl New Window} (Figure \ref{loadtext}). In both cases, presuming that they are
+in the right format, Jalview will happily read them into a new alignment window.
+%[fig 8]
 
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=2in]{images/menuloadtext.pdf}
 \includegraphics[width=3in]{images/loadtextbox.pdf}
-\caption{{\bf Opening an alignment from pasted text }}
+\caption{{\bf Opening an alignment from pasted text. }}
 \label{loadtext}
 \end{center}
 \end{figure}
 
-\r\subsection{From a public database}
-\label{fetchseq}\rJalview can retrieve sequences and sequence alignments from the public databases housed at the European Bioinformatics Institute, such as Uniprot, Pfam and the PDB, as well as any DAS sequence server registered at the configured DAS registry. This facility avoids having to manually locate, save and load the sequences, and allows Jalview to gather additional metadata provided by the source, such as annotation and database cross references.
-Select {\sl File $\Rightarrow$ Fetch Sequence(s) \ldots} from the main menu and a window will appear (Figure \ref{loadseq}). Use the menu box to select the appropriate database, enter a sequence ID/accession number, or several separated by a semicolon and Jalview will attempt to retrieve it/them from the chosen database source. Example queries are provided to test that a source is operational, but can also be used as a guide on the type of accession numbers understood by the source.\r%[fig 9]\r\begin{figure}[htbp]
+
+\subsection{From a Public Database}
+\label{fetchseq}
+Jalview can retrieve sequences and sequence alignments from the public databases
+housed at the European Bioinformatics Institute, including Uniprot, Pfam, Rfam
+and the PDB. Jalview's sequence fetching capabilities allow you to avoid having to
+manually locate and save sequences from a web page before loading them into
+Jalview. It also allows Jalview to gather additional metadata provided by the
+source, such as annotation and database cross-references.
+
+To begin retrieving data, select {\sl File $\Rightarrow$ Fetch Sequences \ldots} 
+from the main menu. A window will then appear (Figure \ref{loadseq}) showing all 
+the database sources Jalview can access (grouped by the type of database). Once 
+you've selected the appropriate database by double clicking it or hitting OK, the 
+database selection window will close and the sequence fetcher for that database 
+will appear. You can then enter one or several database IDs or accession numbers 
+separated by a semicolon and press OK. Jalview will then attempt to retrieve them 
+from the chosen database. Example queries are provided for some databases to test
+that a source is operational, and can also be used as a guide for the type of 
+accession numbers understood by the source.
+% [fig 9]
+\begin{figure}[htbp]
 \begin{center}
-\includegraphics[width=2.5in]{images/fetchseq.pdf}
-\caption{{\bf Retrieving sequences from a public database}}
+\includegraphics[width=5in]{images/fetchseq.pdf}
+\caption{{\bf Retrieving sequences from a public database.}}
 \label{loadseq}
 \end{center}
 \end{figure}
-  
 
-\exercise{Loading sequences}{
+\exercise{Loading Sequences}{
 \label{load}
-\exstep{Start Jalview then close all windows by selecting {\sl Window $\Rightarrow$ Close All} from the main menu}
-\exstep{Select {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From URL} from the main menu and enter \textsf{http://www.jalview.org/tutorial/alignment.fa} in the box. Click {\sl OK} and the alignment should load.
-}
-\exstep{Close all windows using the {\sl Window $\Rightarrow$ Close All} main menu option. Point your web browser to \textsf{http://www.jalview.org/tutorial/alignment.fa} and save the file to your desktop. Open this file in Jalview by selecting {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From File} from the main menu and browsing to the appropriate location. Click OK and load the alignment
-}
-\exstep{
-Drag the alignment.fa file from the desktop onto the Jalview window. The alignment should open. Try dragging onto an empty Jalview and onto an existing alignment and observe the results.
-}
-\exstep{
-Select {\sl File $\Rightarrow$ Fetch Sequence(s).. } from the main menu. Select the {\sl PFAM (seed)} database and enter the accession number PF03460. Click OK. An alignment of about 107 sequences should load.
-}
-\exstep{Open the URL \textsf{http://www.jalview.org/tutorial/alignment.fa}  in a web browser. Select and copy the entire text to the clipboard (usually via the browser's {\sl Edit $\Rightarrow$ Copy} menu option). Ensure Jalview is running and select {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From Textbox} . Paste the clipboard into the large window using the {\sl Edit $\Rightarrow$ Paste} text box menu option. Click {\sl Close} and the alignment will be loaded.
-}
+\exstep{Use {\sl Window $\Rightarrow$ Close All} from the Desktop window menu to
+close all windows.}
+%% TODO: omit or combine this exercise
+%% NB. Edge (MS default browser) doesn't actually allow you to 'save' the page, apparently
+\exstep{{\bf Loading sequences from URL:} Selecting {\sl File $\Rightarrow$
+Input Alignment $\Rightarrow$ From URL} from the Desktop and enter \url{http://www.jalview.org/tutorial/alignment.fa} in the box.
+Click {\sl OK} to load the alignment.}
+
+%%TODO: omit or combine
+\exstep{{\bf Loading sequences from a file:} Close all windows using the
+{\sl Window $\Rightarrow$ Close All} menu option from the Jalview desktop.
+Then type the same URL (\url{http://www.jalview.org/tutorial/alignment.fa}) into
+your web browser and save the fasta file (.fa) file to your desktop using {\sl File
+$\Rightarrow$ Save Page as}.
+Open the file you have just saved in Jalview by selecting {\sl File
+$\Rightarrow$ Input Alignment $\Rightarrow$ From File} from the desktop menu.
+Select the file and click {\sl OK} to load.}
+
+\exstep{{\bf Loading sequences by `Drag and Drop' / `Cut and Paste':}
+
+(i) Drag the alignment.fa file that you have just saved from its folder and
+drop it onto the Jalview desktop window, the alignment should open.
+
+(ii) Open
+\url{http://www.jalview.org/examples/estrogenReceptorProtein.fa} in a web
+browser. Test the differences
+between (a) dragging the URL directly from browser onto the Jalview
+desktop.
+(If the URL is downloaded, alternatively locate the file in your download
+directory and drag it onto the desktop.) (b) dragging the URL from
+browser onto the existing alignment.fa alignment window in the Jalview desktop.
+
+(iii) Open \url{http://www.jalview.org/examples/estrogenReceptorCdna.fa} in a web
+browser. Note that this is a cDNA file. Drag the URL from
+browser onto the estrogenReceptorProtein.fa protein alignment window in
+the Jalview desktop. A dialogue box opens asking `Would you like to open as split
+window, with cDNA and protein linked?' select `Split Window' option. A
+split window opens in the Jalview desktop.
 }
 
+\exstep{{\bf The text editor:} 
+
+(i) Open the alignment.fa file using text editor.
+Copy the sequence text into the clipboard  using [CTRL]-A and then [CTRL]-C.
+
+(ii) Move the mouse pointer onto the Jalview desktop window's background and right-click 
+to open the context window. Select the {\sl Paste to New Window} menu option.
+
+(iii) In the Jalview desktop menu, select {\sl File
+$\Rightarrow$ Input Alignment $\Rightarrow$ From Textbox}.
+Paste the clipboard into the large window using [CTRL]-V. Click {\sl New Window}
+and the alignment will be loaded.}
+
+\exstep{{\bf Loading sequences from Public Database:} (i) Select {\sl File
+$\Rightarrow$ Fetch Sequences...} from the Jalview desktop menu. The {\sl
+Select Database Retrieval Source} dialog will open listing all the database
+sources. Select the {\bf PFAM seed} database and click {\sl OK}.
+
+%TODO fix ss appearing as RNA ss issue with secondary structure from pfam when downloading the Full alignment.
+
+(ii) The {\sl New
+Sequence Fetcher} window will open. Enter the accession number {\bf PF03460}
+and click {\sl OK}.
+An alignment of about 174 sequences should load.}
+\exstep{These can be viewed using the Overview window accessible from {\sl View
+$\Rightarrow$ Overview Window.}}
+{\bf See the video at:
+\url{http://www.jalview.org/Help/Getting-Started}} }
+
 \subsection{Memory Limits}
 \label{memorylimits}
-Jalview is a Java program. One unfortunate implication of this is that it does
-not allow Jalview to dynamically request additional memory from the operating
-system. It is important, therefore, that you 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 memory is available to Jalview with the desktop window's {\sl $\Rightarrow$
-Tools $\Rightarrow$ Show Memory Usage} function, which enables the display of the
-currently available memory at the bottom left hand side of the Desktop window's
-background. Should you need to increase the amount of memory available to
-Jalview, full instructions are given in both the built in documentation and on
-the JVM memory parameters page (http://www.jalview.org/jvmmemoryparams.html) on
-the website.
-
-\r\section{Writing sequence alignments}
-\label{savingalignments} \subsection{Saving the alignment} Jalview allows the
-current sequence alignments to be saved to file so they can be restored at a
-later date, passed to colleagues or analysed in other programs. From the
-alignment window menu select {\sl File $\Rightarrow$ Save As} and a dialog box
+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
+memory is available to Jalview with the desktop window's {\sl $\Rightarrow$
+Tools $\Rightarrow$ Show Memory Usage} function, which enables the display of
+the currently available memory at the bottom left hand side of the Desktop
+window's background. Should you need to increase the amount of memory available
+to Jalview, full instructions are given in the built in documentation (opened by
+selecting {\sl Help $\Rightarrow$ Documentation}) and on the JVM memory
+parameters page (\url{http://www.jalview.org/jvmmemoryparams.html}).
+
+\section{Saving Sequences and Alignments}
+\label{savingalignments} 
+\subsection{Saving Alignments} Jalview allows alignments to be saved to file
+in a variety of formats so they can be restored at a later date, passed to
+colleagues or analysed in other programs. From the alignment window menu select {\sl File $\Rightarrow$ Save As} and a dialog box
 will appear (Figure \ref{savealign}). You can navigate to an appropriate
 directory in which to save the alignment. Jalview will remember the last filename
-and format used to save (or load) the alignment, enabling you to quickly update
-the file after editing by using the {\sl File $\Rightarrow$ Save} entry.
-
-Jalview offers several different formats in which an alignment can be saved. The jalview format is the only one which will preserve the colours, groupings and similar information in the alignment. The other formats produce text files containing just the sequences with no visualization information, although some allow limited annotation and sequence features to be stored (e.g. AMSA). Unfortunately only Jalview can read Jalview files. The {\sl File $\Rightarrow$ Output To Textbox} menu option allows the alignment to be copied and pasted into other documents or web servers. 
-\r%[fig 10]
+and format used to save (or load) the alignment, enabling you to quickly save
+the file during or after editing by using the {\sl File $\Rightarrow$ Save}
+entry. The {\sl File $\Rightarrow$ Output To Textbox} menu option allows the alignment to be copied and pasted into
+other documents or web servers.
+
+Jalview offers several different formats in which an alignment can be saved.
+Of these, only the jalview project format (.jar or .jvp) will preserve the colours, groupings and other additional information in the alignment. The other formats
+produce text files containing just the sequences with no visualization information, although some
+allow limited annotation and sequence features to be stored (e.g. AMSA).
+Unfortunately, as far as we are aware only Jalview can read Jalview
+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}}
+\caption{{\bf Saving alignments in Jalview to disk.}}
 \label{savealign}
 \end{center}
 \end{figure}
 
-\subsection{Jalview Projects}\r\parbox[c]{4in}{If you wish to save the complete Jalview session rather than just one alignment (e.g. because you have calculated trees or multiple different alignments) then your work should be saved as a Jalview Project file\footnote{Tip: Ensure that you have allocated plenty of memory to Jalview when working with large alignments in Jalview projects. See Section \protect \ref{memorylimits} above for how to do this.}.
-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}
-}}
+\subsection{Jalview Projects}
+\parbox[c]{4in}{If you wish to save a complete Jalview session rather than
+just a single alignment (e.g. because you have calculated trees or multiple
+different alignments) then save your work as a Jalview Project
+file (.jvp).\footnote{Tip: Ensure that you have allocated plenty of memory to
+Jalview when working with large alignments in Jalview projects. See Section 
+\ref{memorylimits} for how to do this.}
+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]{2.3in}{ \centerline {
+\includegraphics[width=2.2in]{images/saveproj.pdf} }}
 
 \exercise{Saving Alignments}{
 \label{save}
-\exstep{Start Jalview, close all windows and load the ferrodoxin alignment from pFam (accession number PF03460 (see Exercise \ref{load}).
+\exstep{Launch Jalview afresh, or use {\sl Desktop $\Rightarrow$ Window
+$\Rightarrow$ Close all }.}
+\exstep{Load the ferredoxin
+alignment ({\bf PF03460}) from {\bf PFAM (seed)} (see Exercise
+\ref{load}).
+} \exstep{
+
+Select {\sl File $\Rightarrow$ Save As} from the alignment window menu. Choose a
+location into which to save the alignment and select your preferred format. All
+formats except {\sl  Jalview } jvp can be viewed in a normal text editor (e.g.
+Notepad) or in a web browser.
+Enter a file name, select file type and click {\sl Save}.}
+\exstep{Check this file by closing all windows and opening it with Jalview, or by
+browsing to it with your web browser.}
+\exstep{Repeat the previous steps saving the files in different file formats.}
+\exstep{Select {\sl File $\Rightarrow$ Output to Textbox $\Rightarrow$ FASTA}.
+Select and copy this alignment to the clipboard using the textbox menu options
+{\sl Edit $\Rightarrow$ Select All} followed by {\sl Edit $\Rightarrow$ Copy}.
+The alignment can then be pasted into any application of choice, e.g. a word processor or web form.
 }
-\exstep{
-Select {\sl File $\Rightarrow$ Save As} from the alignment window menu. Choose a location into which to save the alignment and select a format. All formats except {\sl  Jalview } can be viewed in a normal text editor (e.g. Notepad) or in a web browser. Enter a file name and click {\sl Save}. Check this file by browsing to it with your web browser or by closing all windows and opening it with Jalview. 
-}
-\exstep{ Repeat the previous step trying different file formats.}
-\exstep{Select {\sl File $\Rightarrow$ Output to Textbox $\Rightarrow$ FASTA}. You can select and copy this alignment to the clipboard using the textbox menu options {\sl Edit $\Rightarrow$ Select All} followed by {\sl Edit $\Rightarrow$ Copy}. The alignment can then be pasted into any application of choice, e.g. a word processor or web form.
-}
-\exstep{Ensure at least one alignment window is shown in Jalview. Open the overview window and scroll to any part of the alignment. Select {\sl File $\Rightarrow$ Save Project} from the main menu and save in a suitable place. Close all windows and then load the project via the {\sl File $\Rightarrow$ Save Project} menu option. Note how all the windows and positions  are exactly as they were when they were saved.
-}
-}
-\r\r\section{Selecting and editing sequences}
-\label{selectingandediting} \rJalview makes extensive use of selections which are arbitrary regions in an alignment. This section illustrates how to make and use selections and groups. 
-\r\subsection{Selecting parts of an alignment}
-Selections can be of arbitrary regions in an alignment, one or more complete columns, or one or more complete sequences.
-A selected region can be copied and pasted as a new alignment using the {\sl Edit $\Rightarrow$ Copy} and {\sl Edit $\Rightarrow$ Paste $\Rightarrow$ As New Alignment}  alignment window menu options.
-
-To clear (unselect)  the selection press the [ESC] (escape) key.
-
-\subsubsection{Selecting arbitrary regions}\rTo select part of an alignment, place the mouse at the top left corner of the region you wish to select. Press the mouse button and drag the mouse to the bottom right corner of the chosen region before releasing the mouse button. A dashed red box appears around the selected region (Figure \ref{select}). \r%[fig 12]
+\exstep{Ensure at least one alignment window is active in Jalview. Open the
+overview window {\sl View $\Rightarrow$ Overview Window}
+ and click and drag to move the red box to any part of the alignment.
+Select {\sl File
+$\Rightarrow$ Save Project} from the desktop window menu and save the project in a
+suitable folder.}
+
+\exstep{Close all windows and then load the project {\sl via} the {\sl File
+$\Rightarrow$ Load Project} menu option. Observe how many of the windows
+reopen. Are they the same as when they were saved ? } {\bf See the video at:
+\url{http://www.jalview.org/Help/Getting-Started}.} }
+
+
+\chapter{Selecting and Editing Sequences }
+\label{jalviewediting}
+
+\label{selectingandediting} 
+Jalview makes extensive use of selections - most of the commands available from
+its menus operate on the {\sl currently selected region} of the alignment, either to
+change their appearance or perform some kind of analysis. This section
+illustrates how to make and use selections and groups.
+
+\section{Selecting Parts of an Alignment}
+Selections can be of arbitrary regions in an alignment, one or more complete columns, or one or 
+more complete sequences.
+A selected region can be copied and pasted as a new alignment 
+using the {\sl Edit $\Rightarrow$ Copy} and {\sl Edit $\Rightarrow$ Paste $\Rightarrow$ To New 
+Alignment}  in the alignment window menu options.
+{\bf To clear (unselect)  the selection press the [ESC] key.}
+
+\subsection{Selecting Arbitrary Regions}
+To select part of an alignment, place the mouse at the top left corner of the region you wish to select. Press and hold the mouse button and drag the mouse to the bottom right corner of the chosen region then release the mouse button. 
+A dashed red box appears around the selected region (Figure \ref{select}). 
+%[fig 12]
 
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=4in]{images/select1.pdf}
-\caption{{\bf Selecting a region in an alignment}}
+\caption{{\bf Selecting a region in an alignment.}}
 \label{select}
 \end{center}
 \end{figure}
 
-\subsubsection{Selecting columns}\rTo select the same residues in all sequences, click and drag along the alignment ruler. This selects the entire height of the alignment. Ranges of positions can also be selected by clicking on the first position then holding down the [SHIFT] key whilst clicking the other end of the selection. Discontinuous regions can be selected by holding down [CTRL] and clicking on positions to add to the column selection. Note that each [CTRL]-Click changes the current selected sequence region to that column, but adds to the column selection. Selected columns are indicated by red highlighting in the ruler bar (Figure \ref{selectcols}).\r%[fig 13]
+\subsection{Selecting Columns}
+To select the same residues in all sequences, click and drag along the alignment ruler.
+This selects the entire column of the alignment. Ranges of positions from the
+alignment ruler can also be selected by clicking on the first position and then
+holding down the [SHIFT] key whilst clicking the other end of the selection.
+Discontinuous regions can be selected by holding down [CTRL] and clicking on
+positions to add to the column selection. Note that each [CTRL]-Click (PC) or
+[CMD]-Click (Mac) changes the current selected sequence region to that column,
+it adds to the column selection.
+Selected columns are indicated by red highlighting in the ruler bar (Figure \ref{selectcols}).
+%[fig 13]
 
 \begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=4in]{images/select2.pdf}
-\caption{{\bf Selecting multiple columns in an alignment.} The red highlightign on the alignment ruler marks the selected columns. Note that only the most recently selected column has a dashed-box around it to indicate a region selection. }
+\caption{{\bf Selecting multiple columns in an alignment.} The red highlighting
+on the alignment ruler marks the selected columns. Note that only the most
+recently selected column has a dashed-box around it to indicate a region
+selection. }
 \label{selectcols}
 \end{center}
 \end{figure}
 
-\subsubsection{Selecting sequences}
+To select multiple complete sequences, click and drag the mouse down the
+sequence ID panel. The same techniques can be used as for columns above ([SHIFT]-Click for continuous and [CTRL]-Click (or {\sl 
+[CMD]-Click} for Mac) to select discontinuous
+ranges of sequences (Figure \ref{selectrows}).
+%[fig 14]
+
+\subsection{Selecting Sequences}
 
 \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}
-\rTo select multiple complete sequences, click and drag the mouse along the sequence ID panel. Multiple sequences will be selected. The same technique as used for columns above can be used with [SHIFT]-Click for continuous and [CTRL]-Click to select discontinuous ranges of sequences (Figure \ref{selectrows}).\r%[fig 14]
 
-\subsubsection{Making selections in Cursor mode}
 
-To define a selection in cursor mode, navigate to the top left corner of the proposed selection. Pressing the [Q] key marks this as the corner. A red outline appears around the cursor (Figure \ref{cselect})
+
+\subsection{Making Selections in Cursor Mode}
+
+To define a selection in cursor mode (which is enabled by pressing [F2] when the alignment window is selected),
+navigate to the top left corner of the proposed selection (using the mouse, the arrow keys, or the keystroke
+commands described in Section \ref{cursormode}). Pressing the [Q] key marks this as the
+corner. A red outline appears around the cursor (Figure \ref{cselect}).
 
 Navigate to the bottom right corner of the proposed selection and press the [M] key. This marks the bottom right corner of the selection. The selection can then be treated in the same way as if it had been created in normal mode.
 
@@ -507,260 +924,469 @@ Navigate to the bottom right corner of the proposed selection and press the [M]
 \includegraphics[width=1.5in]{images/csel2.pdf}
 \includegraphics[width=1.5in]{images/csel3.pdf}
 \includegraphics[width=1.5in]{images/csel4.pdf}
-\caption{{\bf Making a selection in cursor mode.} Navigate to the top left corner (left), press [Q] (left center), navigate to the bottom right corner (right center) and press [M] (right)}
+\caption{{\bf Making a selection in cursor mode.} Navigate to the top left
+corner (left), press [Q], navigate to the bottom right corner and press [M] (right).}
 \label{cselect}
 \end{center}
 \end{figure}
 
-\subsubsection{Inverting the current selection}
-
-The current sequence or column selection can be inverted, using  {\tr Select $\Rightarrow$ Invert {\bf Sequence/Column} Selection} in the Alignment window. Inverting the selection is particularly useful when hiding regions in a large alignment (see Section \ref{hidecol} below). Instead of selecting the columns and rows that are to be hidden, simply select the region that is to be kept visible, and then invert the selection.
-\r\r\subsection{Creating groups}\rSelections are lost as soon as a different region is selected. Groups can be created which are labeled regions of the alignment. To create a group, first select the region which is to comprise the group. Then click the right mouse button on the selection to bring up a context menu. Select {\sl Selection $\Rightarrow$ Group $\Rightarrow$ Group} then enter a name for the group in the dialogue box which appears. 
-
-\begin{figure}[htbp]
+\begin{figure}
 \begin{center}
-\includegraphics[width=3.5in]{images/group1.pdf}
-\includegraphics[width=2in]{images/newgroup.pdf}
-\caption{{\bf Creating a new group from a selection}}
+\includegraphics[width=3in]{images/group1.pdf}
+\includegraphics[width=1.5in]{images/newgroup.pdf}
+\caption{{\bf Creating a new group from a selection.}}
 \label{makegroup}
 \end{center}
 \end{figure}
 
-By default the new group will have a box drawn around it. The appearance of the group can be changed (see Section \ref{colours} below). This group will stay defined even when the selection is removed.
-
-\subsection{Exporting the current selection}
-
-The current selection can be copied to the system clipboard (in PFAM format). It can also be output to a textbox using the output functions in the pop-up menu obtained by right clicking the current selection. The textbox enables quick manual editing of the alignment prior to importing it into a new window (using the [New Window] button) or saving to a file with the {\sl File $\Rightarrow$ Save As } pulldown menu option from the text box.
-
-
-\exercise{Making selections and groups}{
+\subsection{Inverting the Current Selection}
+The current sequence or column selection can be inverted, using  {\sl Select
+$\Rightarrow$ Invert Sequence/Column Selection} in the alignment window.
+Inverting the selection is useful when selecting large regions in an alignment, 
+simply select the region that is to be kept unselected, and then invert the selection.
+This may also be useful when hiding large regions in an alignment (see Section \ref{hidingregions}).
+Instead of selecting the columns and rows that are to be hidden, simply select the 
+region that is to be kept
+visible, invert the selection, then select {\sl View $\Rightarrow$ Hide
+$\Rightarrow$ Selected Region}.
+
+\section{Creating Groups}
+Selections are lost as soon as a different region is selected. Groups can be
+created which are labeled regions of the alignment. To create a group, first
+select the region which is to comprise the group. Then click the right mouse
+button on the selection to bring up a context menu. Select {\sl Selection
+$\Rightarrow$ Edit New Group $\Rightarrow$ Edit name and description of
+current group}\footnote{In earlier versions of Jalview, this entry was variously
+`Group', `Edit Group Name', or `JGroupXXXXX' (Where XXXXX was some serial
+number).} then enter a name for the group in the dialog box which appears.
+
+By default the new group will have a box drawn around it. The appearance of the group can be changed (see Section \ref{colours}). 
+This group will stay defined even when the selection is removed.
+
+
+\section{Exporting the Current Selection}
+The current selection can be copied to the clipboard (in PFAM format). It can
+also be output to a textbox using the output functions in the pop-up menu
+obtained by right clicking the current selection. The textbox enables quick
+manual editing of the alignment prior to importing it into a new window (using
+the {\sl New Window} button) or saving to a file with the {\sl File
+$\Rightarrow$ Save as } pulldown menu option from the text box.
+
+\exercise{Making Selections and Groups}{
 \label{exselect}
-\exstep{Close all windows in  Jalview and load the ferrodoxin alignment (PFAM ID PF03460). Choose a residue and  place the mouse cursor on it. Click and drag the mouse cursor to create a selection. As you drag, a red box will `rubber band' out to show the extent of the selection. Release the mouse button and a red box should border the selected region. Now press [ESC] to clear the selection.}
-\exstep{
-Select one sequence by clicking on the id panel. Note that the sequence ID takes on a highlighted background and a red box appears around the selected sequence. Now hold down [SHIFT] and click another sequence ID a few positions above or below. Note how the selection expands to include all the sequences between the two positions on which you clicked.
-Now hold down [CTRL] and click on several sequences ID's both selected and unselected. Note how unselected IDs are individually added to the selection and previously selected IDs are individually deselected. 
+\exstep{Load the ferredoxin alignment ({\bf PF03460} from {\bf PFAM (seed)}).
 }
-\exstep{ Repeat the step above but selecting columns by clicking on the ruler bar instead of selecting rows by clicking on the sequence ID.
-}
-\exstep{Press [F2] to enter Cursor mode. Navigate to column 59, row 1 by pressing {\sl 5 9 , 1 [RETURN]}. Press {\sl Q} to mark this position. Now navigate to column 65, row 8 by pressing {\sl 6 5 , 8 [RETURN]}. Press {\sl M} to complete the selection.}
-\exstep{
-\label{exselectgrpcolour}
-Open the popup menu by right-clicking the selected region with the mouse. Open the {\sl Selection $\Rightarrow$ Group $\Rightarrow$ Group Colour } menu and select `Percentage Identity'. This will turn the selected region into a group. }
-\exstep{Hold down [CTRL] and use the mouse to select and deselect sequences by clicking on their Sequence ID label. Note how the group expands to include newly selected sequences, and the `Percentage Identity' colouring changes. }
-\exstep{
-Use the mouse to click and drag the right-hand edge of the selected group. Note again how the group resizes.}
-
-\exstep{
-Right click on the text area to open the selection popup-menu. Follow the menus an pick an output format from the {\sl Selection $\Rightarrow$ Output to Textbox \ldots} submenu. 
+\exstep{Selecting an arbitrary region. Choose a residue and place the mouse
+cursor on it (residue information will show in alignment window status
+bar).
+Click and drag the mouse to the bottom-right to create a selection. As you drag,
+a red box will `rubber band' out to 
+show the extent of the selection.
+Release the mouse
+button and a red box borders the selected region.
+Press [ESC] to clear this.}
+\exstep{ Select one sequence by clicking on
+the sequence ID panel. Note that the sequence ID takes on a highlighted
+background and a red box appears around the selected sequence. 
+Hold down [SHIFT] and click another sequence ID a few positions above or below. 
+Note how the selection expands to include all the sequences between the two positions on which you clicked.
+Hold down [CTRL] (or [CMD] on Mac) and then click on several sequences' IDs - both selected and
+unselected. Note how unselected IDs are individually added to the selection and previously selected IDs are 
+individually deselected.}
+\exstep{ Select columns by clicking on the Alignment Ruler. Note
+that the selected column is marked with a red box.
+Hold down [SHIFT] and click a column beyond. Note the selection expands to
+include all the sequences between the two positions on which you clicked.}
+
+\exstep{Enter Cursor mode using [F2], or [Fn]-F2 for Macs.
+Navigate to column 59, row 1 by pressing {\bf 5 9 , 1 [RETURN]}.
+Press {\bf Q} to mark this position.
+Navigate to column 65, row 8 by pressing {\bf 6 5 , 8 [RETURN]}. Press {\bf M}
+to complete the selection. Note to clear the selection press the [ESC]
+key.}
+\exstep{To create a group from the selected the region, click the
+right mouse button when mouse is on the selection, this opens a
+context menu in the alignment window.
+
+Open the {\sl Selection $\Rightarrow$ Edit New Group $\Rightarrow$ Group Colour
+} menu and select {\sl Percentage Identity}.
+This will turn the selected region into a group and colour it accordingly.}
+\exstep{Hold down [CTRL] and use the mouse to select and deselect sequences in
+the alignment by clicking on their Sequence ID label. Note how the group expands
+to include newly selected sequences, and the Percentage Identity colouring changes. }
+\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, 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{Try manually editing the alignment and then press the [New Window] button to import the file into a new alignment window.}
-
+\exstep{In the Alignment output window that opens, try manually editing the
+alignment before clicking the {\sl New Window} button. This opens the
+edited alignment in a new alignment window.} {\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
 % more? change colouring style. set border colour.
 }
-\r\subsection{Reordering the alignment}\rSequence reordering is simple. Highlight the sequences to move then press the up or down arrow keys as appropriate (Figure \ref{reorder}). If you wish to move a sequence up past several other sequences it is often quicker to select the group past which you want to move it and then move the group rather than the individual sequence.\r\r\begin{figure}[htbp]
+
+
+\section{Reordering an Alignment}
+Sequence reordering is simple. Highlight the sequences to be moved then press the up or down arrow keys ($\uparrow$, $\downarrow$) as appropriate (Figure \ref{reorder}). 
+If you wish to move a sequence up past several other sequences it is often quicker to select the group past which you want to move it and 
+then move the group rather than the individual sequence.
+
+\begin{figure}[htbp]
 \begin{center}
 \includegraphics[width=3in]{images/move1.pdf}
 \includegraphics[width=3in]{images/move2.pdf}
-\caption{{\bf Reordering the alignment.} The selected sequence moves up one position on pressing the $\uparrow$ key}
+\caption{{\bf Reordering the alignment.} The selected sequence moves up one
+position on pressing the $\uparrow$ key.}
 \label{reorder}
 \end{center}
 \end{figure}
 
-\exercise{Reordering the alignment}{
-\exstep{Open an alignment (e.g.the PFAM domain PF03460). Select one sequence. Using the up and down arrow keys, alter its position in the alignment.
-}
-\exstep{Hold [CTRL] and select two sequences separated by one or more un-selected sequences. Note how multiple sequences are grouped together when they are re-ordered using the up and down arrow keys.
+\exercise{Reordering the Alignment}{
+\label{reorderex}
+\exstep{Close windows.
+
+Load the ferredoxin alignment ({\bf PF03460} from {\bf PFAM (seed)}).
 }
+\exstep{Select one of the sequence in the sequence ID panel, use the up and down
+arrow keys to alter the sequence's position in the alignment. (Note that
+this will not work in cursor mode)}
+\exstep{To select and move multiple
+sequences, use hold [SHIFT], and select two sequences separated by
+one or more un-selected sequences, repeat using the [CTRL] key. Note how
+multiple sequences are grouped together when they are re-ordered using the up and down arrow keys.}
+{\bf See the video at: \url{http://www.jalview.org/training/Training-Videos}.}
 }
 
 
-\subsection{Hiding regions}
+\section{Hiding Regions}
 \label{hidingregions}
-It is sometimes convenient to exclude some sequences or residues in the alignment without actually deleting them. Jalview allows sequences or alignment columns within a view to be hidden, and this facility has been used to create several different views of the example alignment in the file that is loaded when Jalview is first started (See Figure \ref{startpage}).
+It is sometimes convenient to exclude some sequences or residues in the alignment without actually deleting them. 
+Jalview allows sequences or alignment columns within a view to be hidden, and this facility has been used to create 
+the several different views in the example alignment file that is loaded when Jalview is first started (see Figure \ref{startpage}).
 
-To hide a set of sequences, select them and right-click the mouse on the selected sequence IDs to bring up the context menu. Select {\sl Hide Sequences} and the sequences will be concealed, with a small triangle indicating their position (Figure \ref{hideseq}). To unhide (reveal) the sequences, right click on the triangle and select {\sl Reveal Sequences} from the context menu.
+To hide a set of sequences, select them and right-click the mouse on the
+selected sequence IDs to bring up the context pop-up menu. Select {\sl Hide
+Sequences} and the sequences will be concealed, with a small blue triangle indicating their position (Figure \ref{hideseq}). 
+To unhide (reveal) the sequences, right click on the triangle and select {\sl Reveal Sequences} from the context menu.
 
 
  \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 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}
 
-
-
-A similar mechanism applies to columns (Figure \ref{hidecol}). Selected columns (indicated by a red marker) can be hidden and revealed in the same way via the context menu (right click) on the ruler bar. The hidden column selection is indicated by a blue triangle in the ruler bar.
+A similar mechanism applies to columns (Figure \ref{hidecol}). Selected columns
+(indicated by a red marker) can be hidden and revealed in the same way {\sl via}
+the context pop-up menu by right clicking on the ruler bar. The hidden column
+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}
-\caption{{\bf Hiding Columns} Hidden columns are represented by a blue triangle in the ruler bar}
+\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}
 \end{center}
 \end{figure}
 
-\subsubsection{Representing a group with a single sequence}
-
-Instead of hiding a group completely, it is sometimes useful to work with just one representative sequence. The {\sl $<$Sequence ID$>$ $\Rightarrow$ Represent group with $<$Sequence ID$>$ } option from the sequence ID pop-up menu enables this variant of the hidden groups function. The remaining representative sequence can be visualized and manipulated like any other. However, any alignment edits that affect the sequence will also affect the whole sequence group. 
-
-\exercise{Hiding and revealing regions}{
-\exstep{Close all windows then open the PFAM accession PF03460. Select a contiguous set of sequences by clicking and dragging on the sequence ID panel. Right click on the selected sequence IDs and select {\sl Hide Sequences}.
-}
-\exstep{
-Right click on the blue triangle indicating hidden sequences and select {\sl Reveal Sequences}. (If you have hidden all sequences then you will need to use the alignment window menu option {\sl View $\Rightarrow$ Show $\Rightarrow$ All Sequences.})
-}
-\exstep{
-Repeat but using a non-contiguous set of sequences. Note that when multiple regions are hidden there are two options, {\sl Reveal Sequences} and {\sl Reveal All}.
-}
-\exstep{Repeat the above but hiding and revealing columns instead of sequences.
-}
-\exstep{Select some sequences and pick one to represent the rest. Bring up the sequence ID pop-up menu for that sequence and select the {\sl Represent group with $<$Sequence ID$>$ } option. Use the pop-up menu again to reveal the hidden sequences that you just picked a representative for.}
-}
-
-
-
-
-\subsection{Introducing and removing gaps}
-
-The alignment view provides an interactive editing interface, allowing gaps to be inserted or deleted to the left of any position in a sequence or sequence group. Alignment editing can only be performed whilst in keyboard editing mode (entered by pressing [F2]) or by clicking and dragging residues with the mouse when [SHIFT] or [CTRL] is held down (which differs from earlier versions of Jalview).
+It is often easier to select the region that you intend to work with, rather
+than the regions that you want to hide. In this case, select the required region and use the {\sl View $\Rightarrow$ Hide
+$\Rightarrow$ All but Selected Region } menu entry, or press [SHIFT]-[CTRL]-H
+to hide the unselected region.
 
-\subsubsection{Locked Editing}
-\label{lockededits}
-The Jalview alignment editing model is different to that used in other alignment editors. Because edits are restricted to the insertion and deletion of gaps to the left of a particular sequence position, editing has the effect of shiting the rest of the sequence(s) being edited down or up-stream with respect to the rest of alignment. The {\sl Edit $\Rightarrow$ Pad Gaps} option can be enabled to eliminate `ragged edges' at the end of the alignment, but does not avoid the `knock-on' effect which is sometimes undesirable. However, its effect can be limited by performing the edit within a selected region. In this case, gaps will only be removed or inserted within the selected region. Edits are similarly constrained when they occur adjacent to a hidden column.   
-
-\subsubsection{Introducing gaps in a single sequence}
+\subsection{Representing a Group with a Single Sequence}
 
-To introduce a gap, place the cursor on the residue to the immediate right of where the gap should appear. Hold down the SHIFT key and the left mouse button, then drag the sequence to the right till the required number of gaps has been inserted.
+Instead of hiding a group completely, it is sometimes useful to work with just one representative sequence. 
+The {\sl $<$Sequence ID$>$ $\Rightarrow$ Represent group with $<$Sequence ID$>$ } option from the sequence ID pop-up menu enables this variant 
+of the hidden groups function. The remaining representative sequence can be visualized and manipulated like any other. 
+Note, any alignment edits that affect the sequence will also affect the whole
+sequence group.
 
-One common error is to forget to hold down [SHIFT]. This results in a selection which is one sequence high and one residue long. Gaps cannot be inserted in such a selection. The selection can be cleared and editing enabled by pressing the [ESC] key.
 
 \begin{figure}[htb]
 \begin{center}
 \includegraphics[width=3in]{images/edit1.pdf}
 \includegraphics[width=3in]{images/edit2.pdf}
-\caption{{\bf Introducing gaps.} Gaps are introduced as the selected sequence is dragged to the right.}
+\caption{{\bf Introducing gaps in a single sequence.} Gaps are introduced as the
+selected sequence is dragged to the right while pressing and holding [SHIFT].}
 \label{gapseq}
 \end{center}
 \end{figure}
 
-\subsubsection{Introducing gaps in all sequences of a group}
-
-To insert gaps in all sequences in a selection or group, place the mouse cursor on any residue in the selection or group to the immediate right of the position in which a gap should appear. Hold down the CTRL key and the left mouse button, then drag the sequences to the right until the required number of gaps has appeared.
-
 \begin{figure}[htb]
 \begin{center}
 \includegraphics[width=3in]{images/edit3.pdf}
 \includegraphics[width=3in]{images/edit4.pdf}
-\caption{{\bf Introducing gaps.} Gaps are introduced as the selected group is dragged to the right.}
+\caption{{\bf Introducing gaps in a group.} Gaps are introduced as the selected
+group is dragged to the right with [CTRL] pressed.}
 \label{gapgroup}
 \end{center}
 \end{figure}
 
-Gaps can be removed by dragging the residue to the immediate right of the gap leftwards whilst holding down [SHIFT] (for single sequences) or [CTRL] (for a group of sequences).
-\subsubsection{Sliding Sequences}
+%% TODO introduce select/hide by annotation here
+%% favor coverage of these core interactions (hide, show, select, reorder, multiple view)
+%% TODO - if columns are selected, then View->hide selected region hides *all* sequences, but it should leave the unselected columns visible !
+
+\exercise{Hiding and Revealing Regions}{
+\label{hidingex}
+\exstep{Load the ferredoxin alignment ({\bf PF03460} from {\bf PFAM (seed)}).
+}
+\exstep{Select a contiguous set of sequences by clicking and dragging on the sequence ID panel.
+Right click on the selected sequence IDs to bring up the sequence ID context
+menu, select {\sl Hide Sequences}.
+}
+\exstep{
+Right click on the blue triangle indicating hidden sequences and select {\sl
+Reveal Sequences} in the panel. (If you have hidden all sequences then you will
+need to use the alignment window menu option {\sl View $\Rightarrow$ Show $\Rightarrow$ 
+All Sequences.}) }
+\exstep{
+Repeat the process but use a non-contiguous set of sequences. Note that when
+multiple regions are hidden you can select either {\sl
+Reveal Sequences} to reveal the hidden sequences that were clicked, or {\sl
+Reveal All}.
+}
+\exstep{Repeat the above using columns to hide and reveal columns
+instead of sequences.}
+\exstep{Select a region of the alignment, and experiment with the {\sl Hide all
+but selected region} option in {\sl View $\Rightarrow$ Hide $\Rightarrow$ All
+but selected region.}} \exstep{Select some sequences, pick one to represent the rest by hovering
+the mouse over this sequence. Bring up the Sequence ID context menu by right
+clicking and select {\sl (Sequence ID name) $\Rightarrow$ Represent group
+with (Sequence ID name )}. To reveal these hidden sequences, right click on the
+Sequence ID and in the context menu select {\sl Reveal All}.}
+{\bf See the video at:  \url{http://www.jalview.org/training/Training-Videos}.}
+}
+
 
-Pressing the [$\leftarrow$] or [$\rightarrow$] arrow keys when one or more sequences are selected will ``slide'' the selected sequences to the left or right (respectively).      
 
-\subsubsection{Undoing edits}
-Jalview supports the undoing of edits via the {\sl Edit $\Rightarrow$ Undo Edit} alignment window menu option. Each editing action is stored and can be reversed in sequence. Colouring of the alignment is not reversible via the {\sl Undo} option.  
+\section{Introducing and Removing Gaps}
+The alignment view provides an interactive editing interface, allowing gaps to be inserted or deleted to the left of any position
+in a sequence or sequence group. Alignment editing can only be performed whilst in keyboard editing mode (entered by pressing [F2])
+ or by clicking and dragging residues with the mouse when [SHIFT], [CTRL] or [CMD] (Mac) is held down (which differs from earlier versions of Jalview).
 
+
+\subsection{Undoing Edits}
+Alignment edits can be undone {\sl via} the {\sl Edit $\Rightarrow$ Undo Edit}
+alignment window menu option, or [CTRL]-Z. An edit, if undone, may be re-applied
+with {\sl Edit $\Rightarrow$ Redo Edit}, or [CTRL]-Y. Note, however, that the
+{\sl Undo} function only works for edits to the alignment or sequence ordering.
+Colouring of the alignment, showing and hiding of sequences or modification of
+annotation that only affect the alignment's display cannot
+be undone.
+
+\subsection{Locked Editing}
+\label{lockededits}
+The Jalview alignment editing model is different to that used in other alignment
+editors. Because edits are restricted to the insertion and deletion of gaps to the left of a particular sequence position, 
+editing has the effect of shifting the rest of the sequence(s) being edited down or up-stream with respect to the rest of 
+alignment. The {\sl Edit $\Rightarrow$ Pad Gaps} option can be enabled to eliminate `ragged edges' at the end of the alignment, 
+but does not avoid the `knock-on' effect which is sometimes undesirable. 
+However, its effect can be limited by performing the edit within a selected region. 
+In this case, gaps will only be removed or inserted within the selected region. 
+Edits are similarly constrained when they occur adjacent to a hidden column.
+
+\subsection{Introducing Gaps in a Single Sequence}
+To introduce a gap, first select the sequence in the sequence ID panel and
+then place the cursor on the residue to the immediate right of where the gap
+should appear. Hold down the [SHIFT] key and the left mouse button, then drag the sequence to the right until the required number of gaps 
+has been inserted.
+
+One common error is to forget to hold down [SHIFT]. This results in a selection which is one sequence high and one residue long. 
+Gaps cannot be inserted in such a selection. The selection can be cleared and editing enabled by pressing the [ESC] key.
+
+\subsection{Introducing Gaps in all Sequences of a Group}
+To insert gaps in all sequences in a selection or group, select the
+required sequences in the sequence ID panel and then place the mouse cursor on
+any residue in the selection or group to the immediate right of the position in which a gap should appear. Hold down the [CTRL] key 
+and the left mouse button, then drag the sequences to the right until the required number of gaps has appeared.
+
+Gaps can be removed by dragging the residue to the immediate right of the gap
+leftwards whilst holding down [SHIFT] (for single sequences) or [CTRL] (for a group of sequences).
+
+\subsection{Sliding Sequences}
+Pressing the [$\leftarrow$] or [$\rightarrow$] arrow keys when one or more
+sequences are selected will ``slide'' the entire selected sequences to the left
+or right (respectively). Slides occur regardless of the region selection -
+which, for example, allows you to easily reposition misaligned subfamilies
+within a larger alignment.
 % % better idea to introduce hiding sequences, and use the invert selection, hide
 % others, to simplify manual alignment construction
-\exercise{Editing alignments}{
-\label{mousealedit}
-\exstep{ Load the URL
-\textsf{http://www.jalview.org/tutorial/unaligned.fa} which contains part of the
-ferrodoxin alignment from PF03460.
 
- You are going to manually reconstruct the alignment that jalview loads by
- default. Remember to use [CTRL]+Z to undo an edit, or the {\tr File $\LeftArrow$
+
+
+\subsection{Editing in Cursor Mode}
+Gaps can be easily inserted when in cursor mode (toggled with [F2]) by
+pressing [SPACE]. Gaps will be inserted at the cursor, shifting the residue
+under the cursor to the right. To insert {\sl n} gaps type {\sl n} and then
+press [SPACE]. To insert gaps into all sequences of a group, use [CTRL]-[SPACE]
+or [SHIFT]-[SPACE] (both keys held down together).
+
+Gaps can be removed in cursor mode by pressing [BACKSPACE]. First make sure you
+have everything unselected by pressing [ESC]. The gap under the cursor will be
+removed. To remove {\sl n} gaps, type {\sl n} and then press [BACKSPACE]. Gaps
+will be deleted up to the number specified. To delete gaps from all sequences of
+a group, press [CTRL]-[BACKSPACE] or [SHIFT]-[BACKSPACE] (both keys held down
+together). Note that the deletion will only occur if the gaps are in the same
+columns in all sequences in the selected group, and those columns are to the
+right of the selected residue.
+
+
+\exercise{Editing Alignments}
+  %\label{mousealedit}
+% TODO: VERIFY FOR 2.6.1 and 2.7 - NUMBERING/INSTRUCTIONS APPEAR OFF
+{
+\label{editingalignex}
+You are going to manually reconstruct part of the example Jalview
+alignment available at
+ \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. }
+
+Remember to use [CTRL]-Z to undo an edit, or the {\sl File $\Rightarrow$
  Reload } function to revert the alignment back to the original version if you
  want to start again.
- }
 
-\exstep{ Select the first 7 sequences, and press H to hide them (or right click
-on the sequence IDs to open the sequence ID popup menu, and select {\tr Hide
-Sequences}). }
+\exstep{ Load the URL
+\textsf{http://www.jalview.org/tutorial/unaligned.fa} which contains part of the
+ferredoxin alignment from PF03460.}
+
+\exstep{ Select the first 7 sequences, and press H key to hide them (or right click
+on the sequence IDs to open the sequence ID context menu, and select {\sl Hide
+Sequences}).}
 
 \exstep{ Select FER3\_RAPSA and FER\_BRANA. Slide the sequences to
-the left so the initial {\bf A} lies at column 57 using the $\Rightarrow$ key.}
+the right so the initial residue A lies at column 57 using the $\rightarrow$
+key.}
 
 \exstep{ Select FER1\_SPIOL, FER1\_ARATH, FER2\_ARATH, Q93Z60\_ARATH and
-O80429\_MAIZE (Hint: press [CTRL]-I to invert the sequence selection and then
-deleset FER1\_MAIZE), and use the $\Rightarrow$ key to slide them to so they
-begin at column 5 of the alignment view.} 
+O80429\_MAIZE
 
-\exstep{ Select all the visible
-sequences in the block by pressing [CTRL]-A. Insert a single gap in all selected
-sequences at column 38 by holding [CTRL] and clicking on the R in FER1\_SPIOL and
-dragging one column to right. Insert another gap at column 47 in all sequences in
-the same way.}
+{\sl Hint: you can do this by pressing [CTRL]-I to invert the sequence selection and then
+deselect FER1\_MAIZE), and use the $\rightarrow$ key to slide them to so they
+begin at column 5 of the alignment view.}} 
 
-\exstep{ Correct the feredoxin domain alignment for FER1\_SPIOL by
-insert two additional gaps after the gap at column 47: hold [SHIFT] and click and
-drag on the G and move it two columns to the right.}
+\exstep{ Select all the visible
+sequences (those not hidden) in the block by pressing [CTRL]-A.
+Insert a single
+gap in all selected sequences at column 38 of the alignment by holding [CTRL]
+and clicking on the residue R at column 38 in the FER1\_SPIOL, then drag one
+column to right.
+Insert another gap at column 47 in all sequences in the same way.}
+
+\exstep{ Correct the ferredoxin domain alignment for FER1\_SPIOL by
+inserting two additional gaps after the gap at column 47. First press [ESC] to
+clear the selection, then hold [SHIFT] and click and drag on the G and move it
+two columns to the right.}
 
 \exstep{ Now complete the
-alignment of FER1\_SPIOL with a {\bf locked edit} by pressing [ESC] and select
+alignment of FER1\_SPIOL with a locked edit by pressing [ESC] and select
 columns 47 to 57 of the FER1\_SPIOL row. Move the mouse onto the G at column 50,
-hold [SHIFT] and drag the G to the left by one column to insert a gap at column
-57.}
+hold [SHIFT] and drag the G in column 47 of FER1\_SPIOL to the left by one
+column to insert a gap at column 57.}
 
-\exstep{ In the next two steps you will complete the alignment of the last two sequences.
+\exstep{ In the next two steps you will complete the alignment of the last two 
+sequences.
 
 Select the last two sequences (FER1\_MAIZE and O80429\_MAIZE), then press [SHIFT]
 and click and drag the initial methionine of O80429\_MAIZE 5 columns to the right
-so it lies at column 10. Keep holding [SHIFT] and click and drag to insert
-another gap at the proline at column 25 (16P). Remove the gap at
+so it lies at column 10.
+
+Keep holding [SHIFT] and click and drag to insert
+another gap at the proline at column 25 (25C in cursor mode). Remove the gap at
 column 44, and insert 4 gaps at column 47 (after AAPM).}
 
 \exstep{ Hold [SHIFT] and drag the I at column 39 of FER1\_MAIZE 2 columns to the
-right. Remove the gap at FER1\_MAIZE column 49 by [SHIFT]+click and drag left by
-one column. Insert three gaps in FER1\_MAIZE at column 47 by holding [SHIFT] and
-click and drag the S in FER1\_MAIZE to the right by three columns. Finally,
+right. Remove the gap at FER1\_MAIZE column 49 by [SHIFT]-click and drag left by
+one column. Press [ESC] to clear the selection, and then insert three gaps in
+FER1\_MAIZE at column 47 by holding [SHIFT] and click and drag the S in FER1\_MAIZE to the right by three columns. Finally,
 remove the gap in O80429\_MAIZE at column 56 using [SHIFT]-drag to the left on
-42R.}
+56C.}
 
 \exstep{ Use the
-{\sl Edit $\Rightarrow$ Undo Edit} and {\sl Edit $\Rightarrow$ Redo Edit} menu option to step backwards and replay the
-edits you have made} 
+{\sl Edit $\Rightarrow$ Undo Edit} and {\sl Edit $\Rightarrow$ Redo Edit} menu
+option, or their keyboard shortcuts ([CTRL]-Z and [CTRL]-Y) to step 
+backwards and replay the edits you have made.}
 }
 
-\subsubsection{Editing in Cursor mode}
 
-Gaps can be be easily inserted when in cursor mode (toggled with [F2]) by pressing [SPACE]. Gaps will be inserted at the cursor, pushing the residue under the cursor to the right. To insert {\sl n} gaps type {\sl n} and then press [SPACE]. To insert gaps into all sequences of a group, use [CTRL]-[SPACE] or [SHIFT]-[SPACE] (both keys held down together).
-
-Gaps can be removed in cursor mode by pressing [BACKSPACE]. The gap under the cursor will be removed. To remove {\sl n} gaps, type {\sl n} and then press [BACKSPACE]. Gaps will be deleted up to the number specified. To delete gaps from all sequences of a group, use [CTRL]-[BACKSPACE] or [SHIFT]-[BACKSPACE] (both keys held down together).
-
-\exercise{Keyboard edits}{
-\exstep{Load the sequence alignment at \textsf{http://www.jalview.org/tutorial/unaligned.fa}, or continue using the edited alignment from exercise \ref{mousealedit}.  If you continue from the previous exercise, then first right click on the sequence ID panel and select {\tr Reveal All}.
-
-Now, enter cursor mode by pressing [F2]}
-\exstep{Insert 58 gaps at the start of the first sequence (FER\_CAPAA). Press {\sl 58} then {\sl [SPACE]}. }
-\exstep{Go down one sequence and select rows 2-5 as a block. Click on the second sequence ID (FER\_CAPAN). Hold down shift and click on the fifth (FER1\_PEA). }
-\exstep{Insert 6 gaps at the start of this group. Go to column 1 row 2 by typing {\sl 1,2} then pressing {\sl [RETURN]}. Now insert 6 gaps. Type {\sl 6} then hold down [CTRL] and press the space bar.}
-\exstep{Now insert one gap at column 34 and another at 38. Insert 3 gaps at 47. Press {\sl 3 4 C} then [CTRL]-[SPACE].  Press {\sl 3 8 C} then [CTRL]-[SPACE]. Press {\sl 4 7 C} then {\sl 3 [CTRL-SPACE]} the first through fourth sequences are now aligned.} 
-\exstep{The fifth sequence (FER1\_PEA) is poorly aligned. We will delete some gaps and add some new ones. Navigate to the start of sequence 5 and delete 3 gaps. Press {\sl 1 , 5 [RETURN]} then {\sl 3 [BACKSPACE]} to delete three gaps. Go to column 31 and delete the gap. Press {\sl 3 1 C [BACKSPACE]} .}
-\exstep{ Similarly delete the gap now at column 34, then insert two gaps at column 38 . Press {\sl 3 4 C [BACKSPACE]  3 8 C  2 [SPACE]}. Delete three gaps at 44 and insert one at 47 by pressing {\sl 4 4 C 3 [BACKSPACE] 4 7 C [SPACE]}.  The top five sequences are now aligned.}
-}
-\r\section{Colouring sequences}
+\exercise{Keyboard Edits}
+{
+\label{keyboardsex}
+This continues on from the previous exercise, and recreates the final part of the example ferredoxin
+alignment from the unaligned sequences using Jalview's keyboard editing mode.
+
+{\bf Window users:} Please {\em only use} [SHIFT]-[SPACE] in this
+exercise.
+
+{\bf Mac users:} [CTRL]-[SPACE] can also be used instead of [SHIFT]-[SPACE].
+
+\exstep{Load the sequence alignment at
+\textsf{http://www.jalview.org/tutorial/unaligned.fa}, or continue using the
+edited alignment.  If you continue from the
+previous exercise, first right click on the sequence ID panel and select
+{\sl Reveal All}. Enter cursor mode by pressing [F2] (or [Fn]-[F2] (Mac)).}
+% TODO: BACKSPACE or DELETE WHEN SEQS ARE SELECTED WILL DELETE ALL SEQS JAL-783
+
+\exstep{Insert 58 gaps at the start of the sequence 1 (FER\_CAPAA). Press
+{\sl 58} then {\sl [SPACE]}. }
+
+\exstep{Go down one sequence and select rows 2-5 as a block. Click on the second sequence ID (FER\_CAPAN).
+ Hold down shift and click on the fifth (FER1\_PEA). }
+
+\exstep{Insert 6 gaps at the start of this group. Go to column 1 row 2 by typing
+{\sl 1,2} then press {\sl [RETURN]}. Now insert 6 gaps in all the sequences.
+Type {\sl 6} then hold down {\sl [SHIFT]} and press {\sl [SPACE]}.}
+\exstep{Now insert one gap at column 34 and another at 38. Insert 3 gaps at 47.
+Press {\sl 34C} then {\sl [SHIFT]-[SPACE]}.  Press {\sl 38C} then
+[SHIFT]-[SPACE].
+Press {\sl 47C} then {\sl 3 [SHIFT-SPACE]} the first through fourth sequences
+are now aligned.}
+\exstep{The fifth sequence (FER1\_PEA) is poorly aligned. We will delete some gaps and add some new ones. Press {\sl [ESC]} to clear the selection. Navigate to the start of sequence 5 and delete 3 gaps. Press {\sl 1,5 [RETURN]} then {\sl 3 [BACKSPACE]} to delete three gaps. Go to column 31 and delete the gap. Press {\sl 31C [BACKSPACE]} .}
+\exstep{ Similarly delete the gap now at column 34, then insert two gaps at
+column 38.
+Press {\sl 34C [BACKSPACE]  38C 2 [SPACE]}. Delete three gaps at column 44 and
+insert one at column 47 by pressing {\sl 44C 3 [BACKSPACE] 47C [SPACE]}.  The top five sequences are 
+now aligned.}}
+
+
+\chapter{Colouring Sequences and Figure Generation}
+\label{colouringfigures}
+\section{Colouring Sequences}
 \label{colours}
 
-Colouring sequences is a key aspect of alignment presentation. Jalview allows both for colouring of the whole alignment and colouring of selections/groups. 
-
-Under the Jalview 2 display model, all alignment colour schemes are rendered {\sl below} any colours arising from sequence features (which are described in Section \ref{featannot}). Feature display is toggled with {\sl View $\Rightarrow$ Show Features} option.
+Colouring sequences is a key aspect of alignment presentation. Jalview allows
+you to colour the whole alignment, or just specific groups. Alignment and
+group colours are rendered
+{\bf below} any other colours, such as those arising from sequence features
+(these are described in Section \ref{featannot}). This means that if you
+try to apply one of the colourschemes described in this section, and nothing
+appears to happen, it may be that you have sequence feature annotation
+displayed, and you may have to disable it using the {\sl View $\Rightarrow$
+Show Sequence Features} option before you can see your colourscheme.
 
-There are two main types of colouring styles: simple static residue colourschemes and dynamic schemes which use conservation and consensus analysis to control colouring. A hybrid colouring is also possible, where static residue schemes are modified using a dynamic scheme. The individual schemes are described in Section \ref{colscheme} below.
+There are two main types of colouring styles: {\bf simple static residue}
+colourschemes and {\bf dynamic schemes} which use conservation and consensus
+analysis to control colouring. {\bf Hybrid colouring} is also possible, where
+static residue schemes are modified using a dynamic scheme. The individual schemes are described in Section \ref{colscheme}.
 
-\subsection{Colouring the whole alignment}
+\subsection{Colouring the Whole Alignment}
 
-\parbox[c]{3.75in}{The alignment can be coloured via the {\sl Colour} menu option in the alignment window. Selecting the colour scheme causes all residues to be coloured. The menu is divided into three sections. The first section gives options for the behaviour of the menu options, the second lists static and dynamic colourschemes available for selection. The last gives options for making hybrid colourschemes using conservation shading or colourscheme thresholding. 
+\parbox[c]{3.75in}{The alignment can be coloured {\sl via} the {\sl Colour} menu option in the alignment window. Selecting the colour scheme causes all residues to be coloured. The menu is divided into three sections. The first section gives options for the behaviour of the menu options, the second lists static and dynamic colourschemes available for selection. The last gives options for making hybrid colourschemes using conservation shading or colourscheme thresholding. 
 
 }\parbox[c]{3in}{
 \centerline {
@@ -768,64 +1394,97 @@ There are two main types of colouring styles: simple static residue colourscheme
 }
 }
 
-\subsection{Colouring a group or selection}
+\subsection{Colouring a Group or Selection}
 
-Selections or groups can be coloured in two ways. The first is via the Alignment Window's {\sl Colour} menu, after first ensuring that the Apply to all groups flag is not selected. This must be turned off specifically as it is on by default.
+Selections or groups can be coloured in two ways. The first is {\sl via} the Alignment Window's {\sl Colour} menu as stated above,
+ after first ensuring that the {\sl Apply Colour To All Groups} flag is {\bf
+ not} selected.
+ This must be turned {\bf off} specifically as it is {\bf on} by default. 
+ When unticked, selections from the Colours menu will only change the colour for residues in the current selection, 
+ or the alignment view's ``background colourscheme'' when no selection exists.
 
-The second method is to use the  {\sl Selection $\Rightarrow$ Group $\Rightarrow$ Group Colour}  context menu option obtained by right clicking on the group (Figure \ref{colgrp}). 
+The second method is to select sequences and right click mouse to open pop-up
+menu and select {\sl Selection $\Rightarrow$ Edit New Group $\Rightarrow$ Group
+Colour} from context menu options
+(Figure \ref{colgrp}). This only changes the colour of the current selection or group.
 
 \begin{figure}[htbp]
 \begin{center}
+%TODO update group_col.pdf to show latest jalview group edit submenu
 \includegraphics[width=4in]{images/group_col.pdf}
 \caption{{\bf Colouring a group via the context menu.}}
 \label{colgrp}
 \end{center}
 \end{figure}
 
-\subsection{Shading by conservation}
-For many colour schemes, the intensity of the colour in a column can be scaled by the degree of amino acid property conservation. Selecting {\sl Colour $\Rightarrow$ By Conservation} brings up a selection box (the {\sl Conservation Threshold dialog box}) allowing the alignment colouring to be modified. Selecting a higher value limits colouring to more highly conserved columns (Figure \ref{colcons}).
+\subsection{Shading by Conservation}
+For many colour schemes, the intensity of the colour in a column can be scaled
+by the degree of amino acid property conservation. Selecting {\sl Colour
+$\Rightarrow$ By Conservation} enables this mode, and {\sl Modify
+Conservation Threshold...} brings up a selection box (the {\sl Conservation
+Colour Increment} dialog box) allowing the alignment colouring to be modified.
+Selecting a higher value limits colouring to more highly conserved columns (Figure \ref{colcons}).
 
  \begin{figure}[htbp]
 \begin{center}
 \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}
 \end{figure}
 
-\subsection{Thresholding by percentage identity}
+\subsection{Thresholding by Percentage Identity}
 
-'Thresholding' is another hybrid colour model where a residue is only coloured if it is not excluded by an applied threshold. Selecting {\sl Colour $\Rightarrow$ Above Identity Threshold} brings up a selection box with a slider controlling the minimum percentage identity threshold to be applied. Selecting a higher threshold (by sliding to the right) limits the colouring to columns with a higher percentage identity (as shown by the Consensus histogram in the annotation panel). 
+`Thresholding' is another hybrid colour model where a residue is only coloured
+if it is not excluded by an applied threshold. Selecting {\sl Colour $\Rightarrow$ Above Identity Threshold} brings up a selection box with a slider controlling the minimum percentage identity threshold to be applied. Selecting a higher threshold (by sliding to the right) limits the colouring to columns with a higher percentage identity (as shown by the Consensus histogram in the annotation panel).
 
 \subsection{Colouring by Annotation}
-\parbox[c]{3in}{
-Any of the quantitative annotations shown on an alignment can be used to threshold or shade the whole alignment\footnote{Please remember to turn off Sequence Feature display to see the shading}. The {\sl Colour $\Rightarrow$ By Annotation} options opens a dialog which allows you to select which annotation to use, the minimum and maximum shading colours or whether an existing colouring is to be thresholded.
+\label{colourbyannotation}
+\parbox[c]{3.2in}{
+Any of the {\bf quantitative} annotations shown on an alignment can be used to
+threshold or shade the whole alignment.\footnote{Please remember to turn off
+Sequence Feature display to see the shading} 
+
+The {\sl Colour $\Rightarrow$ By
+Annotation} option opens a dialog which allows you to select which annotation
+to use, the minimum and maximum shading colours or whether the original
+colouring should be thresholded (the `Use original colours' option).
+
+Default settings for minimum and maximum colours can be set in the Jalview
+Desktop's preferences.  
 }\parbox[c]{3in}{
-\centerline{\includegraphics[width=2.5in]{images/col_byannot.pdf}}}
-\subsection{Colour schemes} 
+\centerline{\includegraphics[width=2.8in]{images/col_byannot.pdf}}}
+
+The {\bf per Sequence} option in the {\bf Colour By Annotation} dialog
+allows each sequence to be shaded according to sequence associated annotation
+rows, such as protein disorder scores. This functionality is described further
+in Section \ref{protdisorderpred}.
+
+\subsection{Colour Schemes} 
 
 \label{colscheme}
 Full details on each colour scheme can be found in the Jalview on-line help. A brief description of each one is provided below:
 
-\subsubsection{ClustalX}
+\subsubsection{Clustalx}
 
 
- \parbox[c]{3.5in}{This is an emulation of the default colourscheme used for alignments in Clustal X, a graphical interface for the ClustalW multiple sequence alignment program. Each residue in the alignment is assigned a colour if the amino acid profile of the alignment at that position meets some minimum criteria specific for the residue type. }
+ \parbox[c]{3.5in}{This is an emulation of the default colourscheme used for alignments in ClustalX, a graphical interface for the ClustalW multiple sequence alignment program. Each residue in the alignment is assigned a colour if the amino acid profile of the alignment at that position meets some minimum criteria specific for the residue type. }
 \parbox[c]{3in}{\includegraphics[width=2.75in]{images/col_clustalx.pdf}}
 
-\subsubsection{Blosum62}
+\subsubsection{Blosum62 Score}
 
-\parbox[c]{3.5in}{Gaps are coloured white. If a residue matches the consensus sequence residue at that position it is coloured dark blue. If it does not match the consensus residue but the Blosum 62 matrix gives a positive score, it is coloured light blue.}
+\parbox[c]{3.5in}{Gaps are coloured white. If a residue matches the consensus sequence residue at that position it is coloured dark blue. If it does not match the consensus residue but the Blosum62 matrix gives a positive score, it is coloured light blue.}
 \parbox[c]{3in}{
 \includegraphics[width=2.75in]{images/col_blosum62.pdf}
 }
 
 \subsubsection{Percentage Identity}
 \parbox[c]{3.5in}{
-The Percent Identity  option colours the residues (boxes and/or text) according to the percentage of the residues in each column that agree with the consensus sequence. Only the residues that agree with the consensus residue for each column are coloured.
+The Percentage Identity option colours the residues (boxes and/or text) according to the percentage of the residues in each column that agree with the consensus sequence. Only the residues that agree with the consensus residue for each column are coloured.
 }
 \parbox[c]{3in}{
 \includegraphics[width=2.75in]{images/col_percent.pdf}
@@ -833,7 +1492,8 @@ The Percent Identity  option colours the residues (boxes and/or text) according
 
 \subsubsection{Zappo}
 \parbox[c]{3.5in}{
-The residues are coloured according to their physicochemical properties. The physicochemical groupings are Aliphatic/hydrophobic, Aromatic, Positive, Negative, Hydrophillic, conformationally special, and Cyst(e)ine.
+The residues are coloured according to their physicochemical properties. The physicochemical groupings are Aliphatic/hydrophobic, Aromatic, 
+Positive, Negative, Hydrophillic, Conformationally special, and Cyst(e)ine.
 }
 \parbox[c]{3in}{
 \includegraphics[width=2.75in]{images/col_zappo.pdf}
@@ -842,7 +1502,8 @@ The residues are coloured according to their physicochemical properties. The phy
 \subsubsection{Taylor}
 
 \parbox[c]{3.5in}{
-This colour scheme was devised by Willie Taylor and an entertaining description of it's origin can be found in Protein Engineering, Vol 10 , 743-746 (1997)
+This colour scheme was devised by Willie Taylor and an entertaining description of its origin can be found in Protein Engineering, 
+Vol 10 , 743-746 (1997).
 }
 \parbox[c]{3in}{
 \includegraphics[width=2.75in]{images/col_taylor.pdf}
@@ -894,79 +1555,156 @@ The residues are coloured according to their Chou-Fasman\textsuperscript{\ref{ch
  
 
 \subsubsection{Nucleotide}
-\parbox[c]{3.5in}{
-Residues are coloured with four colours corresponding to the four nucleotide bases. All non ACTG residues are uncoloured. See Section \ref{workingwithnuc} for further information about working with nucleic acid sequences and alignments.
-}
-\parbox[c]{3in}{
-\includegraphics[width=2.75in]{images/col_nuc.pdf}
-}
-
-
-
-\exercise{Colouring Alignments}{ 
-\exstep{
-Open a sequence alignment, for example the PFAM domain PF03460. Select the alignment menu option {\sl Colour $\Rightarrow$ ClustalX}. Note the colour change. Now try all the other colour schemes in the {\sl Colour} menu. Note that some colour schemes do not colour all residues.
-}
-\exstep{
-Colour the alignment using {\sl Colour  $\Rightarrow$ Blosum62}. Select a group of around 4 similar sequences. Use the context menu (right click on the group) option {\sl Selection $\Rightarrow$ Group $\Rightarrow$ Group Colour $\Rightarrow$ Blosum62} to colour the selection. Notice how some residues which were not coloured are now coloured. The calculations performed for dynamic colouring schemes like Blosum62 are based on the group being coloured, not the whole alignment (this also explains the colouring changes observed in the group selection exercise step \ref{exselectgrpcolour}).
-}
-\exstep{
-Keeping the same selection as before, colour the complete alignment using {\sl Colour  $\Rightarrow$ Taylor}. Select the menu option  {\sl Colour  $\Rightarrow$ By Conservation}. Slide the selector from side to side and observe the changes in the alignment colouring in the selection and in the complete alignment. 
-}
-}
+\parbox[c]{3.5in}{ Residues are coloured with four colours corresponding to the
+four nucleotide bases. All non ACTG residues are uncoloured. See Section
+\ref{workingwithnuc} for further information about working with nucleic acid
+sequences and alignments.
+} \parbox[c]{3in}{ \includegraphics[width=2.75in]{images/col_nuc.pdf} }
+
+\subsubsection{Purine/Pyrimidine}
+\parbox[c]{3.5in}{ Residues are coloured according to whether the corresponding
+nucleotide bases are purine (magenta) or pyrimidine (cyan) based. All non ACTG
+residues are uncoloured. For further information about working with nucleic acid
+sequences and alignments, see Section \ref{workingwithnuc}.
+%and Section \ref{workingwithrna}
+
+} \parbox[c]{3in}{ \includegraphics[width=2.75in]{images/col_purpyr.pdf} }
+
+\subsubsection{By RNA Helices}
+\parbox[c]{3.5in}{ Columns are coloured according to their assigned RNA helix as
+defined by a secondary structure annotation line on the alignment. Colours for
+each helix are randomly assigned, and option only available when an RNA
+secondary structure row is present on the alignment. 
+% For more details see Section \ref{workingwithrna} 
+} \parbox[c]{3in}{
+\includegraphics[width=2.75in]{images/col_rnahelix.pdf} }
 
 \subsubsection{User Defined}
-This dialogue allows the user to create any number of named colour schemes at will. Any residue may be assigned any colour. The colour scheme can then be named. If you save the colour scheme, this name will appear on the Colour menu
+This dialog allows the user to create any number of named colour schemes at
+will. Any residue may be assigned any colour. The colour scheme can then be
+named. If you save the colour scheme, this name will appear on the Colour menu
+(Figure \ref{usercol}).
 
 
 \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 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}
 
-
-\exercise{User defined colour schemes}{
-\exstep{Load a sequence alignment. Select the alignment menu option {\sl Colour $\Rightarrow$ User Defined}. A dialogue window will open.
+\exercise{Colouring Alignments}{
+\label{color}
+Note: Ensure that the {\sl Apply Colour
+To All Groups} flag is not selected in {\sl Colour} menu in the alignment window.
+% patch needed for 2.10 This must be turned {\sl off} specifically as it is on
+% by default.
+
+\exstep{Open a sequence alignment, for example the PFAM domain PF03460 in PFAM
+seed database. Select the alignment menu option {\sl Colour $\Rightarrow$
+Clustalx} and note the colour change. Now try all the other colour schemes in the {\sl Colour} menu. 
+Note that some colour schemes do not colour all residues.}
+\exstep{Colour the alignment using {\sl Colour  $\Rightarrow$ Blosum62 score}. Select a group
+of around 4 similar sequences. Use the context menu (right click on the group)
+option {\sl Selection $\Rightarrow$ Edit New Group $\Rightarrow$ Group Colour
+$\Rightarrow$ Blosum62 score} to colour the selection. Notice how some residues which
+were not coloured are now coloured. The calculations performed for dynamic
+colouring schemes like Blosum62 are based on the selected group,
+not the whole alignment. (This also explains the colouring changes observed in exercise
+\ref{exselect} during the group selection step).}
+\exstep{Keeping the same selection as before, colour the complete alignment except
+the group using {\sl Colour  $\Rightarrow$ Taylor}.
+Select the menu option  {\sl Colour  $\Rightarrow$ By Conservation}. 
+Slide the selector in the Conservation Colour Increment dialog box from side
+to side and observe the changes in the alignment colouring in the selection and in the complete alignment.}
+Note: Feature colours overlay residue colouring. The features colours can be
+toggled off by going to {\sl View  $\Rightarrow$ Show Sequence Features}.
+
+{\bf See the video at: \url{http://www.jalview.org/training/Training-Videos}.}
 }
-\exstep{Click on an amino acid button, then select a colour for that amino acid. Repeat till all amino acids are coloured to your liking.
-}
-\exstep{ Insert a name in the appropriate field and click {\sl Save Scheme}. You will be prompted for a file name in which to save the colour scheme. The dialogue window can now be closed.
-}
-\exstep{
-The new colour scheme appears in the list of colour schemes in the {\sl Colour} menu and can be selected in future Jalview sessions.
-}
-}
-\r\section{Alignment formatting and graphics output}
+
+
+\exercise{User Defined Colour Schemes}{
+\label{colouex}
+\exstep{Load a sequence alignment PF03460 from the PFAM
+seed database. Ensure that the {\sl Colour  $\Rightarrow$
+None} is selected. Select the alignment menu option {\sl Colour $\Rightarrow$
+User Defined}.
+A dialog window will open.}
+\exstep{Click on an amino acid button, then select a colour for that amino acid. Repeat till all amino acids are coloured to your liking.}
+\exstep{ Insert a name for the colourscheme in the appropriate field and click {\sl Save Scheme}. You will be prompted for a file name in which to save the colour scheme. The dialog window can now be closed.}
+\exstep{The new colour scheme appears in the list of colour schemes in the {\sl Colour} menu and can be selected in future Jalview sessions.
+
+{\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}} }
+
+\exercise{Alignment Layout}{
+\label{exscreen}
+\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. }
+\exstep{Hide all the annotation rows by toggling {\sl Annotations $\Rightarrow$
+Show Annotations} from the alignment window menu. Reveal the annotations by selecting the same menu option.} \exstep{Deselect {\sl Format $\Rightarrow$ Wrap}. Right click on the
+annotation row labels to bring up the context menu, then select {\sl
+Hide This Row}. Bring up the context menu again and select {\sl
+Show All Hidden Rows} to reveal them.}
+\exstep{Annotations can be reordered by clicking on the annotations name and
+dragging the row to the desired position. Click on the {\sl Consensus} row and drag it upwards to just above {\sl Quality}. 
+The rows should now be reordered. Features and annotations are covered in more detail in Section \ref{featannot}.}
+\exstep{Move the mouse to the top left hand corner of the annotation labels - 
+a up/down arrow symbol should appear - when this is shown, the height of the {\sl Annotation Area} can be changed 
+by clicking and dragging this icon up or down.}
+\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
+
+\section{Formatting and Graphics Output}
 \label{layoutandoutput}
-Jalview is a WYSIWIG alignment editor. This means that for most kinds of graphics output, the layout that is seen on screen will be the same as what is output in an exported graphics file. It is therefore important to pick the right kind of display layout prior to generating figures. 
+Jalview is a WYSIWIG alignment editor. This means that for most kinds of graphics output, 
+the layout that is seen on screen will be the same as what is outputted in an
+exported graphics file.
+It is therefore important to pick the right kind of display layout prior to generating figures. 
 
 \subsection{Multiple Alignment Views}
 
-Jalview is able to create multiple independent visualizations of the same underlying alignment - these are called {\tr Views}. Because each view displays the same underlying data, any edits performed in one view will update the alignment or annotation visible in all views.
+Jalview is able to create multiple independent visualizations of the same underlying alignment - these are called {\bf Views}. 
+Because each view displays the same underlying data, any edits performed in one view will update the alignment or annotation visible in all views.
 
-\parbox[c]{4in}{Alignment views are created using the {\tr View $\Rightarrow$ New View} option of the alignment window. This will create a new view with the same groups, alignment layout and display options as the current one. Views may be gathered (by pressing G) together as named tabs on the alignment window, or displayed simultaneously in their own window (by pressing X).}\parbox[c]{2.75in}{
+\parbox[c]{4in}{Alignment views are created using the {\sl View $\Rightarrow$
+New View} option of the alignment window or by pressing [CTRL]-T.
+This will create a new view with the same groups, alignment layout and display options as the current one. 
+Pressing G key will gather together Views as named tabs on the alignment window, and pressing X key will expand gathered Views so they can be viewed 
+simultaneously in their own separate windows.} \parbox[c]{2.75in}{
 \begin{center}\centerline{
 \includegraphics[width=2.5in]{images/mulv_tabs.pdf}}
 \end{center}
 }
 
+To delete a view, press [CTRL]-W (or [CMD]-W (Mac)).
+To rename a view, right click the view's name, this open the Enter View Name dialogue box, enter the desired name.
 % JBPNote make an excercise on views ?
 
-\subsection{Alignment layout}
-Jalview provides two screen layout modes, unwrapped (the default) where the alignment is in one long line across the window, and wrapped, where the alignment is on multiple lines, each the width of the window. Most layout options are controlled by the Format menu option in the alignment window, and control the overall look of the alignment in the view (rather than just a selected region).
-\subsubsection{Wrapped alignments}
-Wrapped alignments can be toggled on and off using the {\sl Format $\Rightarrow$ Wrap} menu option (Figure \ref{wrap}). Note that the annotation lines are also wrapped. Wrapped alignments are great for publications and presentations but are of limited use when working with large numbers of sequences. Furthermore, alignment annotation (see Section \ref{featannot}) cannot be interactively created or edited in wrapped mode, and selection of large regions is difficult.
+\subsection{Alignment Layout}
+Jalview provides two screen layout modes, unwrapped (the default) where the alignment is in one long line across the window, and wrapped, 
+where the alignment is on multiple lines, each the width of the window. Most layout options are controlled by the Format menu option in the 
+alignment window, and control the overall look of the alignment in the view (rather than just a selected region).
+
+\subsubsection{Wrapped Alignments}
+Wrapped alignments can be toggled on and off using the {\sl Format $\Rightarrow$ Wrap} menu option (Figure \ref{wrap}). Note that 
+the annotation tracks are also wrapped. Wrapped alignments are great for publications and presentations but are of limited use when 
+working with large numbers of sequences. 
+
+If annotations are not all visible in wrapped mode, expand the alignment window to view them. Note that alignment annotation 
+(see Section \ref{featannot}) cannot be interactively created or edited in wrapped mode, and selection of large regions is difficult. 
 \begin{figure}[htbp]
 \begin{center}
-% this view still refers to Jalview 2.2 and the menu is missing the Center Columns option
 \parbox[c]{2in}{\includegraphics[width=2in]{images/wrap1.pdf}}
 \parbox[c]{4in}{\includegraphics[width=4in]{images/wrap2.pdf}}
-\caption{{\bf Wrapping the alignment}}
+\caption{{\bf Wrapping the alignment.}}
 \label{wrap}
 \end{center}
 \end{figure}
@@ -974,205 +1712,1023 @@ Wrapped alignments can be toggled on and off using the {\sl Format $\Rightarrow$
 
 \subsubsection{Fonts}
 
-\parbox[c]{4in}{The text appearance in a view can be modified via the {\sl Format $\Rightarrow$ Font\ldots} alignment window menu. This setting applies for all alignnment and annotation text except for that displayed in tool-tips. Additionally, font size and spacing can be adjusted rapidly by clicking the middle mouse button and dragging across the alignment window.}
+\parbox[c]{4in}{The text appearance in a view can be modified {\sl via} the {\sl Format $\Rightarrow$ Font\ldots} alignment window menu. This setting 
+applies for all alignment and annotation text except for that displayed in tool-tips. Additionally, font size and spacing can be adjusted rapidly by 
+clicking the middle mouse button and dragging across the alignment window.}
 \parbox[c]{2in}{\centerline{\includegraphics[width=1.75in]{images/font.pdf}}}
 
-\subsubsection{Numbering and label justification}
-Options in the {\sl Format} menu are provided to control the also provides a range of options to control the display of sequence and alignment numbering, the justification of sequence IDs and annotation row column labels on the annotation rows shown below the alignment.
-
-\subsubsection{Alignment and Group colouring and appearance}
-The display of hidden row/column markers and gap characters can be turned off with {\sl Format $\Rightarrow$ Hidden Markers} and {\sl Format $\Rightarrow$ Show Gaps}, respectively. The {\sl Text} and {\sl Colour Text} option controls the display of sequence text and the application of alignment and group colouring to it. {\sl Boxes } controls the display of the background area behind each residue that is coloured by the applied coloursheme.  
-
-\subsection{Annotation ordering and display}
-
-The annotation lines which appear below the sequence alignment are described in detail in Section \ref{annot}. They can be hidden by toggling the {\sl View $\Rightarrow$ Show Annotations} menu option. Additionally, each annotation line can be hidden and revealed in the same way as sequences via the context menu on the annotation name panel (Figure \ref{annot}). Annotations can be reordered by dragging the annotation line label on the annotation label panel. Placing the mouse over the top annotation label brings up a resize icon. When this is displayed, Click-dragging up and down alters the relative size of the sequence alignment and annotation alignment panels.
+\subsubsection{Numbering and Label Justification}
+Options in the {\sl Format} menu are provided to control the alignment view, and provide a range of options to control the display of sequence and 
+alignment numbering, the justification of sequence IDs and annotation row column labels on the annotation rows shown below the alignment.
+
+\subsubsection{Alignment and Group Colouring and Appearance}
+The display of hidden row/column markers and gap characters can be turned off with {\sl Format $\Rightarrow$ Show Hidden Markers} and 
+{\sl Format $\Rightarrow$ Show Gaps}, respectively. The {\sl Text} and {\sl Colour Text} option controls the display of sequence text and the application of alignment and group colouring to it. {\sl Boxes } controls the display of the background area behind each residue that is coloured by the applied coloursheme.  
+
+\subsubsection{Highlighting Nonconserved Symbols}
+The alignment layout and group sub-menu both contain an option to hide
+conserved symbols from the alignment display ({\sl Format $\Rightarrow$ Show
+nonconserved } in the alignment window or {\sl Selection $\Rightarrow$ Group
+$\Rightarrow$ Show Nonconserved} by right clicking on a group). This mode is useful when working with
+alignments that exhibit a high degree of homology, because Jalview will only
+display gaps or sequence symbols that differ from the consensus for each
+column, and render all others with a `.'.
+%TODO add a graphic to illustrate this.
+
+\subsection{Annotation Ordering and Display}
+% 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 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}).
+Annotations can be reordered by dragging the annotation line label on the annotation label panel. Placing the
+mouse over the top annotation label brings up a resize icon on the left. When this is
+displayed, click-dragging up and down provides either more space in the alignment window for viewing the annotations, or 
+less space for the sequence alignment.
 
 \begin{figure}
 \begin{center}
 \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)}
+\caption{{\bf Hiding Annotations} Annotations can either be hidden from the {\sl
+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}. Select {\sl Format $\Rightarrow$ Wrap} from the alignment window menu. Experiment with the various options from the {\sl Format} menu. to adjust the ruler placement, sequence ID format and so on. }
-\exstep{Hide all the annotation rows by selecting {\sl View $\Rightarrow$ Show Annotations} from the alignment window menu. Reveal the annotations by selecting the same menu option.} 
-\exstep{Right click on the annotation row labels to bring up the context menu.  Select {\sl Hide This Row}. Bring up the context menu again and select {\sl Show All Hidden Rows} to reveal them}
-\exstep{Annotations can be reordered by clicking and dragging the row to the desired position. Click on the {\sl Consensus} row and drag it upwards to just above {\sl Quality}. The rows should now be reordered. Features and annotations are covered in more detail in Section \ref{featannot} below.}
-\exstep{Move the mouse to the top left hand corner of the Secondary Structure annotation row label - a grey up/down arrow symbol should appear - when this is shown, the height of the {\sl Annotation Area} can be changed by Clicking and dragging the mouse up or down.}
-}
+%%TODO: multiple views - simple edits - observe changes in other views.
+
 
-\subsection{Graphical output}
+\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 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]{4in}{Jalview allows alignments figures to be exported in 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=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. It is the format of choice for publication and posters as it gives the highest quality output of any of the image types. It can be scaled indefinitely 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. 
+\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]{4in}{\centerline{\includegraphics[width=2in]{images/image_eps.pdf}}
+\par \centerline{Zoom Detail of EPS image.}}
 
 \subsubsection{PNG}
-\parbox[c]{3in}{
-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.
+\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.}}
-\exercise{Graphical Output}{
-\exstep{Load the example Jalview Jar file in Exercise \ref{exscreen}. Customise it how you wish but leave it unwrapped. Select {\sl File $\Rightarrow$ Export Image $\Rightarrow$ HTML} from the alignment menu. Save the file and open it in your favourite web browser.  }
-\exstep{Now wrap the alignment (Exercise \ref{exscreen}) and export the image to HTML again. Compare the two images. Note that the exported image matches the format displayed in the alignment window but annotations are not exported.}
-\exstep{Export the alignment using the {\sl File $\Rightarrow$ Export Image $\Rightarrow$ PNG} menu option. Open the file in an image viewer that allows zooming (eg. Paint or Photoshop on Windows, Preview on Mac OS X) and zoom in. Notice that the image is a bitmap and it becomes pixelated very quickly. Note also that the annotation lines are included in the image.}
-\exstep{Export the alignment using the {\sl File $\Rightarrow$ Export Image $\Rightarrow$ EPS} menu option. Open the file in a suitable program such as Ghostview or Preview (Mac OS X). Zoom in and note that the image is indefinitely scalable.}
+\parbox[c]{4in}{\centerline{\includegraphics[width=2in]{images/image_png.pdf}}
+\par \centerline{Zoom Detail of PNG image.}}
+
+ \exercise{Graphical Output}{
+ \label{graphicex}
+\exstep{Load the example Jalview Jar file in Exercise \ref{exscreen}. 
+Customise it how you wish but leave it unwrapped. 
+Select {\sl File $\Rightarrow$ Export Image $\Rightarrow$ HTML} from the alignment menu. 
+Save the file and open it in your favoured web browser.  }
+\exstep{Wrap the alignment and export the image to HTML again. Compare the two
+images. (Note that the exported image matches the format displayed in the
+alignment window but {\bf annotations are not exported}).}
+\exstep{Export the alignment using the {\sl File $\Rightarrow$ Export Image $\Rightarrow$ PNG} menu option. 
+Open the file in an image viewer that allows zooming such as Paint or Photoshop (Windows), or Preview (Mac OS X) and zoom in. 
+Notice that the image is a bitmap and it becomes pixelated when zoomed. 
+(Note that the {\bf annotation lines are included} in the image.)}
+\exstep{Export the alignment using the {\sl File $\Rightarrow$ Export Image
+$\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.}
+\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}.
 }
 
-\chapter{Analysis and Annotation}
-\label{analysisannotation}
-
-This chapter describes the annotation, analysis, and visualization tasks that the Jalview Desktop can perform. Section \ref{wkwithstructure} introduces the structure visualization capabilities of Jalview. In Section \ref{alignanalysis}, you will find details of the Tree building, viewing and PCA capabilities, alignment redundancy removal, pairwise alignments and alignment conservation analysis. Subsequently, in Section \ref{jvwebservices}, programs available remotely for multiple sequence alignment and secondary structure prediction are described.
-
-Section \ref{featannot} describes the mechanisms provided by Jalview for interactive creation of sequence and alignment annotation and how they are displayed, imported and exported. Section \ref{featuresfromdb} discusses the retrieval of database references and establishment of sequence coordinate systems for the retrieval and display of features from databases and DAS annotation services. Finally, Section \ref{workingwithnuc} describes functions and visualization techniques relevant to working with nucleotide sequences, coding region annotation and nucleotide sequence alignments.
-
-\section{Working with structures}
-\label{wkwithstructure}
-Jalview facilitates the use of protein structures for the analysis of alignments by providing a linked view of structures associated with protein sequences in the alignment. The Java based molecular viewing program Jmol\footnote{See the Jmol homepage \url{http://www.jmol.org} for more information.} has been incorporated\footnote{Earlier versions of Jalview included MCView - a simple main chain structure viewer. Structures are visualized as an alpha carbon trace and can be viewed, rotated and coloured in a structure viewer and the results interpreted on a sequence alignment.} which enables sophisticated molecular visualizations to be prepared and investigated alongside an analysis of associated sequences.
-PDB format files can be imported directly or structures can be retrieved from the the Macromolecular Structure Database (MSD) using the Sequence Fetcher (see \ref{fetchseq}).
-
-\subsection{Automatic association of PDB structures with sequences}
-Jalview can automatically determine which structures are associated with a sequence, if that sequence has an ID from a public database such as Uniprot. Right-click on any sequence ID and select {\sl $<$Sequence ID$>$ $\Rightarrow$ Associate Structure with Sequence $\Rightarrow$ Discover PDB IDs } from the context menu (where {\sl $<$Sequence ID$>$} is the ID of the sequence on which you clicked) (Figure \ref{auto}). Jalview will attempt to associate the sequence with a Uniprot sequence and from there discover any associated PDB structures. This takes a few seconds and applies to all sequences in the alignment which have valid Uniprot IDs. On moving the cursor over the sequence ID the tool tip now shows the Uniprot ID and any associated PDB structures. 
+% left out for Glasgow 2016
+% \newpage
+% 
+% \section{Summary - the rest of the manual}
+% 
+% The first few chapters have covered the basics of Jalview operation: from
+% starting the program, importing, exporting, selecting, editing and colouring
+% aligments, to the generation of figures for publication, presentation and web
+% pages.
+% 
+% The remaining chapters in the manual cover:
+% 
+% \begin{list}{$\circ$}{}
+% \item{Chapter \ref{featannot} covers the creation, manipulation and visualisation
+% of sequence and alignment annotation, and retrieval of sequence and feature data
+% from databases.}
+% \item {Chapter \ref{msaservices} explores the range of multiple alignment
+% programs offered via Jalview's web services, and introduces the use of
+% AACon for protein multiple alignment conservation analysis.}
+% \item {Chapter \ref{alignanalysis} introduces Jalview's built in tools for
+% multiple sequence alignment analysis, including trees, PCA, and alignment
+% conservation analysis. }
+% \item {Chapter \ref{3Dstructure} demonstrates the structure visualization
+% capabilities of Jalview.}
+% \item {Chapter \ref{proteinprediction} introduces protein sequence based
+% secondary structure and disorder prediction tools, including JPred.}
+% \item {Chapter \ref{dnarna} covers the special functions and
+% visualization techniques for working with RNA alignments and protein coding
+% sequences.}
+% \item {Chapter \ref{jvwebservices} provides instructions on the
+% installation of your own Jalview web services.}
+% \end{list}
+
+\chapter{Annotation and Features}
+\label{featannot}
+Annotations and features are additional information that is
+overlaid on the sequences and the alignment.
+Generally speaking, annotations reflect properties of the alignment as a
+whole, often associated
+with columns in the alignment. Features are often associated with specific
+residues in the sequence.
+
+Annotations are shown below the alignment in the annotation panel, the
+properties are often based on the alignment.
+Conversely, sequence features are properties of the individual sequences, so they do not change with the alignment, 
+but are shown mapped on to specific residues within the alignment. 
+
+Features and annotation can be interactively created, or retrieved from external
+data sources. Webservices like JPred (see \ref{jpred}) can be used to
+analyse a given sequence or alignment and generate annotation for it.
+
+
+\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. 
+Conservation, quality and consensus scores are examples of dynamic
+annotation, so as the alignment changes, they change along with it.
+The scores can be used in the hybrid colouring options to shade the alignments. 
+Mousing over a conservation histogram reveals a tooltip with more information.
+
+These annotations can be hidden and deleted via the context menu linked to the
+annotation row; but they are only created on loading an alignment. If they are
+deleted then the alignment should be saved and then reloaded to restore them.
+Jalview provides a toggle to autocalculate a consensus sequence upon editing. This is normally selected by default, but can be turned off for
+large alignments {\sl via} the {\sl Calculate $\Rightarrow$ Autocalculate
+Consensus} menu option if the interface is too slow.
+
+\subsubsection{Conservation Annotation}
+
+Alignment conservation annotation is quantitative numerical index reflecting the
+conservation of the physico-chemical properties for each column of the alignment. 
+The calculation is based on AMAS method of multiple sequence alignment analysis (Livingstone C.D. and Barton G.J. (1993) CABIOS Vol. 9 No. 6 p745-756), 
+with identities scoring highest, and amino acids with substitutions in the same physico-chemical class have next highest score. 
+The score for each column is shown below the histogram. 
+The conserved columns with a score of 11 are indicated by '*'.
+Columns with a score of 10 have mutations but all properties are conserved are marked with a '+'.
+
+\subsubsection{Consensus Annotation}
+
+Alignment consensus annotation reflects the percentage of the different residue
+per column. By default this calculation includes gaps in columns, gaps can be ignored via the Consensus label context 
+menu to the left of the consensus bar chart. 
+The consensus histogram can be overlaid
+with a sequence logo that reflects the symbol distribution at each column of
+the alignment. Right click on the Consensus annotation row and select the {\sl Show
+Logo} option to display the Consensus profile for the group or alignment.
+Sequence logos can be enabled by default for all new alignments {\sl via} the
+Visual tab in the Jalview desktop's preferences dialog box.
+
+\subsubsection{Quality Annotation}
+
+Alignment quality annotation is an ad-hoc measure of the likelihood of observing
+the mutations (if any) in a particular column of the alignment. The quality score is calculated for each column in an alignment by summing, 
+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
+sequence variation within a particular group. Their calculation is enabled
+by selecting the {\sl Group Conservation} or {\sl Group Consensus} options in
+the {\sl Annotation $\Rightarrow$ Autocalculated Annotation } submenu of the
+alignment window. 
+
+\subsection{Creating User Defined Annotation}
+
+To create a new annotation row, right click on the annotation label panel and select the {\sl Add New Row} menu option (Figure \ref{newannotrow}).
+A dialog box appears. Enter the label to use for this row and a new row will appear.
+
+To create a new annotation, first select all the positions to be annotated on the appropriate row. 
+Right-clicking on this selection brings up the context menu which allows the insertion of graphics for secondary structure ({\sl Helix} or {\sl Sheet}), 
+text {\sl Label} and the colour in which to present the annotation (Figure \ref{newannot}). On selecting {\sl Label} a dialog box will appear, 
+requesting the text to place at that position. After the text is entered, the selection can be removed and the annotation becomes clearly 
+visible\footnote{When annotating a block of positions, the text can be partly obscured by the selection highlight. Pressing the  [ESC] key clears 
+the selection and the label is then visible.}. Annotations can be coloured or deleted as desired.
 
 \begin{figure}[htbp]
 \begin{center}
-%TODO fix formatting
-\parbox{1.5in}{
-{\centering 
-\begin{center}
-\includegraphics[width=1.5in]{images/auto1.pdf}
-\end{center}}
-} \parbox{3.25in}{
-{\centering 
-\begin{center}
-\includegraphics[scale=0.5]{images/auto2.pdf}
-\end{center}
-}
-} \parbox{1.5in}{
-{\centering 
-\begin{center} 
-\includegraphics[width=1.5in]{images/auto3.pdf}
-\end{center}
-}
-}
-
-\caption{{\bf Automatic PDB ID discovery.} The tooltip (left) indicates that no PDB structure has been associated with the sequence. After PDB ID discovery (center) the tool tip now indicates the Uniprot ID and any associated PDB structures (right)}
-\label{auto}
+\includegraphics[width=1.3in]{images/annots1.pdf}
+\includegraphics[width=2in]{images/annots2.pdf}
+\caption{{\bf Creating a new annotation row.} Annotation rows can be reordered by dragging them to the desired place.}
+\label{newannotrow}
 \end{center}
 \end{figure}
 
-\subsection{Viewing Protein Structures}
-The structure viewer can be launched through the sequence ID context menu. Select {\sl Structure $\Rightarrow$ View PDB entry $\Rightarrow$ $<$PDB ID$>$}. The structure will be downloaded or loaded from the local file system, and shown as a ribbon diagram coloured according to the associated sequence in the current alignment view (Figure \ref{structure} (right)). The structure can be rotated by clicking and dragging in the structure window. The structure can be zoomed using the mouse scroll wheel (if available). Moving the mouse cursor over a sequence to which the structure is linked in the alignment panel highlights the respective residue's sidechain atoms. The sidechain highlight may be obscured by other parts of the molecule. Similarly, moving the cursor over the structure shows a tooltip and highlights the corresponding residue in the alignment. Again, the highlight may not be in the visible portion of the current alignment view - you may have to manually move the alignment scroll bars and/or un-hide columns.
-
 \begin{figure}[htbp]
 \begin{center}
-\parbox{3in}{
-{\centering 
-\begin{center}
-\includegraphics[scale=0.5]{images/structure1.pdf}
+\includegraphics[width=2in]{images/annots3.pdf}
+\includegraphics[width=2in]{images/annots4.pdf}
+\includegraphics[width=2in]{images/annots5.pdf}
+\caption{{\bf Creating a new annotation.} Annotations are created from a selection on the annotation row and can be coloured as desired.}
+\label{newannot}
 \end{center}
+\end{figure}
+
+\subsection{Automated Annotation of Alignments and Groups}
+
+On loading a sequence alignment, Jalview will normally\footnote{Automatic
+annotation can be turned off in the {\sl Visual } tab in the {\sl Tools
+$\Rightarrow$ Preferences } dialog box.} calculate a set of automatic annotation
+rows which are shown below the alignment. For nucleotide sequence alignments,
+only an alignment consensus row will be shown, but for amino acid sequences,
+alignment quality (based on BLOSUM 62) and physicochemical conservation will
+also be shown. Conservation is calculated according to Livingstone and
+Barton\footnote{{\sl ``Protein Sequence Alignments: A Strategy for the
+Hierarchical Analysis of Residue Conservation." } Livingstone C.D. and Barton
+G.J. (1993) {\sl CABIOS } {\bf 9}, 745-756}.
+Consensus is the modal residue (or {\tt +} where there is an equal top residue).
+The inclusion of gaps in the consensus calculation can be toggled by
+right-clicking on the Consensus label and selecting {\sl Ignore Gaps in
+Consensus} from the pop-up context menu located with consensus annotation row.
+Quality is a measure of the inverse likelihood of unfavourable mutations in the alignment. Further details on these
+calculations can be found in the on-line documentation.
+
+
+\exercise{Annotating Alignments}{
+  \label{annotatingalignex}
+\exstep{Load the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. 
+Right-click on the label name of the {\sl Conservation} annotation row to
+bring up the context menu and select {\sl Add New Row}. A dialog box will
+appear asking for {\sl Annotation Name} and {\sl Annotation Description}.
+Enter "Iron binding site" and click {\sl OK}. A new, empty, row appears.
 }
+\exstep{
+Navigate to column 97. Move down and on the new annotation row called
+"Iron binding site", select column 97.
+Right click at this selection and select {\sl Label} from the context menu.
+Enter "Fe" in the box and click {\sl OK}. Right-click on the selection again
+and select {\sl Colour}.
+Choose a colour from the colour chooser dialog 
+and click {\sl OK}. Press [ESC] to remove the selection.
+
+{\sl Note: depending on your Annotation sort settings, your newly
+created annotation row might "jump" to the top or bottom of the annotation
+panel. Just scroll up or down to find it again - the column you marked will
+still be selected. }
+
 }
-\parbox{3.2in}{
-{\centering 
-\begin{center}
-\includegraphics[width=3in]{images/structure2.pdf}
-\end{center}
+\exstep{ Select columns 70-77 on the annotation row. Right-click and choose {\sl Sheet} from the
+ context menu. You will be prompted for a label. Enter "B" and press {\sl OK}. A new line showing the 
+ sheet as an arrow appears. The colour of the label can be changed but not the colour of the sheet 
+ arrow. 
 }
+\exstep{Right click on the title text in the annotation row that you just
+created.
+Select {\sl Export Annotation} in context menu and, in the Export Annotation
+dialog box that will open, select the Jalview format and click the {\sl [To Textbox]} button. 
+(The format for this file is given in the Jalview help. Press [F1] to open it ([F1]-[Fn] (Mac)),
+and find the "Annotations File Format" entry in the "Alignment Annotations" section of the contents 
+pane.) }
+
+\exstep{Open a text editor and copy the annotation text into the editor.
+Edit the text by changing the name of the annotation row and save the file.}
+\exstep{Drag the file onto the alignment in Jalview and check the annotation
+panel.} \exstep{Return to the text editor, add an additional helix somewhere
+along the row, save the file and re-importing it into Jalview as previously.
+{\sl Hint: Use the Export Annotation function to view what helix annotation looks like in 
+a Jalview annotation file.}}
+\exstep{In the alignment window menu, select {\sl File $\Rightarrow$ Export Annotations...} 
+to export all the alignment's annotation to a file. Save the file.}
+\exstep{Open the exported annotation in a text editor, and use the Annotation File Format 
+documentation to modify the style of the Conservation, Consensus and Quality annotation rows so 
+they appear as several lines on a single line graph.
+{\sl Hint: You need to change the style of annotation row in the first field of the annotation 
+row entry in the file. Create an annotation row grouping to overlay the
+three quantitative annotation rows.}
 }
-\caption{{\bf Structure visualization} The structure viewer is launched from the sequence ID context menu (left) and allows the structure to be visualized using the embedded Jmol molecular viewer (right). }
-\label{structure}
-\end{center}
-\end{figure}
-
-\subsubsection{Customising structure display}
-
-Structure display can be modified using the {\sl Colour} and {\sl View} menus in the structure viewer. The background colour can be modified by selecting the {\sl Colours $\Rightarrow$ Background Colour\ldots} option.
-
-By default, the structure will be coloured in the same way as the sequence in the associated alignment view. The structure can be coloured independently of the sequence by selecting an appropriate colour scheme from the {\sl Colours} menu. It can be coloured according to the alignment using the {\sl Colours $\Rightarrow$ By Sequence } option. The image in the structure viewer can be output to EPS or PNG format via the {\sl File $\Rightarrow$ Save As $\Rightarrow$ \ldots} submenu. The mapping between the structure and the sequence (How well and which parts of the  structure relate to the sequence) can be viewed with the {\sl File $\Rightarrow$ View Mapping} menu option.  
-
-\subsubsection{Using the Jmol visualization interface }
-
-Jmol has a comprehensive set of selection and visualization functions that are accessed from the Jmol popup menu (by right-clicking in the Jmol window or by clicking the Jmol logo). Molecule colour and rendering style can be manipulated, and distance measurements and molecular surfaces can be added to the view. It also has its own ``Rasmol\footnote{see www.rasmol.org}-like'' scripting language, which is described elsewhere\footnote{Jmol Wiki: \url{http://wiki.jmol.org/index.php/Scripting}
+\exstep{{\bf Homework once you have completed exercise
+\ref{secstrpredex}:}
+\label{viewannotfileex}
+      
+Recover or recreate the secondary structure predictions that you made from
+JPred. Use the {\sl File $\Rightarrow$ Export Annotation} function to view the Jnet secondary structure prediction annotation row.
+Note: the 
+SEQUENCE\_REF statements surrounding the row specifying the sequence association for the 
+annotation. 
+}
+\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
 
-Jmol Scripting reference: \url{http://www.stolaf.edu/academics/chemapps/jmol/docs/}}. Jalview utilises the scripting language to interact with Jmol and to store the state of a Jmol visualization within Jalview archives, in addition to the PDB data file originally loaded or retrieved by Jalview. To access the Jmol scripting environment directly, use the {\sl Jmol $\Rightarrow$ Console} menu option.
 
+\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.
 
-\exercise{Viewing Structures}{
-\exstep{Load the alignment at \textsf{http://www.jalview.org/examples/exampleFile.jar}. Right-click on the sequence ID label for any of the sequences (e.g. {\sl FER1\_SPIOL}) to bring up the context menu. Select {\sl FER1\_SPIOL $\Rightarrow$ Associate Structure with Sequence $\Rightarrow$ Discover PDB ids}. Jalview will now attempt to find PDB structures for the sequences in the alignment.
+\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.
+
+%%TODO: change EMBL to ENA in Jalview and the Manual !
+
+\section{Importing Features from Databases}
+\label{featuresfromdb}
+Jalview supports feature retrieval from public databases.
+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
+an alignment. These are listed in a tooltip when the mouse is moved over the
+sequence ID when the {\sl View $\Rightarrow$ Sequence ID Tooltip $\Rightarrow$
+Show Database Refs } option is enabled. Sequences retrieved using the sequence
+fetcher will always have at least one database reference, but alignments
+imported from an alignment file generally have no database references.
+
+\subsubsection{Database References and Sequence Coordinate Systems}
+
+Jalview displays features in the local sequence's coordinate system which is
+given by its `start' and `end'. Any sequence features on the sequence will be
+rendered relative to the sequence's start position. If the start/end positions
+do not match the coordinate system from which the features were defined, then
+the features will be displayed incorrectly.
+
+\subsubsection{Viewing and Exporting a Sequence's Database Annotation}
+
+You can export all the database cross references and annotation terms shown in
+the sequence ID tooltip for a sequence by right-clicking and selecting the {\sl
+[Sequence ID] $\Rightarrow$ Sequence Details} option from the popup
+menu.
+A similar option is provided in the {\sl Selection} sub-menu allowing you to
+obtain annotation for the sequences currently selected. 
+
+\parbox[l]{3.4in}{
+The {\sl Sequence Details
+\ldots} option will open a window containing the same text as would be shown in
+the tooltip window, including any web links associated with the sequence. The
+text is HTML, and options on the window allow the raw code to be copied and
+pasted into a web page.}
+\parbox[c]{3in}{
+\centerline{\includegraphics[width=2.2in]{images/seqdetailsreport.pdf}}}
+
+\subsubsection{Automatically Discovering a Sequence's Database References}
+Jalview includes a function to automatically verify and update each sequence's
+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
+Web Service $\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, 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
+matched against the local sequence, and if the local sequence is found to be a
+sub-sequence of the retrieved sequence then the local sequence's start/end
+numbering is updated.  A new database reference mapping is created, mapping the
+local sequence to the external database, and the local sequence inherits any
+additional annotation retrieved from the database sequence.
+
+The database retrieval process terminates when a valid mapping is found for a
+sequence, or if all database queries failed to retrieve a matching sequence.
+Termination is indicated by the disappearance of the moving progress indicator
+on the alignment window. A dialog box may be shown once it completes which
+lists sequences for which records were found, but the sequence retrieved from
+the database did not exactly contain the sequence given in the alignment (the
+{\sl ``Sequence not 100\% match'' dialog box}).
+
+
+\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.  
+As features are retrieved, they are immediately added to the current alignment view.
+The retrieved features are shown on the sequence and can be customised as described previously.
+
+
+\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 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. 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. If other attributes are present you can choose one of them from the drop-down menu.
+
+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.
+
+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}
+The presence of sequence features on certain sequences or in a particular
+region of an alignment can quantitatively identify important trends in
+the aligned sequences. In this case, it is more useful to
+re-order the alignment based on the number of features or their associated scores, rather than simply re-colour the aligned sequences. 
+The sequence feature settings
+dialog box provides two buttons: `Sequence sort by Density' and `Sequence sort by
+Score', that allow you to reorder the alignment according to the number of
+sequence features present on each sequence, and also according to any scores
+associated with a feature. Each of these buttons uses the currently displayed
+features to determine the ordering, but
+if you wish to re-order the alignment using a single type of feature, then you can do this from the {\sl Feature Type}'s
+popup menu. Simply right-click the type's style in the Sequence Feature Settings dialog
+box, and select one of the {\sl Sort by Score} and {\sl Sort by Density}
+options to re-order the alignment. Finally, if a specific region is selected,
+then only features found in that region of the alignment will be used to
+create the new alignment ordering.
+% \exercise{Shading and Sorting Alignments using Sequence Features}{
+% \label{shadingorderingfeatsex}
+% 
+% This exercise is currently not included in the tutorial because no DAS servers
+% currently exist that yield per-residue features for any Uniprot sequence. 
+% 
+% \exstep{Re-load the alignment from \ref{dasfeatretrexcercise}.
+% }
+% \exstep{Open the
+% feature settings panel, and, after first clearing the current
+% selection, press the {\em Seq Sort by Density} button a few times.}
+% \exstep{Use the DAS fetcher to retrieve the Kyte and Doolittle Hydrophobicity
+% scores for the protein sequences in the alignment.
+% {\sl Hint: the nickname for the das source is `KD$\_$hydrophobicity'.}}
+% \exstep{Change the feature settings so only the hydrophobicity features are
+% displayed. Mouse over the annotation and also export and examine the GFF and
+% Jalview features file to better understand how the hydrophobicity measurements
+% are recorded.}
+% \exstep{Apply a {\sl Graduated Colour} to the hydrophobicity annotation to
+% reveal the variation in average hydrophobicity across the alignment.}
+% \exstep{Select a range of alignment columns, and use one of the sort by feature buttons to order the alignment according to that region's average
+% hydrophobicity.}
+% \exstep{Save the alignment as a project, for use in exercise
+% \ref{threshgradfeaturesex}.} }
+% 
+% \exercise{Shading alignments with combinations of graduated feature
+% colourschemes}{
+% \label{threshgradfeaturesex}
+% \exstep{Reusing the annotated alignment from exercise
+% \ref{shadingorderingfeatsex}, experiment with the colourscheme threshold to
+% highlight the most, or least hydrophobic regions. Note how the {\sl Colour} icon for the {\sl Feature Type} changes when you change the threshold type and press OK.}
+% \exstep{Change the colourscheme so
+% that features at the threshold are always coloured grey, and the most
+% hydrophobic residues are coloured red, regardless of the threshold value
+% ({\em hint - there is a switch on the dialog to do this for you}).}
+% \exstep{Enable the Uniprot {\em chain} annotation in the feature settings
+% display and re-order the features so it is visible under the hydrophobicity
+% annotation.}
+% \exstep{Apply a {\sl Graduated Colour} to the {\em chain}
+% annotation so that it distinguishes the different canonical names associated
+% with the mature polypeptide chains.}
+% \exstep{Export the alignment's sequence features using the Jalview and GFF file formats, to see how the different types of graduated feature
+% colour styles are encoded. }
+% }
+
+
+\subsection{Sequence Feature File Formats}
+
+Jalview supports the widely used GFF tab delimited format\footnote{see
+http://www.sanger.ac.uk/resources/software/gff/spec.html} and its own Jalview
+Features file format for the import of sequence annotation. Features and
+alignment annotation are also extracted from other formats such as Stockholm,
+and AMSA. URL links may also be attached to features. See the online
+documentation for more details of the additional capabilities of the Jalview
+features file.
+
+\exercise{Creating Features}{
+\label{featuresex}
+\exstep{Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. 
+We know that the Cysteine residues at columns 97, 102, 105 and 135 are involved in 
+iron binding so we will create them as features. Navigate to column 97, sequence 1. 
+Select the entire column by clicking in the ruler bar. Then right-click on the selection 
+to bring up the context menu and select {\sl Selection $\Rightarrow$ Create Sequence Feature}. 
+A dialog box will appear.
 }
 \exstep{
-Right-click on the sequence ID for {\sl FER1\_SPIOL}. Select { \sl FER1\_SPIOL $\Rightarrow$ View PDB Entry: 1A70} A structure viewing window appears. Rotate the molecule by clicking and dragging in the structure viewing box. Zoom with the mouse scroll wheel.
+Enter a suitable Sequence Feature Name  (e.g. ``Iron binding site") in the
+appropriate box. Click on the Feature Colour bar to change the colour if
+desired, add a short description (``One of four Iron binding Cysteines") and
+press {\sl OK}. The features will then appear on the sequences. } \exstep{Roll
+the mouse cursor over the new features.
+Note that the position given in the tool tip is the residue number, not the column number. 
+To demonstrate that there is one feature per sequence, clear all selections by pressing [ESC],
+ then insert a gap in sequence 3 at column 95 using the [SHIFT] key.
+Roll the mouse over the features and you will see that the feature has moved
+with the sequence. Delete the gap you created using {\sl Edit
+$\Rightarrow$ Undo}.
 }
-\exstep{Roll the mouse cursor along the {\sl FER1\_SPIOL} sequence in the alignment. Note that if a residue in the sequence maps to one in the structure, a label will appear next to that residue in the structure viewer. Move the mouse over the structure. Placing the mouse over a part of the structure will bring up a tool tip indicating the name and number of that residue. The corresponding residue in the sequence is highlighted in black. Clicking the alpha carbon toggles the highlight and residue label on and off. Try this by clicking on a set of three or four adjacent residues so that the labels are persistent, then finding where they are in the sequence.
-}
-\exstep{Select {\sl Colours $\Rightarrow$ Background Colour\ldots} from the structure viewer menu and choose a suitable colour. Press {\sl OK} to apply this. Select {\sl File $\Rightarrow$ Save As $\Rightarrow$ PNG} and save the image. View this with your web browser.
-}
-\exstep{Select {\sl File $\Rightarrow$ View Mapping} from the structure viewer menu. A new window opens showing the residue by residue alignment between the sequence and the structure.} 
+\exstep{
+Add a similar feature to column 102. When the feature dialog box appears, clicking the Sequence Feature 
+Name box brings up a list of previously described features. Using the same Sequence Feature Name allows the features to be grouped.}
+\exstep{Select {\sl View $\Rightarrow$ Feature Settings\ldots} from the
+alignment window menu. The Sequence Feature Settings window will appear. Move
+this so that you can see the features you have just created. Click the check
+box for ``Iron binding site"  under {\sl Display} and note that display of this
+feature type is now turned off. Click it again and note that the features are
+now displayed. Close the sequence feature settings box by clicking {\sl OK} or
+{\sl Cancel}.} 
+
+\exstep{Select {\sl View $\Rightarrow$ Show Sequence Features} from the
+alignment window menu. The sequence features are now hidden. Repeat this step and the features are
+displayed.}
+
+\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
+
+\chapter{Multiple Sequence Alignment}
+\label{msaservices}
+Sequences can be aligned using a range of algorithms provided by JABA web
+services, including ClustalW\footnote{{\sl ``CLUSTAL W:
+improving the sensitivity of progressive multiple sequence alignment through sequence
+weighting, position specific gap penalties and weight matrix choice."} Thompson
+JD, Higgins DG, Gibson TJ (1994) {\sl  Nucleic Acids Research} {\bf 22},
+4673-80}, Muscle\footnote{{\sl ``MUSCLE: a multiple sequence alignment method
+with reduced time and space complexity"} Edgar, R.C.
+(2004) {\sl BMC Bioinformatics} {\bf 5}, 113},  MAFFT\footnote{{\sl ``MAFFT: a
+novel method for rapid multiple sequence alignment based on fast Fourier
+transform"}  Katoh, K., Misawa, K., Kuma, K. and Miyata, T. (2002) {\sl Nucleic
+Acids Research} {\bf 30}, 3059-3066.  and {\sl ``MAFFT version 5:
+improvement in accuracy of multiple sequence alignment"} Katoh, K., Kuma, K.,
+Toh, H. and Miyata, T. (2005) {\sl Nucleic Acids Research} {\bf 33}, 511-518.},
+ProbCons,\footnote{PROBCONS: Probabilistic Consistency-based Multiple Sequence
+Alignment.
+Do, C.B., Mahabhashyam, M.S.P., Brudno, M., and Batzoglou, S.
+(2005) {\sl Genome Research} {\bf 15} 330-340.} T-COFFEE\footnote{T-Coffee:
+A novel method for multiple sequence alignments. (2000) Notredame, Higgins and
+Heringa {\sl JMB} {\bf 302} 205-217} and Clustal Omega.\footnote{Fast, scalable
+generation of high-quality protein multiple sequence alignments using Clustal
+Omega. Sievers F, Wilm A, Dineen DG, Gibson TJ, Karplus K, Li W, Lopez R,
+McWilliam H, Remmert M, Soding J, Thompson JD, Higgins DG (2011) {\sl Molecular
+Systems Biology} {\bf 7} 539
+\href{http://dx.doi.org/10.1038/msb.2011.75}{doi:10.1038/msb.2011.75}} Of these,
+T-COFFEE is slow but accurate. ClustalW is historically
+the most widely used. Muscle is fast and probably best for
+smaller alignments. MAFFT is probably the best for large alignments,
+however Clustal Omega, released in 2011, is arguably the fastest and most
+accurate tool for protein multiple alignment.
+
+\section{Performing a multiple sequence alignment}
+To run an alignment web service, select the appropriate method from the {\sl
+Web Service $\Rightarrow$  Alignment $\Rightarrow$ \ldots} submenu (Figure
+\ref{webservices}). For each service you may either perform an alignment with
+default settings, use one of the available presets, or customise the parameters
+with the `{\sl Edit and Run ..}' dialog box. Once the job is submitted, a
+progress window will appear giving information about the job and any errors that
+occur. After successful completion of the job, a new alignment window is opened
+with the results, in this case an alignment. By default, the new alignment will be
+ordered in the same way as the input sequences. Note: many alignment
+programs re-order the input during their analysis and place homologous
+sequences close together, the MSA algorithm ordering can be recovered
+using the `Algorithm ordering' entry within the {\sl Calculate $\Rightarrow$
+Sort } sub menu.
+
+\subsection{Realignment to add sequences to an existing alignment}
+The re-alignment option is currently only supported by Clustal  
+Omega and ClustalW. When performing a re-alignment, Jalview submits the
+current selection to the alignment service complete with any existing gaps.
+Realignment with ClustalW is useful when one wishes to align
+additional sequences to an existing alignment without any further optimisation
+to the existing alignment. ClustalO's realignment works by generating a
+probabilistic model (a.k.a HMM) from the original alignment, and then realigns
+{\bf all} sequences to this profile. For a well aligned MSA, this process
+will simply reconstruct the original alignment (with additional sequences), but
+in the case of low quality MSAs, some differences may be introduced.
 
-\exstep{Select {\sl File $\Rightarrow$ Save $\Rightarrow$ PDB file} and choose a new filename to save the PDB file. Once the file is saved, open the location in your file browser (or explorer window) and drag the PDB file that you just saved on to the Jalview desktop (or load it from the {\sl Jalview Desktop $\Rightarrow$ Input Alignment $\Rightarrow$ From File } menu). Verify that you can open and view the associated structure from the sequence ID pop-up menu's {\sl Structure } submenu in the new alignment window.}
+\begin{figure}[htbp]
+\begin{center}
+\parbox[c]{1.5in}{\includegraphics[width=1.5in]{images/ws1.pdf}}
+\parbox[c]{2.5in}{\includegraphics[width=2.5in]{images/ws2.pdf}}
+\parbox[c]{2in}{\includegraphics[width=2in]{images/ws3.pdf}}
+\caption{{\bf Multiple alignment via web services} The appropriate method is
+selected from the menu (left), a status box appears (centre), and the results
+appear in a new window (right).}
+\label{webservices}
+\end{center}
+\end{figure}
 
-\exstep{Right click on the structure to bring up the Jmol window. Explore the menu options. Try to change the style of molecular display - by first using the {\sl Jmol $\Rightarrow$ Select $\Rightarrow$ all} command, and then the {\sl Jmol $\Rightarrow$ Style $\Rightarrow$ Scheme $\Rightarrow$ Ball and stick} command.}
-\exstep{Use the {\sl File $\Rightarrow$ Save As .. } function to save the alignment as a Jalview Project. Now close the alignment and the structure view, and load the project file you just saved.
+\subsection{Alignments of Sequences that include Hidden Regions}
+If the view or selected region submitted for alignment contains hidden
+regions, then {\bf only the visible sequences will be submitted to the service}.
+Furthermore, each contiguous segment of sequences will be aligned independently
+(resulting in a number of alignment `subjobs' appearing in the status window).
+Finally, the results of each subjob will be concatenated with the hidden regions
+in the input data prior to their display in a new window. This approach ensures
+that 1) hidden column boundaries in the input data are preserved in the
+resulting alignment - in a similar fashion to the constraint that hidden columns
+place on alignment editing (see Section \ref{lockededits} and 2) hidden
+columns can be used to preserve existing parts of an alignment whilst the
+visible parts are locally refined.
+
+\subsection{Alignment Service Limits}
+Multiple alignment is a computationally intensive calculation. Some JABA server
+services and service presets only allow a certain number of sequences to be
+aligned. The precise number will depend on the server that you are using to
+perform the alignment. Should you try to submit more sequences than a service
+can handle, then an error message will be shown informing you of the maximum
+number allowed by the server.
 
-Verify that the Jmol display is as it was when you just saved the file.}
+\exercise{Multiple Sequence Alignment}{
+\label{msaex}
+\exstep{ Close all windows. Open the alignment at {\sf
+http://www.jalview.org/tutorial/unaligned.fa}.  Select {\sl
+Web Service $\Rightarrow$ Alignment $\Rightarrow$ Muscle with Defaults}. 
+A window will open giving the job status. After a short time, a second window will open
+ with the results of the alignment.} 
+ \exstep{Return to the first sequence alignment window by clicking on 
+ the window, and repeat using {\sl ClustalO} (Omega) ({\sl with Defaults}), from the
+ {\sl Web Service $\Rightarrow$ Alignment} menu, using the same initial
+ alignment.
+ Compare them and you should notice small differences. }
+\exstep{Select the last three sequences in the MAFFT alignment (you may need the scroll down the alignment), and de-align them 
+with {\sl Edit $\Rightarrow$ Remove All Gaps}. Press [ESC] to deselect these
+sequences. Then submit this view for re-alignment with {\sl ClustalO}.}
+\exstep{Return to the alignment window in section (c), use [CTRL]-Z (undo) to
+recover the alignment of the last three sequences in this MAFFT alignment.
+Once the ClustalO re-alignment has completed, compare the results of
+re-alignment of the three sequences with their alignment in the original MAFFT result.}
+\exstep{Select columns 60 to 125 in the original MAFFT alignment and hide them,
+by right clicking the mouse to bring up context menu.
+Select {\sl Web Service $\Rightarrow$ Alignment $\Rightarrow$ Mafft with Defaults} to 
+submit the visible portion of the alignment to MAFFT. When the web service job pane appears, 
+note that there are now two alignment job status panes shown in the window.}
+\exstep{When the MAFFT job has finished, compare the alignment of the N-terminal visible 
+region in the result with the corresponding region of the original alignment.}
+\exstep {If you wish, 
+select and hide a few more columns in the N-terminal region, and submit the alignment to the 
+service again and explore the effect of local alignment on the non-homologous parts of the 
+N-terminal region.}
+{\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
 }
 
-\section{Analysis of alignments}
+\section{Customising the Parameters used for Alignment}
+
+JABA web services allow you to vary the parameters used when performing a
+bioinformatics analysis. For JABA alignment services, this means you are
+usually able to modify the following types of parameters:
+\begin{list}{$\bullet$}{}
+\item{Amino acid or nucleotide substitution score matrix}
+\item{Gap opening and widening penalties}
+\item{Types of distance metric used to construct guide trees}
+\item{Number of rounds of re-alignment or alignment optimisation}  
+\end{list}
+\begin{figure}[htbc]
+\center{
+\includegraphics[width=3in]{images/jvaliwsparamsbox.pdf}
+\caption{{\bf An alignment service's parameter editing dialog box}.}
+\label{jwsparamsdialog} }
+\end{figure}
+
+\subsection{Getting Help on the Parameters for a Service}
+
+Each parameter available for a method usually has a short description, which
+Jalview will display as a tooltip, or as a text pane that can be opened under
+the parameter's controls. In the parameter shown in Figure
+\ref{clustalwparamdetail}, the description was opened by selecting the button on the left hand side.
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=2.5in]{images/clustalwparamdetail.pdf}
+\caption{{\bf ClustalW parameter slider detail}. From the ClustalW {\sl Clustal $\Rightarrow$ Edit settings and run ...} dialog box. }
+\label{clustalwparamdetail}
+\end{center}
+\end{figure} 
+
+\subsection{Alignment Presets}
+The different multiple alignment algorithms available from JABA vary greatly in
+the number of adjustable parameters, and it is often difficult to identify what
+are the best values for the sequences that you are trying to align. For these
+reasons, each JABA service may provide one or more presets -- which are
+pre-defined sets of parameters suited for particular types of alignment
+problem. For instance, the Muscle service provides the following presets:
+\begin{list}{$\bullet$}{}
+\item Large alignments (balanced)
+\item Protein alignments (fastest speed)
+\item Nucleotide alignments (fastest speed)
+\end{list}
+
+The presets are displayed in the JABA web services submenu, and can also be
+accessed from the parameter editing dialog box, which is opened by selecting
+the `{\sl Edit settings and run ...}' option from the web services menu. If you have used
+a preset, then it will be mentioned at the beginning of the job status file shown
+in the web service job progress window.
+
+\subsection{User Defined Presets}
+Jalview allows you to create your own presets for a particular service. To do
+this, select the `{\sl Edit settings and run ...}' option for your service,
+which will open a parameter editing dialog box like the one shown in Figure
+\ref{jwsparamsdialog}.
+
+The top row of this dialog allows you to browse the existing presets, and
+when editing a parameter set, allows you to change its nickname. As you
+adjust settings, buttons will appear at the top of the parameters dialog that
+allow you to Revert or Update the currently selected user preset with your changes, Delete the current preset, or Create a new preset, if none exists with the given name. In addition to the parameter set name, you can also provide a short
+description for the parameter set, which will be shown in the tooltip for the
+parameter set's entry in the web services menu.
+
+\subsubsection{Saving Parameter Sets}
+When creating a custom parameter set, you will be asked for a file name to save
+it. The location of the file is recorded in the Jalview user preferences in the
+same way as a custom alignment colourscheme, so when Jalview is launched again,
+it will show your custom preset amongst the options available for running the
+JABA service.
+
+%% TODO - reinstate this exercise about reinstating presets
+% 
+% \exercise{Creating and using user defined presets}{\label{createandusepreseex}
+% \exstep{Import the file at
+% \textsf{http://www.jalview.org/tutorial/fdx\_unaligned.fa} into jalview.}
+% \exstep{Use the `{\slDiscover Database Ids}' function to recover the PDB cross
+% references for the sequences.}
+% \exstep{Align the sequences using the default ClustalW parameters.}
+% \exstep{Use the `{\sl Edit and run..}'
+% option to open the ClustalW parameters dialog box, and create a new preset using
+% the following settings:
+% \begin{list}{$\bullet$}{}
+% \item BLOSUM matrix (unchanged)
+% \item Gap Opening and End Gap penalties = 0.05
+% \item Gap Extension and Separation penalties = 0.05
+% \end{list}
+% 
+% As you edit the parameters, buttons will appear on the dialog box
+% allowing you revert your changes or save your settings as a new parameter
+% set.
+% 
+% Before you save your settings, remeber to give them a meaningful name by editing
+% the text box at the top of the dialog box.
+% }
+% \exstep{Repeat the alignment using your new parameter set by selecting it from
+% the {\sl ClustalW Presets menu}.} 
+% \exstep{These sequences have PDB structures associated with them, so it is
+% possible to compare the quality of the alignments.
+% 
+% Use the {\sl View all {\bf N}
+% structures} option to calculate the superposition of 1fdn on 1fxd for both
+% alignments (refer to section \ref{superposestructs} for instructions). Which
+% alignment gives the best RMSD ? }
+% \exstep{Apply the same alignment parameter settings to the example alignment
+% (available from \textsf{http://www.jalview.org/examples/uniref50.fa}). 
+% 
+% Are there differences ? If not, why not ?
+% }
+% }
+
+%%TODO just typing a value into parameter slider doesn't actually modify value, return needs to be hit. This is not intuitive (these days) - loss of focus should update values of parameters (e.g. when the run/start job button is hit)
+
+\section{Protein Alignment Conservation Analysis}
+\label{aacons}
+The {\sl Web Service $\Rightarrow$ Conservation} menu controls the computation
+of over 17 different amino acid conservation measures for the current alignment
+view. The JABAWS AACon Alignment Conservation Calculation Service, which is used
+to calculate these scores, provides a variety of standard measures described by
+Valdar in 2002\footnote{Scoring residue conservation. Valdar (2002) {\sl
+Proteins: Structure, Function, and Genetics} {\bf 43} 227-241.} as well as an efficient implementation of the SMERFs
+score developed by Manning et al. in 2008.\footnote{SMERFS Score Manning et al. {\sl BMC
+Bioinformatics} 2008, {\bf 9} 51 \href{http://dx.doi.org/10.1186/1471-2105-9-51}{doi:10.1186/1471-2105-9-51}}
+
+\subsection{Enabling and Disabling AACon Calculations}
+When the AACon Calculation entry in the {\sl Web Service $\Rightarrow$
+Conservation} menu is ticked, AACon calculations will be performed every time
+the alignment is modified. Selecting the menu item will enable or disable
+automatic recalculation.
+
+\subsection{Configuring which AACon Calculations are Performed}
+The {\sl Web Service $\Rightarrow$ Conservation $\Rightarrow$ Change AACon
+Settings ...} menu entry will open a web services parameter dialog for the
+currently configured AACon server. Standard presets are provided for quick and
+more expensive conservation calculations, and parameters are also provided to
+change the way that SMERFS calculations are performed.
+AACon settings for an alignment are saved in Jalview projects along with the
+latest calculation results.
+
+\subsection{Changing the Server used for AACon Calculations}
+If you are working with alignments too large to analyse with the public JABAWS
+server, then you will most likely have already configured additional JABAWS
+servers. By default, Jalview will chose the first AACon service available from
+the list of JABAWS servers available. You can change the AACon services by 
+selecting it from the {\sl Web Service $\Rightarrow$
+Conservation $\Rightarrow$ Change AACon Settings} submenu.
+Alternatively to add new service, go to the desktop window menu and select {\sl Tools $\Rightarrow$
+Preferences $\Rightarrow$ Web Services tab} and add {\sl New Services URL}, then use the {\sl move up} or {\sl move down} buttons 
+to reorder the services.
+
+
+\chapter{Analysis of Alignments}
 \label{alignanalysis}
-Jalview provides support for sequence analysis in two ways. A number of analytical methods are `built-in' and run inside Jalview itself and are mostly accessed from the {\sl Calculate} alignment window menu. Computationally intensive analyses are run outside Jalview via web services - these are typically accessed via the {\sl Web Services} menu, and described in Section \ref{jvwebservices}. In this section, we describe the built-in analysis capabilities common to both the Jalview Desktop and the JalviewLite applet.
+Jalview provides support for sequence analysis in two ways. A number of
+analytical methods are `built-in', these are accessed from the {\sl Calculate}
+alignment window menu. Computationally intensive analyses are run outside
+Jalview {\sl via} web services - and found under the
+{\sl Web Service} menu. In this section, we describe the built-in analysis
+capabilities common to both the Jalview Desktop and the JalviewJS.
  
-\subsection{PCA}
-This calculation creates a spatial representation of the similarities within the current selection or the whole alignment if no selection has been made. After the calculation finishes, a 3D viewer displays the each sequence as a point in 3D `similarity space'. Sets of similar sequences tend to lie near each other in this space.
-Note: The calculation is computationally expensive, and may fail for very large sets of sequences - because the JVM has run out of memory. Memory issues were discussed in Section \ref{memorylimits}.
-\subsubsection{What is PCA?}
+\section{PCA}
+Principal components analysis calculations create a spatial
+representation of the similarities within the current selection or the whole alignment if no selection has been made. After
+the calculation finishes, a 3D viewer displays each sequence as a point in
+3D `similarity space'. Sets of similar sequences tend to lie near each other in
+this space.
+Note: The calculation is computationally expensive, and may fail for very large
+sets of sequences - because the JVM has run out of memory. Memory issues, and
+how to overcome them, were discussed in Section \ref{memorylimits}.
 
-Principal components analysis is a technique for examining the structure of complex data sets. The components are a set of dimensions formed from the measured values in the data set, and the principle component is the one with the greatest magnitude, or length. The sets of measurements that differ the most should lie at either end of this principle axis, and the other axes correspond to less extreme patterns of variation in the data set.
-In this case, the components are generated by an eigenvector decomposition of the matrix formed from the sum of BLOSUM 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. \rPMID: 7749921} and implemented at the SeqSpace server at the EBI.
+\subsubsection{What is PCA?}
+Principal components analysis is a technique for examining the structure of
+complex data sets. The components are a set of dimensions formed from the
+measured values in the data set, and the principal component is the one with the
+greatest magnitude, or length. The sets of measurements that differ the most
+should lie at either end of this principal axis, and the other axes correspond
+to less extreme patterns of variation in the data set.
+In this case, the components are generated by an eigenvector decomposition of
+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.\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}
 
-PCA analysis can be launched from the {\sl Calculate $\Rightarrow$ Principle Component Analysis} menu option. PCA requires a selection containing at least 4 sequences.  A window opens containing the PCA tool (Figure \ref{PCA}). Each sequence is represented by a square, coloured by the background colour of the sequence ID label. The axes can be rotated by clicking and dragging the left mouse button and zoomed using the $\uparrow$ and $\downarrow$ keys or the scroll wheel of the mouse (if available).  A tool tip appears if the cursor is placed over a sequence. Sequences can be selected by clicking on them. [CTRL]-Click can be used to select multiple sequences. 
+PCA analysis can be launched from the {\sl Calculate $\Rightarrow$ Tree or PCA} menu option. 
+{\bf PCA requires a selection containing at
+least 4 sequences}.  In the Choose Calculation window, select the {\sl Principal Components Analysis} button and then select {\sl Calculate} 
+(Figure \ref{PCA}).
+Each sequence is represented by a small square, coloured by the background
+colour of the sequence ID label. The axes can be rotated by clicking and
+dragging the left mouse button and zoomed using the $\uparrow$ and $\downarrow$
+keys or the scroll wheel of the mouse (if available).  A tool tip appears if the
+cursor is placed over a sequence. Sequences can be selected by clicking on them.
+[CTRL]-Click can be used to select multiple sequences.
+
+Labels will be shown for each sequence by toggling the {\sl View $\Rightarrow$
+Show labels} menu option, and the plot background colour changed {\sl via} the
+{\sl View $\Rightarrow$ Background Colour..} dialog box. A graphical
+representation of the PCA plot can be exported as an EPS or PNG image {\sl via}
+the {\sl File $\Rightarrow$ Save as $\Rightarrow$ \ldots } submenu.
+
+\exercise{Principal Component Analysis}
+{\label{pcaex}
+\exstep{Load the alignment at
+\textsf{http://www.jalview.org/tutorial/alignment.fa}.}
+\exstep{Select the menu option {\sl Calculate $\Rightarrow$ Tree or PCA..}.  in the alignment
+window and a dialogue box will open. Select the Principal Component Analysis option
+and then click the Calculate button.} 
+\exstep{Move
+this window within the desktop so that the alignment and PCA viewer windows are visible.
+Try rotating the plot by clicking and dragging the mouse on the plot in the PCA window.
+Note that clicking on points in the plot will highlight the sequences on the
+alignment.}
+\exstep{Use the [ESC] key to deselect sequence selection.
+Select {\sl Calculate $\Rightarrow$ Tree or PCA..}. in the alignment window. In dialogue box select Neighbour
+Joining and in the drop-down list select BLOSUM62. Click the Calculate button
+and a tree window will open.}
+\exstep{Place the mouse cursor on the tree so that the
+tree partition divides the tree into a number of groups, each with a
+different (arbitrarily selected) colour.
+Note how the colour of the sequence ID label matches both the colour of
+the partitioned tree and the points in the PCA plot.} 
+{\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
+}
+
 \begin{figure}[hbtp]
 \begin{center}
 \includegraphics[width=2in]{images/PCA1.pdf}
 \includegraphics[width=3in]{images/PCA3.pdf}
-\caption{{\bf PCA Analysis} }
+\caption{{\bf PCA Analysis.} }
 \label{PCA}
 \end{center}
 \end{figure}
-Labels will be shown for each sequence by toggling the {\sl View $\Rightarrow$ Show Labels} menu option, and the plot background colour changed via the {\sl View $\Rightarrow$ Background Colour..} dialog box. A graphical representation of the PCA plot can be exported as an EPS or PNG image via the {\sl File $\Rightarrow$ Save As $\Rightarrow$ \ldots } submenu.
 
-\exercise{Principle Component Analysis}{
-\exstep{Load the alignment at \textsf{http://www.jalview.org/examples/exampleFile.jar} and select {\sl Edit $\Rightarrow$ Undefine Groups}.
-} 
-\exstep{Select the menu option {\sl Calculate $\Rightarrow$ Principle Component Analysis}. A new window will open. Move this window so that the tree, alignment and PCA viewer window are all visible. Try rotating the plot by clicking and dragging the mouse on the plot in the PCA window. Note that clicking on points in the plot will highlight them on the alignment and tree.
-}
-\exstep{
-Click on the tree window. Careful selection of the tree partition location will divide the alignment into a number of groups, each of a different colour. Note how the colour of the sequence ID label matches both the colour of the partitioned tree and the points in the PCA plot.
-}
-}
 
-\subsection{Trees}
+
+\subsubsection{PCA Data Export}
+Although the PCA viewer supports export of the current view, the plots produced
+are rarely suitable for direct publication. The PCA viewer's {\sl File} menu
+includes a number of options for exporting the PCA matrix and transformed points
+as comma separated value (CSV) files. These files can be imported by tools such
+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 via the {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ \ldots} submenu. Trees can be calculated from distance matrices determined from \% identity or aggregate BLOSUM 62 score using either average distance (UPGMA) or Neighbour joining algorithms. The input data for a tree calculation is either the visible portions of the current selection, or the whole alignment if no selection is present.
 
-On calculating a tree, a new window opens (Figure \ref{trees1}) which contains the tree. Various display options can be found in the tree window {\sl View} menu, and export options in the {\sl File $\Rightarrow$ Save As} submenu. Newick format is a standard file format for trees which allows them to be exported to other programs.  Jalview can also read in external trees in Newick format via the {\sl File $\Rightarrow$ Load Associated Tree} menu 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$ Show Unlinked Leaves }.
+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$ Tree or PCA \ldots} menu option.
+Trees can be calculated from distance matrices determined from \% identity or
+aggregate BLOSUM 62 score using either {\sl Average Distance} (UPGMA) or {\sl
+Neighbour Joining} algorithms. The input data for a tree is either the selected
+region or the whole alignment, excluding any hidden regions.
+
+On calculating a tree, a new window opens (Figure \ref{trees1}) which contains
+the tree. Various display settings can be found in the tree window {\sl View}
+menu, including font, scaling and label display options. The {\sl File
+$\Rightarrow$ Save As} submenu contains options for image and Newick file
+export. Newick format is a standard file format for trees which allows them to
+be exported to other programs.  Jalview can also read in external trees in
+Newick format {\sl via} the {\sl File $\Rightarrow$ Load Associated Tree} menu
+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}
@@ -1180,97 +2736,298 @@ On calculating a tree, a new window opens (Figure \ref{trees1}) which contains t
 \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 four built in models for calculating trees. Jalview can also load precalculated trees in Newick format (right).}
+\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} alignment window menu option and 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.
-
 \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}
+\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.
+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.
 
-\subsubsection{Recovering input data for a tree or PCA plot calculation}
-\parbox[c]{4in}{
-The {\sl File $\Rightarrow$ Input Data } option will open a new alignment window containing the original data used to calculate the tree or PCA plot (if available). This function is useful when a tree has been created and then the alignment subsequently changed. 
-} \parbox[c]{3in}{\centerline{\includegraphics[width=2.75in]{images/pca_vmenu.pdf}
-}}
 
-\subsubsection{Changing the associated view for a tree or PCA viewer}
-\parbox[c]{5in}{
-The {\sl View $\Rightarrow$ Associated View $\Rightarrow$ .. } submenu is shown when the viewer is associated with an alignment that is involved in multiple views. Selecting a different view does not affect the tree or PCA data, but will change the colouring and display of selected sequences in the display in accord with the colouring and selection state of the newly associated view. 
-} \parbox[c]{=2in}{\centerline{ \includegraphics[width=1.3in]{images/pca_fmenu}  
-}}
+\exercise{Trees}
+{\label{treeex}
+
+\exstep{Open the alignment at
+\textsf{http://www.jalview.org/tutorial/alignment.fa}.}
+
+\exstep{Select {\sl Calculate $\Rightarrow$ Tree or PCA..}. in the alignment
+window menu and a dialogue box opens. In the tree section select Neighbour
+Joining, in the drop-down list select BLOSUM62 and click the Calculate
+button. A tree window will open.}
 
+\exstep{Click on the
+tree window, a cursor will appear as a vertical line. Note that clicking will
+place this cursor, and divides the tree into a number of groups, each highlighted
+with a different colour. Place the cursor to give about 4 groups.}
 
-\exercise{Trees}{
-\exstep{ Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. A new tree window will appear.}
-\exstep{Click on the tree window. A cursor will appear. Note that placing this cursor divides the tree into a number of groups by colour. Place the cursor to give about 4 groups, then select {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$ By Tree Order $\Rightarrow$ Neighbour Joining Tree using BLOSUM62 from ... }. The sequences are reordered to match the order in the tree and groups are formed implicitly.}
-\exstep{Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using \% Identity}. A new tree window will appear. The group colouring makes it easy to see the diferences between the two trees, calculated using different methods.}
-\exstep{Select from sequence 2 column 60 to sequence 12 column 123. Select  {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. A new tree window will appear. It can be seen that the tree contains 11 sequences. It has been coloured according to the already selected groups from the first tree and is calculated purely from the residues in the selection. 
-Comparing the location of individual sequences between the two trees illustrates the importance of selecting appropriate regions of the alignment for the calculation of trees. 
+\exstep{Place the mouse cursor on a node of the tree to open a tool tip. Double click the node to invert the leaves.
 }
-\exstep{Recover the input data for the tree you just calculated. Check the {\sl Edit $\Rightarrow$ Pad Gaps } option is not ticked, and insert one gap in the alignment. Now select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. 
 
-A warning dialog box {\bf ``Sequences must be aligned'' } appears because the sequences input to the tree calculation are of different lengths. }
+\exstep{In the tree window, select {\sl View $\Rightarrow$ Sort Alignment
+by Tree}. The sequences are reordered to match the order in the tree and groups 
+ are formed implicitly. Alternatively in the alignment window, select
+{\sl Calculate $\Rightarrow$ Sort $\Rightarrow$ By Tree Order $\Rightarrow$
+ Neighbour Joining Tree using BLOSUM62 from...}.}
 
-\exstep{Now select {\sl Edit $\Rightarrow$ Pad Gaps } and try to perform the tree calculation again - this time a new tree should appear.
+\exstep{Select {\sl Calculate $\Rightarrow$ Tree or PCA..}. in the alignment
+window. In the dialogue box, select Average Distance and in the drop down
+list select BLOSUM62. Click the Calculate button and a new
+tree window will appear. The group colouring makes it easy to see the differences between the two
+trees calculated by the different methods.}
 
-This demonstrates the use of the {\sl Pad Gaps } editing preference, which ensures that all sequences are the same length after editing. }
+\exstep{With no groups selected in the alignment window, select sequence 2 from
+column 60 to sequence 12 and column 123. Select {\sl Calculate $\Rightarrow$
+Tree or PCA..}. , in the dialogue box select Neighbour Joining and
+BLOSUM62, then click the Calculate button.
+ A tree will appear containing 11 sequences. It has been coloured
+ according to the already selected groups from the first tree and is calculated purely from the residues
+ in the selection.}
+
+Comparing the location of individual sequences between the three trees illustrates the importance of selecting appropriate regions of the 
+alignment for the calculation of trees.
+
+{\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
 
 }
 
+%\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.
+
+\subsubsection{Recovering input data for a Tree or PCA Plot Calculation}
+\parbox[c]{5in}{
+The {\sl File $\Rightarrow$ Input Data } option will open a new alignment window containing the original data used to calculate the tree or PCA plot (if available). This function is useful when a tree has been created and then the alignment subsequently changed. 
+}
+\parbox[c]{1.25in}{\centerline{\includegraphics[width=1.25in]{images/pca_fmenu.pdf}
+}}
+
+\subsubsection{Changing the associated view for a Tree or PCA Viewer}
+\parbox[c]{4in}{
+The {\sl View $\Rightarrow$ Associated Nodes With $\Rightarrow$ .. } submenu is shown when the viewer is associated with an alignment that is involved in multiple views. Selecting a different view does not affect the tree or PCA data, but will change the colouring and display of selected sequences in the display according to the colouring and selection state of the newly associated view. 
+} \parbox[c]{3in}{\centerline{
+\includegraphics[width=2.5in]{images/pca_vmenu.pdf} }}
+
 \subsection{Tree Based Conservation Analysis}
 \label{treeconsanaly}
-\exercise{Tree Based Conservation Analysis}{
-\exstep{Load the PF03460 Seed alignment using the sequence fetcher. Colour it with the {\sl Taylor colourscheme}, and apply {\sl Conservation } shading. }
-\exstep{Build a Neighbourjoining tree using BLOSUM62 and use the sort submenu to order alignment using the calculated tree.}
-\exstep{Select a point on the tree to partition the alignment, and examine the variation in colouring between different groups. 
 
-You may find it easier to browse the alignment by if you uncheck the {\sl Show Annotations} view option, and open the overview window to aid navigation.}
-\exstep{Try changing the colourscheme to BLOSUM62 (whilst ensuring that {\sl Apply Colour to All Groups} is selected)}
+Trees reflect the pattern of global sequence similarity exhibited by the
+alignment, or region within the alignment, that was used for their calculation.
+The Jalview tree viewer enables sequences to be partitioned into groups based
+on the tree. This is done by clicking within the tree viewer window. Once subdivided, the
+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 Annotations $\Rightarrow$ Autocalculated
+Annotation $\Rightarrow$ Group Conservation} and {\sl Group Consensus} options)
+can help when working with larger alignments.
+
+
+
+
+%\exercise{Pad Gaps in an Alignment}{
+%\exstep{Open the alignment at
+% \textsf{http://www.jalview.org/tutorial/alignment.fa}. In alignment window, ensure that the {\sl Edit $\Rightarrow$ Pad Gaps } option is {\sl not} ticked, and insert one gap anywhere in the
+%alignment.}
+%\exstep{Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$
+%Neighbour Joining Using BLOSUM62}.
+
+%A warning dialog box {\bf ``Sequences not aligned'' } appears because the
+% sequences input to the tree calculation are of different lengths. }
+
+%\exstep{Select {\sl Edit $\Rightarrow$ tick Pad Gaps } and perform the
+%tree calculation again. This time a new tree should appear - because padding
+%gaps ensures all the sequences are the same length after editing.}
+%{\sl Pad Gaps } option
+%can be set in Preferences using
+%{\sl Tool $\Rightarrow$ Preference $\Rightarrow$ Editing}.
+
+%{\bf See the video at:
+%\url{http://www.jalview.org/training/Training-Videos}.}
+%}
+
+ \exercise{Tree Based Conservation Analysis}{
+\label{consanalyexerc}
+\exstep{Load the PF03460 PFAM seed alignment using the sequence fetcher. 
+Select {\sl Colour $\Rightarrow$ Taylor $\Rightarrow$ By Conservation}, set
+ {\sl Conservation} shading threshold at around 20. }
+ \exstep{Build a Neighbour joining tree by selecting {\sl Calculate
+ $\Rightarrow$ Tree or PCA..}. in the alignment window. In the dialogue box, select Neighbour
+Joining and in the drop-down
+list select BLOSUM62, then click the Calculate button.}
+\exstep{Use the cursor to select a point on the tree to partition the
+alignment into groups.}
+\exstep {Select {\sl View $\Rightarrow$ Sort Alignment By Tree} option in the
+tree window to re-order the sequences in the alignment.
+Examine the variation in colouring between different groups of sequences in the
+ alignment window. }
+\exstep {You may find it easier to browse the alignment if you first uncheck
+ the {\sl Annotations $\Rightarrow$ Show Annotations} option. Open the
+Overview Window from the View menu to aid navigation.}
+
+\exstep{Try changing the colourscheme of the residues in the alignment to
+BLOSUM62 (whilst ensuring that {\sl Apply Colour to All Groups} is selected).}
+{\sl Note: You may want to save the alignment and tree as a project file, since
+it is used in the next set of exercises. }
+
+{\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
 }
 
+
 \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, 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}
 \end{center}
 \label{removeredundancydialog}
-\caption{The Redundancy Removal dialog box opened from the edit menu. Sequences that exceed the current percentage identity threshold and are to be removed are highlighted in black.}
+\caption{The Redundancy Removal dialog box opened from the edit menu. Sequences that exceed the current percentage identity 
+threshold and are to be removed are highlighted in black.}
 \end{figure}
 
-\exercise{Remove redundant sequences}{
-\exstep{Re-use or recreate the alignment and tree which you worked with in the tree based conservation analysis exercise (exercise \ref{treeconsanaly})}
-\exstep{Open the Remove Redundancy dialog and adjust the threshold to 90\%. Remove the seuqences that are more than 90\% similar under this alignment.}
-\exstep{Select the Tree viewer's {\sl View $\Rightarrow$ Show Linked Leaves} option, and note that the removed sequences are now prefixed with a * in the tree view.}
-\exstep{Use the [Undo] button on the dialog to recover the sequences. Note that the * symbols disappear from the tree display.}
-\exstep{Experiment with the redundancy removal and observe the relationship between the percentage identity threshold and the pattern of unlinked nodes in the tree display.}
-}
-
-\subsection{Other Calculations}
-
-On loading a sequence alignment, Jalview calculates alignment quality, conservation and consensus as alignment annotations. Conservation is calculated according to Livingstone and Barton\footnote{{\sl "Protein Sequence Alignments: A Strategy for the Hierarchical Analysis of Residue Conservation." } Livingstone C.D. and Barton G.J. (1993) {\sl CABIOS } {\bf 9}, 745-756}. Consensus is the modal residue (or {\tt +} where there is an equal top residue). The inclusion of gaps in the consensus calculation can be toggled by right-clicking on the the Consensus label and selecting {\sl Ignore Gaps in Consensus} from the context menu. Quality is a measure of the inverse likelihood of unfavourable mutations in the alignment. Further details on these calculations can be found in the on-line documentation.
 
-These annotations can be hidden and deleted but are only created on loading an alignment. If they are deleted then the alignment should be saved and reloaded to restore them. Jalview provides a toggle to autocalculate a consensus sequence upon editing. This is normally left selected but for large alignments can be turned off via the {\sl Calculate $\Rightarrow$ Autocalculate Consensus} menu option if the interface is too sluggish.
-
-\subsubsection{Pairwise Alignments}
+\subsection{Subdividing the Alignment According to Specific Mutations}
+
+It is often necessary to explore variations in an alignment that may correlate
+with mutations observed in a particular region; for example, sites exhibiting
+single nucleotide polymorphism, or residues involved in substrate recognition in
+an enzyme. One way to do this would be to calculate a tree using the specific
+region, and subdivide it in order to partition the alignment.
+However, calculating a tree can be slow for large alignments, and the tree may
+be difficult to partition when complex mutation patterns are being analysed. The
+{\sl Select $\Rightarrow$ Make groups for selection } function was introduced to
+make this kind of analysis easier. When selected, it will use the characters in
+the currently selected region to subdivide the alignment. For example, if a
+single column is selected, then the alignment (or each group defined on the
+alignment) will be divided into groups based on the residue or nucleotide found
+at that position. These new groups are annotated with the characters in the
+selected region, and Jalview's group based conservation analysis annotation and
+colourschemes can then be used to reveal any associated pattern of sequence
+variation across the whole alignment.
+
+
+% These annotations can be hidden and deleted via the context menu linked to the
+% annotation row; but they are only created on loading an alignment. If they are
+% deleted then the alignment should be saved and then reloaded to restore them.
+% Jalview provides a toggle to autocalculate a consensus sequence upon editing.
+% This is normally selected by default, but can be turned off for large alignments {\sl via} the {\sl Calculate $\Rightarrow$ Autocalculate
+% Consensus} menu option if the interface is too slow.
+
+% \subsubsection{Group Associated Annotation}
+% \label{groupassocannotation}
+% Group associated consensus and conservation annotation rows reflect the
+% sequence variation within a particular group. Their calculation is enabled
+% by selecting the {\sl Group Conservation} or {\sl Group Consensus} options in
+% the {\sl Annotation $\Rightarrow$ Autocalculated Annotation } submenu of the
+% alignment window. 
+
+% \subsubsection{Alignment and Group Sequence Logos}
+% \label{seqlogos}
+
+% The consensus annotation row that is shown below the alignment can be overlaid
+% with a sequence logo that reflects the symbol distribution at each column of
+% the alignment. Right click on the Consensus annotation row and select the {\sl
+% Show Logo} option to display the Consensus profile for the group or alignment.
+% Sequence logos can be enabled by default for all new alignments {\sl via} the
+% Visual tab in the Jalview desktop's preferences dialog box.
+
+\section{Pairwise Alignments}
+Jalview can calculate optimal pairwise alignments between arbitrary 
+sequences {\sl via} the {\sl Calculate $\Rightarrow$ Pairwise Alignments\ldots} menu option. 
+Global alignments of all pairwise combinations of the selected sequences are performed and the results returned in a text box.
+
+
+
+\exercise{Remove Redundant Sequences}{
+\label{redundantex}
+\exstep{Using the alignment generated in the previous exercise (exercise
+\ref{consanalyexerc}).
+In the alignment window, you may need to deselect groups using Esc key.}
+
+\exstep{In the {\sl Edit} menu select {\sl Remove Redundancy} to open the
+Redundancy threshold selection dialog. Adjust the redundancy threshold value, start
+at 50 and increase the value to 65. Sequences selected will change colour in the Sequence ID panel. Select ``Remove'' to
+remove the sequences that are more than 65\% similar under this alignment.}
+
+\exstep{From the tree window, select {\sl View $\Rightarrow$
+Mark Unlinked Leaves} option, and note that the removed sequences are now prefixed with a * in the tree view.}
+ \exstep{Use the [Undo] button in the Redundancy threshold selection dialog box
+to recover the sequences. Note that the * symbols disappear from the tree display.}
+\exstep{Experiment with the redundancy removal and observe the relationship between the percentage identity threshold and 
+the pattern of unlinked nodes in the tree display.}
+}
 
-Jalview can calculate optimal pairwise alignments between arbitrary sequences via the {\sl Calculate $\Rightarrow$ Pairwise Alignments\ldots} menu option. Global alignments of all pairwise combinations of the selected sequences are performed and the results returned in a text box.
+\exercise{Group Conservation Analysis}{
+\label{conservationex}
+\exstep{Re-use or recreate the alignment and tree which you worked with in the
+tree based conservation analysis exercise (exercise \ref{consanalyexerc}).} 
+\exstep{In the {\sl View} menu in the alignment window, select {\sl New View} to
+create a new view. Ensure the annotation panel is displayed ({\sl Annotations $\Rightarrow$ Show Annotations} is toggled on). Enable the
+display of {\sl Group Consensus} option by checking {\sl Group Consensus} in the {\sl Annotation $\Rightarrow$
+Autocalculated Annotation $\Rightarrow$
+Group Consensus} submenu.}
+
+\exstep{Displaying the sequence 
+logos will make it easier to see the different residue populations within each
+group. Activate the logo by right clicking the name of the Consensus annotation to
+open the context menu and select the {\sl Show Logo} option. Alter its size, by moving the cursor onto the annotation row, right clicking the 
+mouse and dragging it up. Alter its position, by right clicking the name of the Consensus annotation 
+and dragging it up to the top of the annotations.} 
+\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}.}
+\exstep{Re-order the alignment according to the new groups that have been
+defined by selecting {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$
+By Group}.
+Click on the group annotation row IDs to select groups exhibiting a
+specific mutation.}
+\exstep{Select another column exhibiting about 50\% conservation
+overall, and subdivide the alignment further. Note that the new groups
+inherit the names of the original groups, allowing you to identify the
+combination of mutations that resulted in the subdivision.}
+\exstep{Clear the groups, and try to subdivide the alignment using two
+non-adjacent columns.
+
+{\sl Hint: You may need to hide the intervening columns before you can select
+both of the columns that you wish to use to subdivide the alignment.}}
+\exstep{Switch back to the original view, and experiment with subdividing
+the tree groups made in the previous exercise.}
+{\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
+}
 
-\begin{figure}[htbp]
+\begin{figure}[]
 \begin{center}
 \includegraphics[width=4in]{images/pairwise.pdf}
 \caption{{\bf Pairwise alignment of sequences.} Pairwise alignments of three selected sequences are shown in a textbox.}
@@ -1279,311 +3036,951 @@ Jalview can calculate optimal pairwise alignments between arbitrary sequences vi
 \end{figure}
 
 
-\section{Webservices}
-\label{jvwebservices}
-``Webservices'' are a set of technologies based on HTTP\footnote{HTTP: Hyper-Text Transfer Protocol.} which are can be utilised by the Jalview application to access databases remotely and offload computationally intensive tasks to High Performance Computing facilities {\sl via} the internet. Access to remote database resources are described in detail in Section \ref{featuresfromdb}. They include sequence retrieval (in Section \ref{fetchseq}), database reference retrieval (in Section \ref{fetchdbrefs}) and sequence feature retrieval with DAS, which is described in Section \ref{dasfretrieval}. The next few sections describe the computational analysis services available to Jalview.
-
-\subsection{Remote Analysis Services}
-Jalview will construct a job, ask the remote server to run the job, monitor status of the job and, finally, retrieve the results of the job and display them. The Jalview user is kept informed of the progress of the job through a status window.
-
-Currently, web service jobs and their status windows are not stored in Jalview Project Files\footnote{This may be rectified in future versions.}, so it is important that you do not close Jalview whilst a job is running. It is also essential that you have a continuous network connection in order to successfully use Web Services from Jalview, since it periodically checks the progress of running jobs.
-
-\subsection{Multiple Sequence Alignment}
-
-Sequences can be aligned using any of three algorithms: ClustalW\footnote{{\sl "CLUSTAL W: improving the sensitivity of progressive multiple sequence alignment through sequence weighting, position specific gap penalties and weight matrix choice."} Thompson JD, Higgins DG, Gibson TJ (1994) {\sl  Nucleic Acids Research} {\bf 22}, 4673-80}, Muscle\footnote{{\sl "MUSCLE: a multiple sequence alignment method with reduced time and space complexity"} Edgar, R.C. (2004) {\sl BMC Bioinformatics} {\bf 5}, 113}  or MAFFT\footnote{{\sl "MAFFT: a novel method for rapid multiple sequence alignment based on fast Fourier transform"}  Katoh, K., Misawa, K., Kuma, K. and Miyata, T. (2002) {\sl  Nucleic Acids Research} {\bf 30}, 3059-3066.  and {\sl "MAFFT version 5: improvement in accuracy of multiple sequence alignment"} Katoh, K., Kuma, K., Toh, H. and Miyata, T. (2005) {\sl Nucleic Acids Research} {\bf 33}, 511-518.} Of these, ClustalW is the slowest but is historically the most widely used. Muscle is fast and probably the most accurate for smaller alignments and MAFFT is probably the best for large alignments. 
-
-
-To run an alignment web service, select the appropriate method from the {\sl Web Service $\Rightarrow$  Alignment $\Rightarrow$ \ldots} submenu (Figure \ref{webservices}). A progress window will appear giving information about the job and any errors that occur. After successful completion of the job, a new window is opened with the results, in this case an alignment.
+% To review, Chapter \ref{featannot} describes the mechanisms provided by
+% Jalview for interactive creation of sequence and alignment annotation, and how
+% they can be displayed, imported and exported and used to reorder the alignment. Chapter
+% \ref{featuresfromdb} discusses the retrieval of database references and
+% establishment of sequence coordinate systems for the retrieval and display of
+% features from databases and DAS annotation services.
+% Chapter \ref{msaservices} describes how to use the range of multiple alignment
+% programs provided by JABAWS, and Chapter \ref{aacons} introduces JABAWS AACon
+% service for protein multiple alignment conservation analysis.
+%  In Chapter \ref{alignanalysis}, you will find
+% descriptions and exercises on building and displaying trees, PCA analysis,
+% alignment redundancy removal, pairwise alignments and alignment conservation
+% analysis. 
+% Chapter \ref{wkwithstructure} introduces the structure visualization
+% capabilities of Jalview.
+% Chapter \ref{protsspredservices} explains how to perform protein secondary
+% structure predictions with JPred, and JABAWS protein disorder prediction
+% services are introduced in Chapter \ref{protdisorderpred}.
+% Chapter \ref{workingwithnuc} describes functions and visualization techniques
+% relevant to working with nucleotide sequences, coding region annotation and nucleotide
+% sequence alignments.
+% Chapter \ref{jvwebservices} introduces the various web based services
+% available to Jalview users, and Chapter \ref{jabaservices} explains how to
+% configure the Jalview Desktop for access to new JABAWS servers.
+
+
+% and Section \ref{workingwithrna} covers the visualization,
+% editing and analysis of RNA secondary structure.
+
+\chapter{Working with 3D structures}
+\label{3Dstructure}
+\label{wkwithstructure}
+Jalview facilitates the use of 3D structure data for the analysis of alignments
+by providing a linked view of structures associated with the aligned sequences.
+It also allows sequence, secondary structure and B-factor data to be imported
+from structure files, and supports the use of the EMBL-EBI's SIFTS database to
+construct accurate mappings between UniProt protein sequences and structures
+retrieved from the PDB.
+
+\section{Molecular graphics systems supported by Jalview}
+Jalview can interactively view 3D structure using Jmol, a Java based molecular
+viewing program\footnote{See the Jmol homepage \url{http://www.jmol.org} for
+more information.} integrated with Jalview.\footnote{Earlier
+versions of Jalview included MCView - a simple main chain structure viewer.
+Structures are visualized as an alpha carbon trace and can be viewed, rotated
+and coloured using the sequence alignment.} It also supports the use of UCSF
+Chimera, a powerful molecular graphics system that needs separate installation.
+Jalview can also read PDB and mmCIF format files directly to extract sequences
+and secondary structure information, and retrieve records from the European
+Protein Databank (PDBe) using the Sequence Fetcher (see \ref{fetchseq}).
+
+\subsection{Configuring the default structure viewer}
+\label{configuring3dviewer}
+To configure which viewer is used when creating a new
+structure view, open the Structures preferences window {\sl via} {\sl Tools $\Rightarrow$ Preferences\ldots} and
+select either JMOL or CHIMERA as the default viewer. If you select Chimera,
+Jalview will search for the installed program, and if it cannot be found,
+you will be prompted to locate the Chimera binary, or alternately, open the UCSF
+Chimera download page to obtain the software.
+
+\section{Automatic Association of PDB Structures with Sequences}
+Jalview will attempt to automatically determine which structures are associated
+with a sequence via its ID, and any associated database references. To do this
+for a particular sequence or the current selection, open the Sequence ID popup
+menu and select {\sl View 3D Structure}, to open the 3D Structure Chooser. 
+%(Figure\ref{auto}). 
+
+When the structure chooser is first opened, if no database identifiers are
+available, Jalview will automatically perform a database reference
+retrieval (See \ref{fetchdbrefs}) to discover identifiers for the
+sequences to use to search the PDB. This can take a
+few seconds for each sequence and will be performed for all selected
+sequences.\footnote{After this is done, you can see the added database
+references in a tool tip by mousing over the sequence ID. You can use the {\sl
+View $\Rightarrow$ Sequence ID Tooltip $\Rightarrow$ Show Db References }
+submenu option to enable or disable these data in the tooltip.}
+
+Once the retrieval has finished, the structure chooser dialog will show any
+available PDB entries for the selected sequences.
 
+% 
+% \begin{figure}[htbp]
+% \begin{center}
+% %TODO fix formatting
+% \begin{center} 
+% \includegraphics[width=3.5in]{images/pdbstructurechooser.pdf}
+% \end{center}
+% 
+% 
+% \caption{{\bf The PDB Structure Chooser dialog.} }
+% \label{auto}
+% \end{center}
+% \end{figure}
+
+\subsection{Drag-and-Drop Association of PDB Files with Sequences by Filename
+Match}
+\label{multipdbfileassoc}
+If you have PDB files stored on your computer {\bf named the same way as the
+sequences in the alignment}, then you can drag them from their location on the
+file browser onto an alignment window. Jalview will search the alignment for
+sequences with IDs that match any of the files, and offer a dialog like the one
+in Figure \ref{multipdbfileassocfig}.
+
+If no associations are made, then sequences extracted
+from the structure will be simply added to the alignment. However, if only
+some of the PDB files are associated, Jalview will raise another dialog box
+giving you the option to add any remaining sequences from the PDB structure files not present in
+the alignment. This allows you to easily decorate sequences in a newly imported
+alignment with any corresponding structures you've already collected in a directory
+accessible from your computer.\footnote{We plan to extend this facility in
+future so Jalview will automatically search for PDB files matching your
+sequence within a local directory. Check out 
+\href{http://issues.jalview.org/browse/JAL-801}{Jalview issue 801}}
+
+After associating sequences with PDB files, you can view the PDB structures by
+opening the Sequence ID popup
+menu and selecting {\sl View 3D Structure}. The PDB files you loaded will be
+shown in the {\bf Cached Structures} view, after selecting it from the drop down
+menu in the dialog box. 
+
+% there is no mention of the other footnote (#3) that appears saying: Tip: The sequence ID tooltip can often become large for heavily cross-referenced sequence IDs. Use the ...
+% JBP: yes there is - under 'Discovery of ' subsection.
 \begin{figure}[htbp]
 \begin{center}
-\parbox[c]{1.5in}{\includegraphics[width=1.5in]{images/ws1.pdf}}
-\parbox[c]{2.5in}{\includegraphics[width=2.5in]{images/ws2.pdf}}
-\parbox[c]{2in}{\includegraphics[width=2in]{images/ws3.pdf}}
-\caption{{\bf Multiple alignment via web services} The appropriate method is selected from the menu (left), a status box appears (center), and the results appear in a new window (right)}
-\label{webservices}
+\includegraphics[]{images/pdbdragdropassoc.pdf}
+
+\caption{{\bf Associating PDB files with sequences by drag-and-drop.} Dragging
+PDB files onto an alignment of sequences with names matching the dragged files
+names (A), results in a dialog box (B) that gives the option to associate each
+file with any sequences with matching IDs. }
+\label{multipdbfileassocfig}
 \end{center}
 \end{figure}
 
-\subsubsection{Realignment}
-
-The re-alignment option is currently only supported by ClustalW. When performing a re-alignment, Jalview submits the current selection to the alignment service complete with any existing gaps. This approach is useful when one wishes to align additional sequences to an existing alignment without any further optimisation to the existing alignment. The Re-alignment service provided by ClustalW in this case is effectively a simple form of profile alignment. 
-
-\subsubsection{Alignments of sequences that include hidden regions}
-
-If the view or selected region that is submitted for alignment contains hidden regions, then only the visible sequences will be submitted to the service. Furthermore, each contiguous segment of sequences will be aligned independently (resulting a number of alignment `subjobs' appearing in the status window). Finally, the results of each subjob will be concatenated with the hidden regions in the input data prior to their display in a new window. This approach ensures that 1) hidden column boundaries in the input data are preserved in the resulting alignment - in a similar fashion to the constraint that hidden columns place on alignment editing (see Section \ref{lockededits}). 2) hidden columns can be used to preserve existing parts of an alignment whilst the visible parts are locally refined. 
-
-\exercise{Multiple Sequence Alignment}{
-\exstep{ Close all windows and open the alignment at {\sf http://www.jalview.org/tutorial/unaligned.fa}.  Select {\sl Web Service $\Rightarrow$ Alignment $\Rightarrow$ Muscle Multiple Protein Sequence Alignment}. A window will open giving the job status. After a short time, a second window will open with the results of the alignment.}
-\exstep{Select the first sequence set by clicking on the window and try running ClustalW and MAFFT (from the {\sl Web Services $\Rightarrow$ Alignment} menu) on the same initial alignment. Compare them and you should notice small differences.
-}
-\exstep{Select the last three sequences in the MAFFT alignment, and de-align them with {\sl Edit $\Rightarrow$ Remove All Gaps}. Press [ESC] to deselect them and then submit the view for re-alignment with ClustalW.}
-\exstep{Use [CTRL]-Z to recover the alignment of the last three sequences in the MAFFT alignment. Once the ClustalW re-alignment has completed, compare the results of re-alignment of the three sequences with their alignment in the original MAFFT result.}
-\exstep{Select columns 60 to 125 in the original MAFFT alignment and hide them. Select {\sl Web Services $\Rightarrow$ Alignment $\Rightarrow$ MAFFT} to submit the visible portion of the alignment to MAFFT. When the web service job pane appears, note that there are now two alignment job status panes shown in the window.}
-\exstep{When the MAFFT job has finished, compare the alignment of the N-terminal visible region in the result with the corresponding region of the original alignment. If you wish, select and hide a few more columns in the N-terminal region, and submit the alignment to the service again and explore the effect of local alignment on the non-homologous parts of the N-terminal region.} 
-}
-
-
-\subsection{Secondary Structure Prediction}
 
-Secondary structure prediction is performed using the Jpred\footnote{{\sl ``The Jpred 3 Secondary Structure Prediction Server''} Cole, C., Barber, J. D. and Barton, G. J. (2008) {\sl Nucleic Acids Research} {\bf 36}, (Web Server Issue) W197-W201
-
-{\sl ``Jpred: A Consensus Secondary Structure Prediction Server''} Cuff, J. A., Clamp, M. E., Siddiqui, A. S., Finlay, M. and Barton, G. J. (1998) {\sl Bioinformatics} {\bf 14}, 892-893} server at the University of Dundee\footnote{http://www.compbio.dundee.ac.uk/~www-jpred/}. The behaviour of this calculation depends on the current selection: 
-\begin{list}{$\circ$}{}
-\item If nothing is selected, Jalview will check the length of each alignment row to determine if the visible sequences in the view are aligned.
-\begin{list}{-}{}
-              \item If all rows are the same length (often due to the application of the {\sl Edit $\Rightarrow$ Pad Gaps} option), then a JNet prediction will be run for the first sequence in the alignment, using the current alignment as the profile to use for prediction.
-              \item  Otherwise, just the first sequence will be submitted for a full JNet prediction.
-\end{list}
-\item 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. 
-\item If a set of sequences are selected, and they appear to be aligned using the same criteria as above, then the alignment will be used for a Jnet prediction on the first sequence in the set (that is, the one that appears first in the alignment window).
-\end{list}
-
-Jpred is launched in the same way as the other web services. Select {\sl Web Services $\Rightarrow$ Secondary Structure Prediction $\Rightarrow$ JNet Secondary Structure Prediction} from the alignment window menu (Figure\ref{jpred}). A status window opens to inform you of the progress of the job. Upon completion, a new alignment window opens and the Jpred predictions are included as annotations. Consult the Jpred documentation for information on interpreting these results.
+\section{Viewing Structures}
+\label{structurechooser}
+The structure viewer is launched via the Sequence ID context
+menu. To view structures associated with a sequence or a selected set of
+sequences in the alignment, simply right click the mouse to open the context
+menu, and select {\sl 3D Structure data \ldots} to open the Structure Chooser
+dialog box. 
+
+If any of
+the {\bf currently selected} sequences have structures in the PDB, 
+they will appear in the Structure Chooser dialog box. The structures can be ranked by
+different parameters, but are by default ordered according to their PDB
+quality score. 
+
+To view one or more structures, simply click {\sl
+View} to open a structure viewer containing the structures selected in the
+dialog. If several structures were picked, these will be shown
+superposed according to the alignment.
+You may find Jalview has already picked the best structure - using one of the
+criteria shown in the dropdown menu (e.g. 'Best Quality', which is picked by
+default). However, you are free to select your own.
+
+The structure(s) to be displayed will be downloaded or loaded from
+the local file system, and shown as a ribbon diagram coloured according to the
+associated sequence in the current alignment view (Figure \ref{structure}). The structure can be rotated by clicking and dragging in the structure
+window. The structure can be zoomed using the mouse scroll wheel or by
+[SHIFT]-dragging the structure.
+
+Moving the mouse cursor over a sequence to which the structure is linked in the
+alignment view highlights the respective residue's sidechain atoms. The
+sidechain highlight may be obscured by other parts of the molecule. Similarly,
+moving the cursor over the structure shows a tooltip and highlights the
+corresponding residue in the alignment. Clicking the alpha carbon or phosphorous
+backbone atom will toggle the highlight and residue label on and off. Often, the
+position highlighted in the sequence may not be in the visible portion of the
+current alignment view and the sliders will scroll automatically to show the
+position. If the alignment window's {\sl View $\Rightarrow$ Automatic Scrolling
+} option is not selected, however, then the automatic adjustment will be
+disabled for the current view.
 
 \begin{figure}[htbp]
 \begin{center}
-\includegraphics[width=2.25in]{images/jpred1.pdf}
-\includegraphics[width=3in]{images/jpred2.pdf}
-\caption{{\bf Secondary Structure Prediction} Status (left) and results (right) windows for JNet predictions. }
-\label{jpred}
+\parbox{4in}{
+{\centering 
+\begin{center}
+\includegraphics[width=4in]{images/structure1.pdf}
 \end{center}
-\end{figure}
-
-\subsubsection{Hidden Columns and JNet Predictions}
-\label{hcoljnet}
-Hidden columns can be used to exclude parts of a sequence or profile from the input sent to the JNet service. For instance, if a sequence is known to include a large loop insertion, hiding that section prior to submitting the JNet prediction may\footnote{This, of course, cannot be guaranteed, but the profile calculated by JNet will at least be different.} result in a more reliable secondary structure prediction either side of the insertion. Prediction results returned from the service will be mapped back onto the visible parts of the sequence, to ensure a single frame of reference is maintained in your analysis.
-
-\exercise{Secondary Structure Prediction}{
-\label{secstrpredex}
-\exstep{ Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. Select the sequence {\sl FER\_MESCR} by clicking on the sequence ID. Then select {\sl Web Services $\Rightarrow$ Secondary Structure Prediction $\Rightarrow$ JNet Secondary Structure Prediction} from the alignment window menu. A status window will appear and after some time a new window with the JPred prediction will appear. Note that the number of sequences in the results window is many more than in the original alignment as JNet performs a PSI-BLAST search to expand the prediction dataset.
 }
-% TODO: check how long this takes - about 2 mins once it gets on the cluster.
-\exstep{
-Select a different sequence and perform a JNet prediction in the same way. There will probably be minor differences in the predictions.
 }
-\exstep{
-Select the second sequence prediction, and copy and paste it into the first prediction window. You can now compare the two predictions. Jnet secondary structure prediction annotation are examples of {\bf sequence associated alignment annotation}.
-% which is described in Section \ref{seqassocannot} below.
+\parbox{2.2in}{
+{\centering 
+\begin{center}
+\includegraphics[width=2.2in]{images/structure2.pdf}
+\end{center}
 }
-\exstep{
-Select and hide some columns in one of the profiles that were returned from the JNet service, and then submit the profile for prediction again. 
 }
-\exstep{
-When you get the result, verify that the prediction has not been made for the hidden parts of the profile, and that the JPred reliability scores differ from the prediction made on the full profile. 
+\caption{{\bf Structure visualization} Structure viewers are launched from
+the 3D Structure chooser dialog (left). Jalview shows the displayed structures
+coloured according the alignment view (right). }
+\label{structure}
+\end{center}
+\end{figure}
 
-{\sl Note: you may want to keep this data for use in exercise \ref{viewannotfileex}.}
+\subsection{Customising Structure Display}
+
+Structure display can be modified using the {\sl Colour} and {\sl View} menus
+in the structure viewer. The background colour can be modified by selecting the
+{\sl Colours $\Rightarrow$ Background Colour\ldots} option.
+
+By default, the structure will be coloured in the same way as the associated
+sequence(s) in the alignment view from which it was launched. The structure can
+be coloured independently of the sequence by selecting an appropriate colour
+scheme from the {\sl Colours} menu. It can be coloured according to the
+alignment using the {\sl Colours $\Rightarrow$ By Sequence } option. The image
+in the structure viewer can be saved as an EPS or PNG with the {\sl File
+$\Rightarrow$ Save As $\Rightarrow$ \ldots} submenu, which also allows the raw
+data to be saved as PDB format. The mapping between the structure and the
+sequence (how well and which parts of the structure relate to the sequence) can
+be viewed with the {\sl File $\Rightarrow$ View Mapping} menu option.
+
+\subsubsection{Using the Jmol Visualization Interface }
+
+Jmol has a comprehensive set of selection and visualization functions that are
+accessed from the Jmol popup menu (by right-clicking in the Jmol window or by
+clicking the Jmol logo). Molecule colour and rendering style can be manipulated,
+and distance measurements and molecular surfaces can be added to the view. It
+also has its own ``Rasmol\footnote{See \url{http://www.rasmol.org}}-like'' scripting
+language, which is described elsewhere\footnote{Jmol Wiki:
+\url{http://wiki.jmol.org/index.php/Scripting}
+
+Jmol Scripting reference:
+\url{http://www.stolaf.edu/academics/chemapps/jmol/docs/}}. Jalview utilises the
+scripting language to interact with Jmol and to store the state of a Jmol
+visualization within Jalview archives, in addition to the PDB data file
+originally loaded or retrieved by Jalview. To access the Jmol scripting
+environment directly, use the {\sl Jmol $\Rightarrow$ Console} menu option.
+
+If you would prefer to use Jmol to manage structure colours, then select the
+{\sl Colours $\Rightarrow$ Colour with Jmol} option. This will disable any
+automatic application of colour schemes when new structure data is added, or
+when associated alignment views are modified.
+
+%%TODO: no mapping when using N&W alg.
+
+\exercise{Viewing Structures with the integrated Jmol Viewer}{
+\label{viewingstructex}
+\exstep{Load the alignment at
+\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 Data}. After a short pause, a
+Structure Chooser dialog will open for the sequence, listing available
+structure data from the PDB. Select { \sl 1a70} from the list and click {\sl
+New View}.
+
+{\sl Note:} The Structure Chooser dialog presents available PDB structures
+by querying the EMBL-EBI's PDBe web API. Extra information can be
+including in this window by checking boxes in the columns of the {\sl Customise Displayed Options} tab.
+% JBP Note: Bug JAL-1238 needs to be fixed ASAP
 }
+\exstep{By default the Jmol
+structure viewer opens in the Jalview desktop. Rotate the molecule by clicking
+and dragging in the structure viewing box.
+Zoom with the mouse scroll wheel. } 
+\exstep{In the Jmol viewer, placing the mouse over a
+part of the structure will bring up a tool tip indicating the name and number of that residue.
+In the alignment window, the corresponding residue in the sequence is
+highlighted in black.}
+\exstep{Roll the
+mouse cursor along the {\sl FER1\_SPIOL} sequence in the alignment window.
+If a residue in the sequence maps to one in the structure, the residue molecular shape is visible in the structure viewer.}
+\exstep{Clicking the alpha carbon toggles the highlight and residue label on and
+off.
+Try this by clicking on a set of three or four adjacent residues so that the labels are persistent, then finding where they are in the sequence. }
+\exstep{In the structure viewer menu, select {\sl Colours $\Rightarrow$ Background
+Colour\ldots} and choose a suitable colour.
+Press {\sl OK} to apply this.}
+\exstep{Select {\sl File $\Rightarrow$ Save As $\Rightarrow$ PNG} and save the
+image. On your computer, view this with a suitable program. } 
+\exstep{Select {\sl File $\Rightarrow$ View Mapping} from the structure viewer menu.
+A new window opens showing the residue by residue alignment between the sequence and the structure.} 
+\exstep{In the structure window,  select {\sl File $\Rightarrow$ Save as $\Rightarrow$ PDB file} and enter a filename to save the PDB file. 
+Once the file is saved, open the location in your file browser and drag the PDB file that you just saved onto the Jalview desktop.
+(Or load it from the Jalview Desktop menu using
+{\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From File}). 
+Verify that you can open and view the associated structure from new alignment window using the sequence ID
+context menu's {\sl 3D Structure } submenu (as step {\sl b)}.}
+
+\exstep{In the Jmol window, right click on the background to open the
+Jmol menu options. Explore this, for example by
+{\sl Select (n) $\Rightarrow$ All} command (where {\sl n} is the number of residues selected), 
+and then the {\sl Style $\Rightarrow$ Scheme $\Rightarrow$ Ball and Stick} command.} 
+\exstep{In the alignment window, use the {\sl File $\Rightarrow$ Save as.. }
+function to save the alignment as a Jalview Project (jvp). Now close the alignment and the structure view, and load the project file you just saved.
+Verify that the Jmol display is as it was when you just saved the file.}
+{\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
 }
 
+\exercise{Aligning Structures using the Ferredoxin Sequence Alignment}{
+\label{superpositionex}
 
-\section{Features and Annotation}
-\label{featannot}
-Features and annotations are additional information that is overlaid on the sequences and the alignment. Generally speaking, annotations are associated with columns in the alignment. Features are associated with specific residues in the sequence. 
+\exstep{Continue with the Jalview project created in exercise
+\ref{viewingstructex}}
 
-Annotations are rendered below the alignment, in the annotation panel, and often reflect properties of the alignment as a whole.  The conservation, consensus and quality scores are examples of dynamic annotation. As the alignment changes, these annotations will change along with it. Conversely, seqeunce features are properties of the individual sequences. They do not change with the alignment, but are shown mapped on to specific residues within the alignment. 
+\exstep{Select the FER1\_MAIZE sequence (near bottom of the alignment). Right-click the ID label to open the context menu, 
+select {\sl $\Rightarrow$ 3D Structure Data}.}
 
-Features and annotation can be interactively created, or retrieved from external data sources. DAS (the Distributed Annotation System) is the primary source of sequence features, whilst webservices like JPred (see \ref{jpred} above) can be used to analyse a given sequence or alignment and generate annotation for it.
+\exstep{This opens the Structure Chooser dialog, pick 1gaq from the list.
+Make sure the {\sl Superpose} option is checked before clicking the {\bf Add}
+button. This superimpose the structure associated with
+FER1\_MAIZE with the one associated with FER1\_SPIOL.
 
+{\sl Note:} 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
+Jmol submenu.
+}
 
-\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 dialogue 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.
+\exstep{Create a new view on the alignment ({\sl View $\Rightarrow$ New View}), and hide all but columns 121
+through to 132 ({\sl View $\Rightarrow$ Hide $\Rightarrow$
+All but selected region}).}
+\exstep{Select the newly created view in the structure window using {\sl Jmol $\Rightarrow$ Superpose
+With } submenu, and then recompute the superposition with {\sl Jmol
+$\Rightarrow$ Superpose Structures}.
+
+{\sl Note:} how the molecules shift position when superposed with only a small
+region of the alignment.}
+
+\exstep{Compare RMSDs obtained when superimposing molecules with
+columns 121-132 and with the whole alignment. The RMSD report can be
+viewed by right clicking the mouse on Jmol window, and select {\sl
+Console} from the menu (if nothing is shown, recompute the superposition after
+displaying the console).}
+\exstep{Which view do you think give the best 3D superposition, and why ?} }
+
+\exercise{Setting Chimera as the default 3D Structure Viewer}{
+\label{viewingchimera} 
+Jalview supports molecular structure
+visualization using both Jmol and Chimera 3D viewers. Jmol is the default
+viewer, however Chimera can be set up as the default choice from Preferences.
+
+\exstep{First, Chimera must be downloaded and installed on the computer.
+Chimera program is available on the UCSF web site \textsf{https://www.cgl.ucsf.edu/chimera/download.html}.}
+\exstep{In the desktop menu, select {\sl Tool  $\Rightarrow$ Preferences}. In
+the ``{\sl
+Structure}'' tab set {\sl Default structure viewer} as {\sl
+Chimera}; then click {\sl OK}.} 
+\exstep{Close the Jalview program, from the
+{\sl Desktop menu} select {\sl Jalview $\Rightarrow$ Quit Jalview}. Then reopen
+Jalview, Chimera should open as the default viewer.}
+If this does not work then you may need to set the {\sl Path to Chimera program} in {\sl Preferences}.
+{\sl Note:} The Jmol structure viewer sits within the Jalview desktop. However
+the Chimera structure viewer sits outside the Jalview desktop and a Chimera
+view window sits inside the Jalview desktop.
+
+{\bf See the video at: \url{http://www.jalview.org/training/Training-Videos}.}}
+
+
+\subsection{Superimposing Structures}
+\label{superposestructs}
+Many comparative biomolecular analysis investigations aim to determine if the
+biochemical properties of a given molecule are significantly different to its
+homologues. When structure data is available, comparing the shapes of molecules
+by superimposing them enables substructure that may impart different behaviour
+to be quickly identified. The identification of optimal 3D superposition
+involves aligning 3D data rather than sequence symbols, but the result can
+still be represented as a sequence alignment, where columns indicate positions
+in each molecule that should be superposed to recreate the optimal 3D alignment.
+
+Jalview can employ Jmol's 3D fitting routines\footnote{See
+\href{http://chemapps.stolaf.edu/jmol/docs/?ver=12.2$\#$compare}{http://chemapps.stolaf.edu/jmol/docs/?ver=12.2$\#$compare}
+for more information.} to recreate 3D structure superpositions based on the
+correspondences defined by one or more sequence alignments involving structures shown in the Jmol display. 
+Superposition based on the currently displayed alignment view
+ happens automatically if a
+structure is added to an existing Jmol display using 
+the {\sl 3D Structure } option in the Sequence ID popup menu to open the
+Structure Chooser dialog box.
+Select the structures required and select {\sl View}. A new Jmol view
+opens containing superposed structures if the current selection contains two or more sequences with associated
+structures.
+
+\subsubsection{Obtaining the RMSD for a Superposition}
+The RMSD (Root Mean Square Deviation) is a measure of how similar the structures
+are when they are superimposed. Figure \ref{mstrucsuperposition} shows a
+superposition created during the course of Exercise \ref{superpositionex}. The
+parts of each molecule used to construct the superposition are rendered using
+the cartoon style, with other parts of the molecule drawn in wireframe. The Jmol
+console, which has been opened after the superposition was performed, shows the
+RMSD report for the superposition.
+Full information about the superposition is also reported on the Jalview
+console.\footnote{The Jalview Java Console is opened from {\sl Tools
+$\Rightarrow$ Java Console} option in the Desktop's menu bar} This output also
+includes the precise atom pairs used to superpose structures.
+
+\subsubsection{Choosing which part of the Alignment is used for Structural
+Superposition} Jalview uses the visible part of each alignment view to define
+which parts of each molecule are to be superimposed. Hiding a column in a view
+used for superposition will remove that correspondence from the set, and will
+exclude it from the superposition and RMSD calculation.
+This allows the selection of specific parts of the alignment to be used for
+superposition. Only columns that define a complete set of correspondences for
+all structures will be used for structural superposition, and as a consequence,
+the RMSD values generated for each pair of structures superimposed can be
+directly compared.
+
+In order to recompute a superposition after changing a view or editing the
+alignment, select the {\sl Jmol $\Rightarrow$ Align Structures} menu option.
+The {\sl Jmol $\Rightarrow$ Superpose with ..} submenu allows you to choose which of the
+associated alignments and views are to be used to create the set of
+correspondences. This menu is useful when composing complex superpositions
+involving multi-domain and multi-chain complexes, when correspondences may be
+defined by more than one alignment.
+
+Note that these menu options appear when you have two or more structures in one Jmol viewer.
+
+\subsection{Colouring Structure Data Associated with Multiple Alignments and
+Views} Normally, the original view from which a particular structure view was
+opened will be the one used to colour structure data. If alignments involving
+sequences associated with structure data shown in a Jmol have multiple views, Jalview gives you full control
+over which alignment, or alignment view, is used to colour the structure
+display. Sequence-structure colouring associations are
+changed {\sl via} the {\sl View $\Rightarrow$ Colour by ..} menu, which lists all
+views associated with data shown in the embedded Jmol view. A tick is shown beside
+views currently used as colouring source, and moving the
+mouse over each view will bring it to the front of the alignment display,
+allowing you to browse available colour sources prior to selecting one. If the
+{\sl Select many views} option is selected, then multiple views can be selected as sources for colouring the
+structure data. {\sl Invert selection} and {\sl Select all views} options are also provided to quickly change between multi-view selections.
+
+Note that the {\sl Select many views} option is useful if you have different
+views that colour different areas or domains of the alignment. This option is
+further explored in exercise \ref{complexstructurecolours}.
 
 \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}
+\includegraphics[width=5.5in]{images/fdxsuperposition.pdf}
+\caption{{\bf Superposition of two ferredoxin structures.} The alignment on the
+left was used by Jalview to superpose structures associated with the
+FER1\_SPIOL and FER1\_MAIZE sequences in the alignment. Parts of each structure
+used for superposition are rendered as a cartoon, the remainder rendered in
+wireframe. The RMSD between corresponding positions in the structures before and
+after the superposition is shown in the Jmol console.}
+\label{mstrucsuperposition}
 \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 it's 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 can be necessary to customise the display. Jalview allows the display, colour, rendering order and transparency of features to be modified via the {\sl View $\Rightarrow$ Feature Settings\ldots} menu option. This brings up a dialogue 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.
-
 \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.}
+\includegraphics[width=5.5in]{images/mviewstructurecol.pdf}
+\caption{{\bf Choosing a different view for colouring a structure display}
+Browsing the {\sl View $\Rightarrow$ Colour by ..} menu provides full control
+of which alignment view is used to colour structures when the {\sl Colours
+$\Rightarrow$ By Sequence} option is selected.}
+\label{mviewstructurecol}
 \end{center}
 \end{figure}
 
+\subsubsection{Colouring Complexes}
+\label{complexstructurecolours}
+The ability to control which multiple alignment view is used to colour
+structural data is essential when working with data relating to
+multidomain biomolecules and complexes. 
+
+In these situations, each chain identified in the structure may have a different
+evolutionary history, and a complete picture of functional variation can
+only be gained by integrating data from different alignments on the same
+structure view. An example of this is shown in Figure
+\ref{mviewalcomplex}, based on data from Song et. al.\footnote{Structure of
+DNMT1-DNA Complex Reveals a Role for Autoinhibition in Maintenance DNA Methylation. Jikui Song, Olga Rechkoblit, Timothy H. Bestor, and Dinshaw J. Patel.
+{\sl Science} 2011 {\bf 331} 1036-1040
+\href{http://www.sciencemag.org/content/331/6020/1036}{DOI:10.1126/science.1195380}}
+
 \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}
+\includegraphics[]{images/mchainstructureview.pdf}
+\caption{{\bf The biological assembly of Mouse DNA Methyltransferase-1 coloured
+by Pfam alignments for its major domains} Alignments for each domain within the
+Uniprot sequence DNMT1\_MOUSE have been used to visualise sequence conservation
+in each component of this protein-DNA complex. Instructions for recreating this figure are given in exercise \ref{dnmtcomplexex}. }
+\label{mviewalcomplex}
 \end{center}
 \end{figure}
 
-\exercise{Creating features}{
-\exstep{Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. We know that the Cysteine residues at columns 97, 102, 105 and 135 are involved in iron binding so we will create them as features. Navigate to column 97, sequence 1. Select the entire column by clicking in the ruler bar. Then right-click on the selection to bring up the context menu and select {\sl Selection $\Rightarrow$ Create Sequence Feature}. A dialogue box will appear.
-}
-\exstep{
-Enter a suitable Sequence Feature Name  (e.g. "Iron binding site") in the appropriate box. Click on the Feature Colour bar to change the colour if desired, add a short description ("One of four Iron binding Cysteines") and press OK. The features will then appear on the sequences.
-}
-\exstep{Roll the mouse cursor over the new features. Note that the position given in the tool tip is the residue number, not the column number.  To demonstrate that there is one feature per sequence, clear all selections by pressing [ESC] then insert a gap in sequence 3 at position 95. Roll the mouse over the features and you will see that the feature has moved with the sequence. Delete the gap you created.
-}
-\exstep{
-Add a similar feature to column 102. When the feature dialogue box appears, clicking the Sequence Feature Name box brings up a list of previously described features. Using the same Sequence Feature Name allows the features to be grouped.}
-\exstep{Select {\sl View $\Rightarrow$ Feature Settings\ldots} from the alignment window menu. The Sequence Feature Settings window will appear. Move this so that you can see the features you have just created. Click the check box for "Iron binding site"  under {\sl Display} and note that display of this feature type is now turned off. Click it again and note that the features are now displayed. Close the sequence feature settings box by clicking {\sl OK} or {\sl Cancel}.}
-}
+\exercise{Colouring a Protein Complex to Explore Domain-Domain
+Interfaces}{\label{dnmtcomplexex}
 
-\subsection{Creating user defined annotation}
+\exstep{Download the PDB file at
+\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.}
 
-Annotations are properties that apply to the alignment as a whole and are visualized on rows in the annotation panel.
-To create a new annotation row, right click on the annotation label panel and select the {\sl Add New Row} menu option (Figure \ref{newannotrow}). A dialogue box appears. Enter the label to use for this row and a new row will appear.
+\exstep{Retrieve the following PFAM alignments from the {\bf PFAM (full)} source
+:
 
-\begin{figure}[htbp]
-\begin{center}
-\includegraphics[width=1.3in]{images/annots1.pdf}
-\includegraphics[width=2in]{images/annots2.pdf}
-\caption{{\bf Creating a new annotation row.} Annotation rows can be reordered by dragging them to the desired place.}
-\label{newannotrow}
-\end{center}
-\end{figure}
+PF02008; PF01426; PF00145 (retrieve each into their own alignment window).}
 
-To create a new annotation, first select all the positions to be annotated on the appropriate row. Right-clicking on this selection brings up the context menu which allows the insertion of graphics for secondary structure ({\sl Helix} or {\sl Sheet}), text {\sl Label} and the colour in which to present the annotation (Figure \ref{newannot}). On selecting {\sl Label} a dialogue box will appear, requesting the text to place at that position. After the text is entered, the selection can be removed and the annotation becomes clearly visible\footnote{When annotating a block of positions, the text can be partly obscured by the selection highlight. Pressing the  [ESC] key clears the selection and the label is then visible.}. Annotations can be coloured or deleted as desired.
+\exstep{Drag the URL or file of the structure you
+downloaded in step 1 onto one of the alignments to associate it with the mouse sequence in that Pfam domain family.}
 
-\begin{figure}[htbp]
-\begin{center}
-\includegraphics[width=2in]{images/annots3.pdf}
-\includegraphics[width=2in]{images/annots4.pdf}
-\includegraphics[width=2in]{images/annots5.pdf}
-\caption{{\bf Creating a new annotation.} Annotations are created from a selection on the annotation row and can be coloured as desired.}
-\label{newannot}
-\end{center}
-\end{figure}
+\exstep{Locate every DNMT1\_MOUSE sequence in the
+alignment by opening the Find dialog box via {\sl Select
+$\Rightarrow$ Find}. Search using the text DNMT1\_MOUSE. 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 and select the
+DNMT1\_MOUSE.pdb structure, and click {\sl New View}.
 
-\exercise{Annotating alignments}{
-\exstep{Load the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. Right-click on the annotation label for {\sl Conservation} to bring up the context menu and select {\sl Add New Row}. A dialogue box will appear asking for  {\sl Label for annotation}. Enter "Iron binding site" and click {\sl OK}. A new, empty, row appears.
-}
-\exstep{
-Navigate to column 97. Select column 97 on the new annotation row. Right click on the selection and select {\sl Label} from the context menu. Enter "Fe" in the box and click {\sl OK}. Right-click on the selection again and select {\sl Colour}. Choose a colour from the colour chooser dialogue and click {\sl OK}. Press [ESC] to remove the selection.
-}
-\exstep{ Select columns 70-77 on the annotation row. Right-click and choose {\sl Sheet} from the context menu. You will be prompted for a label. Enter "B" and press OK. A new line showing the sheet as an arrow appears. The colour of the label can be changed but not the colour of the sheet arrow. 
-}
-\exstep{Right click on the annotation row that you just created.  Select {\sl Export Annotation} and, in the {\bf Export Annotation} dialog box that will open, select the Jalview format and click the [To Textbox] button. 
+{\em Part of the newly opened structure will be coloured the same way as
+the associated DNMT1\_MOUSE sequence is in the alignment view.}
 
-The format for this file is given in the Jalview help. Press [F1] to open it, and find the ``Annotations File Format'' entry in the ``Alignment Annotations'' section of the contents pane. }
-
-\exstep{Export the file to a text editor and edit the file to change the name of the annotation row. Save the file and drag it onto the alignment view.}
-\exstep{Try to add an additional helix somewhere along the row by editing the file and re-importing it.
-{\sl Hint: Use the {\bf Export Annotation} function to view what helix annotation looks like in a jalview annotation file.}}
-\exstep{Use the {\sl Alignment Window $\Rightarrow$ File $\Rightarrow$ Export Annotation..} function to export all the alignment's annotation to a file.}
-\exstep{Open the exported annotation in a text editor, and use the {\bf Annotation File Format} documentation to modify the style of the Conservation, Consensus and Quality annotation rows so they appear as several lines on a single line graph.
-{\sl Hint: You need to change the style of annotation row in the first field of the annotation row entry in the file, and create an annotation row grouping to overlay the three quantitative annotation rows.}
+{\bf WARNING: do not select all sequences and open the Structure Chooser
+!} {\em This will cause Jalview to attempt to discover all structures for
+sequences in the alignment.}
 }
-\exstep{ \label{viewannotfileex} Recover or recreate the secondary structure prediction that you made in exercise \ref{secstrpredex}. Use the {\sl File $\Rightarrow$ Export Annotation} function to view the jnet secondary structure prediction annotation row. Note the {\bf SEQUENCE\_REF} statements surrounding the row specifying the sequence association for the annotation. }
+\exstep{Repeat the previous two steps for the other two
+  alignments. For those, after selecting the DNMT1\_MOUSE.pdb structure you
+  should select {\bf `Add'} to ensure each domain alignment is associated
+  with the {\bf same} Jmol view. }
+
+\exstep{Pick a different
+colourscheme in each alignment window for each alignment using the {\sl Colour $\Rightarrow$ Colour by...} submenu to
+ensure each of the complexes shown in the Jmol window are coloured.
+{\sl The different shading schemes will highlight regions of strong 
+physicochemical conservation on corresponding domains in the structure.}
 }
 
-\section{Importing features from databases}
-\label{featuresfromdb}
-Jalview supports feature retrieval from public databases either directly or {\sl via} the Distributed Annotation System (DAS\footnote{http://www.biodas.org/}). It includes built in parsers for Uniprot and EMBL records retrieved from the EBI. Sequences retrieved from these sources using the sequence fetcher (see Section \ref{fetchseq}) will already posess features. 
-
-\subsection{Sequence Database Reference Retrieval}
-\label{fetchdbrefs}
-Jalview maintains a list of external database references for each sequence in an alignment. These are listed in a tooltip when the mouse is moved over the sequence ID\footnote{Unfortunately, the first release of Jalview 2.4 has no option to control the display of this tooltip text which can become rather large.}. Sequences retrieved using the sequence fetcher will always have at least one database reference, but alignments imported from a file, or retrieved from alignment datasources like PFAM, generally have no database references.
-
-\subsubsection{Database References and Sequence Coordinate Systems}
-
-Jalview displays features in the local sequence's coordinate system which is given by its `start' and `end'. Any sequence features on the sequence will be rendered relative to the sequence's start position. If the start/end positions do not match the coordinate system from which the features were defined, then the features will be displayed incorrectly. 
-
-\subsubsection{Automatic retrieval of a sequence's database references}
-Jalview includes a function to automatically verify and update each sequence's start and end numbering against any of the sequence databases that the {\sl Sequence Fetcher} has access to. This function is accessed by selecting {\sl Webservices $\Rightarrow$ Fetch DB References} from the Alignment window. When 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 matched against the local sequence, and if the local sequence is found to be a sub-sequence of the retrieved sequence then the local sequence's start/end numbering is updated.  A new database reference mapping is created, mapping the local sequence to the external database, and the local sequence inherits any additional annotation retrieved from the database sequence. 
-
-The database retrieval process terminates when a valid mapping is found for a sequence, or if all database queries failed to retrieve a matching sequence. Termination is indicated by the disappearance of the moving progress indicator on the alignment window. A dialog box may be shown once it completes which lists sequences for which records were found, but the sequence retrieved from the database did not exactly contain the sequence given in the alignment (the {\sl ``Sequence not 100\% match'' dialog box}). 
+\exstep{The final step needed to reproduce the shading in Figure
+\ref{mviewalcomplex} is to use the {\sl Colour $\Rightarrow$ By
+Annotation\ldots } option in each alignment window to shade the alignment by the
+{\bf Conservation} annotation row (introduced in section
+\ref{colourbyannotation}).
+
+{\sl Note:} Ensure that you first disable the {\sl View $\Rightarrow$ Show Features} menu
+option, or you may not see any colour changes in the associated structure.
+
+{\sl Examine the regions strongly coloured at the interfaces between each
+protein domain, and the DNA binding region. What do you think these patterns
+mean? } }
+\exstep{Save your work as a Jalview project and verify that it can be opened
+again by starting another Jalview Desktop instance, and dragging the saved
+project into the Desktop window.}
+
+% {\sl Note: This exercise relies on new features introduced in Jalview 2.7. If
+% you notice any strange behaviour when trying out this exercise, it may be a
+% bug (see
+% \href{http://issues.jalview.org/browse/JAL-1008}{http://issues.jalview.org/browse/JAL-1008}
+% for one relating to highlighting of positions in the alignment window).}
+}
 
-\exercise{Retrieving Database References}{
-\exstep{Load the example alignment at http://www.jalview.org/tutorial/alignment.fa}
-\exstep{Move the mouse over the sequence IDs to verify there are no database references for the sequences.}
-\exstep{Use the {\sl Webservices $\Rightarrow$ Fetch DB References} menu option to retrieve database IDs for the sequences.}
-\exstep{Examine the tooltips for each sequence in the alignment as the retrieval progresses - note the appearance of new database references.}
-\exstep{Once the process has finished, save the alignment as a Jalview Project. 
+% TODO
+\chapter{Protein sequence analysis and structure prediction}
+\label{proteinprediction}
+
+Many of Jalview's sequence feature and annotation capabilities were developed to
+allow the results of sequence based protein structure prediction methods to be
+visualised and explored. This chapter introduces services integrated with the
+Jalview Desktop for predicting protein secondary structure and protein disorder.
+
+\section{Protein Secondary Structure Prediction}
+\label{protsspredservices}
+Protein secondary structure prediction is performed using the
+Jpred\footnote{{\sl ``The Jpred 3 Secondary Structure Prediction Server''} Cole,
+C., Barber, J. D. and Barton, G. J. (2008) {\sl Nucleic Acids Research} {\bf
+36}, (Web Server Issue) W197-W201
+
+{\sl ``Jpred: A Consensus Secondary Structure Prediction Server''} Cuff, J. A.,
+Clamp, M. E., Siddiqui, A. S., Finlay, M. and Barton, G. J. (1998) {\sl
+Bioinformatics} {\bf 14}, 892-893} server at the University of
+Dundee\footnote{http://www.compbio.dundee.ac.uk/www-jpred/}. The behaviour of
+this calculation depends on the current selection:
+\begin{list}{$\circ$}{}
+\item If nothing is selected, Jalview will check the length of each alignment row to determine if the visible sequences in the view are aligned.
+\begin{list}{-}{}
+              \item If all rows are the same length (often due to the
+              application of the {\sl Edit $\Rightarrow$ Pad Gaps} option), then
+              a JPred prediction will be run for the first sequence in the
+              alignment, using the current alignment as the profile to use for prediction.
+              \item  Otherwise, just the first sequence will be submitted for a
+              full JPred prediction.
+\end{list}
+\item If just one sequence (or a region in one sequence) has been selected, it
+will be submitted to the automatic JPred prediction server for homolog detection
+and prediction.
+\item If a set of sequences are selected, and they appear to be aligned using
+the same criteria as above, then the alignment will be used for a JPred
+prediction on the first sequence in the set (that is, the one that appears first in the alignment window).
+\end{list}
 
-Now close all the windows and open the project again, and verify that the database references and sequence features are still present on the alignment}
+\exercise{Secondary Structure Prediction}{
+\label{secstrpredex}
 
+{\sl Note:} The annotation panel can get quite busy during this exercise. Try
+hiding some annotations rows by right clicking
+the mouse in the annotation label panel and select the ``Hide this row'' option.
+The Annotations dropdown menu on the alignment window also provides options for
+reordering and hiding autocalculated and sequence associated annotation. 
+
+\exstep{ Open the alignment at \url{http://www.jalview.org/tutorial/alignment.fa}. Select the sequence {\sl FER\_MESCR} by 
+clicking on the sequence ID. Then select {\sl Web Service $\Rightarrow$
+Secondary Structure Prediction $\Rightarrow$ JPred Secondary Structure
+Prediction} from the alignment window menu. A status window will appear and after some time (about 2-4 min) 
+a new window with the JPred prediction will appear. The results
+from the prediction are visible in the annotation panel. JPred secondary
+structure prediction annotations are examples of sequence-associated alignment annotation. {\sl Note:} The number of sequences in the results 
+window is many more than in the original alignment as 
+JPred performs a PSI-BLAST search to expand the prediction dataset.}
+% TODO: check how long this takes - about 2 mins once it gets on the cluster.
+\exstep{
+Select a different sequence and perform a JPred prediction in the same way.
+There will probably be minor differences in the predictions.
 }
-
-\subsection{Retrieving Features {\sl via} DAS}
-\label{dasfretrieval}
-Jalview includes a client to retrieve features from DAS annotation servers. To retrieve features, select {\sl View $\Rightarrow$ Feature Settings\ldots} from the alignment window menu. Select the {\sl DAS Settings} tab in the Feature Settings Window (Figure \ref{das}). A list of DAS sources compiled from the currently configured DAS registry\footnote{By default, this will be the major public DAS server registry maintained by the Sanger Institute: http://www.dasregistry.org} is shown in the left hand pane. Highlighting an entry on the left brings up information about that source in the right hand panel.
+\exstep{
+Select the sequence used in the second sequence prediction by clicking on its
+name in the sequence ID panel, and copy {\sl ([CTRL] or [CMD]-C)} and then
+paste it {\sl [CTRL] or [CMD]-V)} into the first prediction window.  You
+can now compare the two predictions as the annotations associated with the
+sequence has also been copied across.
+% which is described in Section \ref{seqassocannot} below.
+}
+\exstep{
+Select and hide some columns in one of the alignment profiles that were returned
+from the JNet service, and then submit the profile for prediction again.
+}
+\exstep{
+When you get the result, verify that the prediction has not been made for the
+hidden parts of the profile by clicking the mouse on column ruler and right click to open the
+context menu and select {\sl Reveal All}. The JPred reliability scores
+differ from the prediction made on the full profile.
+}
+\exstep{
+In the original alignment that you loaded in step {\sl a}, select {\bf all}
+sequences ([CTRL]-A or [CMD]-A), then open the {\sl Sequence ID $\Rightarrow$ Selection $\Rightarrow$ Add
+Reference Annotation} submenu
+by right clicking the mouse to open the context menu.
+{\bf All} the JPred predictions for the sequences will now be visible in the
+original alignment window.}
+ {\bf Homework:} Go back to the last step of exercise \ref{annotatingalignex} and
+follow the instructions to view the Jalview annotations file created from the annotations
+generated by the JPred server for your sequence.
+\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
 
 \begin{figure}[htbp]
 \begin{center}
-\includegraphics[width=2.5in]{images/das1.pdf}
-\includegraphics[width=2.5in]{images/das2.pdf}
-\caption{{\bf Retrieving DAS annotations.} DAS features are retrieved using the {\sl DAS Settings} tab (left) and their display customised using the {\sl Feature Settings} tab (right).}
-\label{das}
+\includegraphics[width=2.25in]{images/jpred1.pdf}
+\includegraphics[width=3in]{images/jpred2.pdf}
+\caption{{\bf Secondary Structure Prediction} Status (left) and results (right)
+windows for JPred predictions. }
+\label{jpred}
 \end{center}
 \end{figure}
 
 
+Jpred is launched in the same way as the other web services. Select {\sl Web
+Service $\Rightarrow$ Secondary Structure Prediction $\Rightarrow$ JPred
+Secondary Structure Prediction}\footnote{JNet is the Neural Network based
+secondary structure prediction method that the JPred server uses.} from the
+alignment window menu (Figure \ref{jpred}).
+A status window opens to inform you of the progress of the job. Upon completion, a new alignment window opens and the Jpred
+predictions are included as annotations. Consult the Jpred documentation for
+information on interpreting these results.
 
-Select appropriate DAS sources as required then click on {\sl Fetch DAS Features}. If you know of additional sources not listed in the configured registry, then you may add them with the {\sl Add Local Source} button. Use the {\sl Authority},{\sl Type}, and {\sl Label} filters to restrict the list of sources to just those that will return features for the sequences in the alignment.
-
-Following DAS feature retrieval, the {\sl Feature Settings} panel takes on a slightly different appearance (Figure \ref{das} (right)). Each data source is listed and groups of features from one data source can be selected/deselected by checking the labeled box at the top of the panel.
-
-
-\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 Services $\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 to ensure that features retrieved from the DAS source are rendered at the correct position. 
-
-\subsubsection{Rate of feature retrieval}
-Feature retrieval can take some time if a large number of sources is selected and if the alignment contains a large number of sequences. This is because Jalview only queries a particular DAS source with one sequence at a time, to avoid overloading it.  As features are retrieved, they are immediately added to the current alignment view. The retrieved features are shown on the sequence and can be customised as described previously.
-
-
-\exercise{Retrieving features with DAS}{
-\exstep{Load the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}.  Select {\sl View $\Rightarrow$ Sequence Features\ldots} from the alignment window menu. Select the {\sl DAS Settings} tab. A long list of available DAS sources is listed. Select a small number, eg Uniprot, DSSP, signalP and netoglyc. Click {\sl OK}. A window may prompt whether you wish Jalview to map the sequence IDs onto Uniprot IDs. Click {\sl Yes}. Jalview will start retrieving features. As features become available they will be mapped onto the alignment.
-}
-\exstep{If Jalview is taking too long to retrieve features, the process can be cancelled with the {\sl Cancel Fetch} button. Rolling the mouse cursor over the sequences reveals a large number of features annotated in the tool tip. Close the Feature Settings window.
-}
-\exstep{Move the mouse over the sequence ID panel. Non-positional features such as literature references and protein localisation predictions are given in the tooltip, below any database cross references associated with the sequence.}
-\exstep{Search through the alignment to find a feature with a link symbol next to it. Right click to bring up the alignment view popup menu, and find a corresponding entry in the {\sl Link } sub menu. }
-% TODO this doesn't work ! \includegraphics[width=.3in]{images/link.pdf}
-
-\exstep{
-Select {\sl View $\Rightarrow$ Feature Settings\ldots} to reopen the Feature Settings window. All the loaded feature types should now be displayed. Those at the top of the list sit on top of and obscure those below. Move the feature settings window so that the alignment is visible and uncheck some of the feature types by clicking the tick box in the display column.. Observe how the alignment display changes. Note that unselected feature types do not appear in the tool tip.
-}
-\exstep{Reorder the features by dragging feature types up and down the order in the Feature Settings panel. e.g. Click on {\sl CHAIN} then move the mouse downwards to drag it below {\sl DOMAIN}. Note that {\sl DOMAIN} is now shown on top of {\sl CHAIN} in the alignment window. Drag {\sl METAL} to the top of the list. Observe how the cysteine residues are now highlighted as they have a {\sl METAL} feature associated with them.
-}
+\subsection{Hidden Columns and JPred Predictions}
+\label{hcoljnet}
+Hidden columns can be used to exclude parts of a sequence or profile from the
+input sent to the JNet service. For instance, if a sequence is known to include
+a large loop insertion, hiding that section prior to submitting the JNet
+prediction can produce different results. In some cases, these secondary
+structure predictions can be more reliable for sequence on either side of the
+insertion\footnote{This, of course, cannot be guaranteed.}. Prediction results
+returned from the service will be mapped back onto the visible parts of the
+sequence, to ensure a single frame of reference is maintained in your analysis.
+
+\section{Protein Disorder Prediction}
+\label{protdisorderpred}
+
+Disordered regions in proteins were classically thought to correspond to
+``linkers'' between distinct protein domains, but disorder can also play a role in
+function. The {\sl Web Service $\Rightarrow$ Disorder} menu in the alignment window
+allows access to protein disorder prediction services provided by the configured
+JABAWS servers. 
 
-\exstep{Press the {\sl Optimise Order} button. The features will be ordered according to increasing length, placing features that annotate shorter regions of sequence higher on the display stack.}
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=5in]{images/disorderpredannot.pdf}
+\caption{{\bf Annotation rows for several disorder predictions on a sequence}. A
+zoomed out view of a prediction for a single sequence. The sequence is shaded to highlight disordered regions (brown and grey), and the line plots below the Sequence show the raw scores for various disorder predictors. Horizontal lines on each graph mark the level at which disorder predictions become significant. }
+\label{alignmentdisorderannot}
+\end{center}
+\end{figure}
 
-\exstep{Select {\sl File $\Rightarrow$ Export Features} from the Alignment window. You can choose to export the retrieved features as a GFF file, or Jalview's own Features format. 
-% TODO: describe working with features files and GFF
-}
-}
-\subsection{Sequence Feature File Formats}
+\subsection{Disorder Prediction Results}
+Each service operates on sequences in the alignment to identify regions likely
+to be unstructured or flexible, or alternately, fold to form globular domains.
+As a consequence, disorder predictor results include both sequence features and
+sequence associated alignment annotation rows. Section \ref{featannot} describes
+the manipulation and display of these data in detail, and Figure
+\ref{alignmentdisorder} demonstrates how sequence feature shading and
+thresholding (described in Section \ref{featureschemes}) can be used to
+highlight differences in disorder prediction across aligned sequences.
+
+
+\subsection{Navigating Large Sets of Disorder Predictions}
+
+Figure \ref{alignmentdisorderannot} shows a single sequence annotated with
+a range of disorder predictions. Disorder prediction annotation rows are
+associated with a sequence in the same way as secondary structure prediction
+results. When browsing an alignment containing large numbers of disorder
+prediction annotation rows, clicking on the annotation row label will highlight
+the associated sequence in the alignment display, and double clicking will
+select that sequence.
+
+\subsection{Disorder Predictors provided by JABAWS 2.0}
+For full details of each predictor and the results that Jalview can display,
+please consult
+\href{http://www.jalview.org/help/html/webServices/proteinDisorder.html}{Jalview's
+protein disorder service documentation}. Short descriptions of the methods provided in JABAWS 2.0 are given below:
+
+\subsubsection{DisEMBL}
+\href{http://dis.embl.de/}{DisEMBL (Linding et al., 2003)} is a set of machine-learning based predictors trained to
+recognise disorder-related annotation found on PDB structures.
+
+\textbf{COILS} Predicts
+loops/coils according to DSSP
+definitions\footnote{DSSP Classifications of secondary structure are: $\alpha$-helix (H), 310-helix (G), $\beta$-strand (E)
+are ordered, and all other states ($\beta$-bridge (B), $\beta$-turn (T), bend (S),
+$\pi$-helix (I), and coil (C)) considered loops or coils.}. Features mark range(s) of
+residues predicted as loops/coils, and annotation row gives raw value
+for each residue. Value over 0.516 indicates loop/coil.
+
+\textbf{HOTLOOPS} constitute a refined subset of \textbf{COILS}, namely those loops with
+a high degree of mobility as determined from C$\alpha$ temperature factors (B
+factors). It follows that highly dynamic loops should be considered
+protein disorder. Features mark range(s) of residues predicted to
+be hot loops and annotation row gives raw value for each
+residue. Values over 0.6 indicates hot loop.
+
+\textbf{REMARK465} ``Missing
+coordinates in X-ray structure as defined by remark465 entries in PDB.
+Nonassigned electron densities most often reflect intrinsic disorder,
+and have been used early on in disorder prediction'' . Features give
+range(s) of residues predicted as disordered, and annotation rows gives
+raw value for each residue. Values over 0.1204 indicates disorder.
 
-Jalview supports both GFF and its own Jalview Features file format for the import of sequence annotation. Features and alignment annotation are also extracted from other formats such as Stockholm, and AMSA. URL links may also be attached to features. See the online documentation for more details of the capabilities of the jalview features file.
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=5in]{images/disorderpred.pdf}
+\caption{{\bf Shading alignment by sequence disorder}. Alignment of Interleukin IV homologs coloured with Blosum62 with protein 
+disorder prediction sequence features overlaid, shaded according to their score. Borderline disordered regions appear white, 
+reliable predictions are either Green or Brown depending on the type of disorder prediction. }
+\label{alignmentdisorder}
+\end{center}
+\end{figure}
 
+\subsubsection{RONN {\sl a.k.a.} Regional Order Neural Network}
+\href{http://www.strubi.ox.ac.uk/RONN}{RONN} employs an approach
+known as the `bio-basis' method to predict regions of disorder in
+sequences based on their local similarity with a gold-standard set of
+disordered protein sequences. It yields a set of disorder prediction
+scores, which are shown as sequence annotation below the alignment.
+
+\textbf{JRonn}\footnote{JRonn denotes the score for this server because JABAWS
+runs a Java port of RONN developed by Peter Troshin and distributed as
+part of \href{http://www.biojava.org/}{Biojava 3}} Annotation Row gives RONN score for each residue in
+the sequence. Scores above 0.5 identify regions of the protein likely
+to be disordered.
+
+\subsubsection{IUPred}
+\href{http://iupred.enzim.hu/Help.php}{IUPred} employs
+an empirical model to estimate likely regions of disorder. There are
+three different prediction types offered, each using different
+parameters optimized for slightly different applications. It provides
+raw scores based on two models for predicting regions of `long
+disorder' and `short disorder'. A third predictor identifies regions
+likely to form structured domains.
+
+\textbf{Long disorder} Annotation rows predict
+context-independent global disorder that encompasses at least 30
+consecutive residues of predicted disorder. A 100 residue
+window is used for calculation. Values above 0.5 indicates the residue is
+intrinsically disordered.
+
+\textbf{Short disorder} Annotation rows predict for short, (and
+probably) context-dependent, disordered regions, such as missing
+residues in the X-ray structure of an otherwise globular protein.
+Employs a 25 residue window for calculation, and includes adjustment
+parameter for chain termini which favors disorder prediction at the
+ends. Values above 0.5 indicate short-range disorder.
+
+\textbf{Structured domains} are marked with sequence Features. These highlight
+likely globular domains useful for structure genomics investigation. Post-analysis of disordered region profile to find continuous regions
+confidently predicted to be ordered. Neighbouring regions close to
+each other are merged, while regions shorter than the minimal domain
+size of at least 30 residues are ignored.
+
+\subsubsection{GLOBPLOT}
+\href{http://globplot.embl.de/}{GLOBPLOT} defines regions of
+globularity or natively unstructured regions based on a running sum of
+the propensity of residues to be structured or unstructured. The
+propensity is calculated based on the probability of each amino acid
+being observed within well defined regions of secondary structure or
+within regions of random coil. The initial signal is smoothed with a
+Savitzky-Golay filter, and its first order derivative
+computed. Residues for which the first order derivative is positive
+are designated as natively unstructured, whereas those with negative
+values are structured.
+
+{\bf Disordered region} sequence features are created marking mark range(s) of residues with positive first order derivatives, and 
+\textbf{Globular Domain} features mark long stretches of order. \textbf{Dydx} annotation rows give the first order derivative of smoothed score. Values above 0 indicates
+residue is disordered. 
+
+\textbf{Smoothed Score and Raw Score} annotation rows give the smoothed and raw scores used to create the differential signal that
+indicates the presence of unstructured regions. These are hidden
+by default, but can be shown by right-clicking on the alignment
+annotation panel and selecting \textbf{Show hidden annotation}.
+
+\exercise{Protein Disorder Prediction}
+{
+\label{protdisorderex}
+{\sl Note:} Before starting this exercise, make sure you enable the \protect{{\sl Add
+Temperature Factor annotation to alignment}} option in your Structures preferences
+({\sl Tool  $\Rightarrow$ Preferences  $\Rightarrow$ Structure)}.
+
+\exstep{Open the alignment from
+\url{http://www.jalview.org/tutorial/interleukin7.fa}. } 
+
+\exstep{Run the DisEMBL disorder predictor {\sl via} the {\sl Web Service
+$\Rightarrow$ Disorder Prediction $\Rightarrow$ Disembl with defaults}.}
+
+\exstep{Select all the sequences ([CTRL]-A or [CMD]-A). Open the Structure Chooser by placing
+the mouse in the Sequence ID panel, right clicking the mouse and select
+{\sl$\Rightarrow$ 3D Structure Data\ldots }. Select all structures in the list.
+Hit the {\sl New View} button to retrieve and show all PDB structures for the sequences.}
+
+\exstep{Compare the disorder predictions to the structure data by mapping any
+available temperature factors to the alignment {\sl via} the {\sl Sequence ID
+Popup $\Rightarrow$ Selection $\Rightarrow$ Add reference annotation} option.}
+
+\exstep{Features on sequences can conceal other colouring. This can be
+toggled off by selecting {\sl View
+$\Rightarrow$ Show Sequence Features} in the alignment window menu.}
+\exstep{Apply the IUPred disorder prediction method. Tick the
+{\sl Per sequence option} in the {\sl Colour $\Rightarrow$ By annotation \ldots} dialog
+box. Then shade the sequences by the long and short disorder predictors. {\sl
+Note} how well the disordered regions predicted by each method agree
+with the structure.}
+\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
+
+\chapter{DNA and RNA Sequences}
+\label{dnarna}
 \section{Working with DNA}
 \label{workingwithnuc}
-Jalview was originally developed for the analysis of protein sequences, but now includes some specific features for working with nucleic acid sequences and alignments. Nucleotide sequences and alignments are recognised based on the presence the nucleotide symbols [ACGT] of greater than 85\% in the sequences. Built in codon-translation tables can be used to translate ORFs into peptides for further analysis. EMBL records retrieved {\sl via} the sequence fetcher (see Section \ref{fetchseq}) are also parsed in order to identify codon regions and extract peptide products. 
-Furthermore, Jalview records mappings between protein sequences that are derived from regions of a nucleotide sequence. Mappings are used to to transfer annotation between nucleic acid and protein sequences, and to dynamically highlight regions in one sequence that correspond to the position of the mouse pointer in another.
-
+Jalview was originally developed for the analysis of protein sequences, but
+now includes some specific features for working with nucleic acid sequences
+and alignments. Jalview recognises nucleotide sequences and alignments based on
+the presence of nucleotide symbols [ACGT] in greater than 85\% of the
+sequences. Built in codon-translation tables can be used to translate ORFs
+into peptides for further analysis. ENA nucleotide records retrieved {\sl via} the
+sequence fetcher (see Section \ref{fetchseq}) are also parsed in order to
+identify codon regions and extract peptide products. Furthermore, Jalview
+records mappings between protein sequences that are derived from regions of a
+nucleotide sequence. Mappings are used to transfer annotation between
+nucleic acid and protein sequences, and to dynamically highlight regions in
+one sequence that correspond to the position of the mouse pointer in another.
+%TODO Working with Nucleic acid sequences and structures.
 \subsection{Alignment and Colouring}
 
-Jalview provides a simple colourscheme for DNA bases, but does not apply any specific conservation or substitution score model for the shading of nucleotide alignments. However, pairwise alignments performed using the {\sl Alignment Window $\Rightarrow$ Calculations $\Rightarrow$ Pairwise Alignment \ldots} option will utilise an identity score matrix to calculate alignment score when aligning two nucleotide sequences. 
+Jalview provides a simple colourscheme for DNA bases, but does not apply any
+specific conservation or substitution score model for the shading of
+nucleotide alignments. However, pairwise alignments performed using the {\sl Calculate $\Rightarrow$ Pairwise Alignment
+\ldots} option will utilise an identity score matrix to calculate alignment
+score when aligning two nucleotide sequences.
 
 \subsubsection{Aligning Nucleic Acid Sequences}
 
-Jalview only has limited knowledge of the capabilities of the programs that are made available to it {\sl via} web services. In particular, only the ClustalW and MAFFT programs will successfuly recognise and align nucleic acid sequences. MAFFT will also choose an appropriate parameter model. Whilst Muscle may appear to align DNA, it simply treats the base symbols as amino-acids, often leading to a poor quality alignment. Furthermore, it will almost certainly fail to align RNA containing Uracil bases, since `U' is not a valid one-letter amino acid code.
+Jalview has limited knowledge of the capabilities of the programs that
+are made available to it {\sl via} web services, so it is up to you, the user,
+to decide which service to use when working with nucleic acid sequences. The
+table shows which alignment programs are most appropriate
+for nucleotide alignment. Generally, all will work, but some may be more suited
+to your purposes than others. We also note that none of these include
+support for taking RNA secondary structure prediction into account when aligning
+sequences (but will be providing services for this in the future!) 
+\begin{table}{}
+\centering
+\begin{tabular}{|l|c|l|}
+\hline
+Program& NA support& Notes\\
+\hline
+ClustalW& Yes&\begin{minipage}[f]{3in}
+Default is to autodetect nucleotide
+sequences. Editable parameters include nucleotide substitution matrices and
+distance metrics.
+\end{minipage}
+
+\\
+\hline
+
+Muscle& Yes (treat U as T)&\begin{minipage}[f]{3in}
+Default is to autodetect nucleotide
+sequences. Editable parameters include nucleotide substitution matrices and
+distance metrics.
+\end{minipage}
+
+\\
+\hline
+
+MAFFT& Yes&\begin{minipage}[f]{3in}
+Will autodetect nucleotide sequences and use a hardwired substitution model
+(all amino-acid sequence related parameters are ignored). Unknown whether
+substitution model treats Uracil specially.
+\end{minipage}
+
+\\
+\hline
+
+ProbCons& No&\begin{minipage}[f]{3in}
+ProbCons has no special support for aligning nucleotide sequences. Whilst an
+alignment will be returned, it is unlikely to be reliable.
+\end{minipage}
+
+\\
+\hline
+
+T-COFFEE& Yes&\begin{minipage}[f]{3in}
+Sequence type is automatically detected and an appropriate
+parameter set used as required. A range of nucleotide specific
+score models are available.\end{minipage}
+
+\\\hline
+\end{tabular}
+\caption{{\bf JABAWS Alignment programs suitable for aligning nucleic acid
+sequences.} All JABAWS alignment services will return an alignment if provided
+with RNA or DNA sequences, with varying reliability.}
+\label{nucleomsatools}
+\end{table}
 
 \subsection{Translate cDNA}
 
-The {\sl Calculations $\Leftarrow$ Translate cDNA} function in the alignment window is only available when working with a nucleic acid alignment. It uses the standard codon translation table given in the online help to translate a nucleotide alignment, or the currently selected region, into a set of aligned peptide sequences. Any features or annotation present on the nucleotide alignment will also be translated, allowing DNA alignment analysis results to be transferred on to peptide products for further investigation.
+The {\sl Calculate $\Rightarrow$ Translate cDNA} function in the alignment
+window is only available when working with a nucleic acid alignment. It uses the standard codon translation table given in the online help documentation to translate a nucleotide alignment, or the currently selected region, into a set of aligned peptide sequences. Any features or annotation present on the nucleotide alignment will also be translated, allowing DNA alignment analysis results to be transferred on to peptide products for further investigation.
 
 \subsection{Linked DNA and Protein Views}
 
 \parbox{3.5in}{
-Views of alignments involving DNA sequences are linked to views of alignments containing their peptide products in a similar way to views of protein sequences and views of their associated structures. Peptides translated from cDNA and extracted from EMBL records for DNA contigs are linked to their `parent' coding regions. Mousing over a region of the peptide highlights codons in views showing the original coding region.
+Views of alignments involving DNA sequences are linked to views of alignments containing their peptide products in a similar way to views of protein sequences and views of their associated structures. Peptides translated from cDNA that have been fetched from ENA records for DNA contigs are linked to their `parent' coding regions. Mousing over a region of the peptide highlights codons in views showing the original coding region.
 }\parbox{3in}{
 \begin{center}
 %\begin{figure}[htbp]
@@ -1596,35 +3993,69 @@ Views of alignments involving DNA sequences are linked to views of alignments co
 }
 
 
-\subsection{Coding regions from EMBL records}
+\subsection{Coding Regions from ENA Records}
 
-Many EMBL records that can be retrieved from the sequence fetcher contain exons. Coding regions will be marked as features on the EMBL nucleotide sequence, and Uniprot database cross references will be listed in the tooltip displayed when the mouse hovers over the sequence ID. Uniprot database cross references extracted from EMBL records are sequence cross references, and associate a Uniprot sequence's coordinate system with the coding regions annotated on the EMBL sequence. Jalview utilises cross-reference information in two ways.
+Many ENA records that can be retrieved with the sequence fetcher contain exons.
+Coding regions will be marked as features on the ENA nucleotide sequence, and
+Uniprot database cross references will be listed in the tooltip displayed when
+the mouse hovers over the sequence ID. Uniprot database cross references
+extracted from ENA records are sequence cross references, and associate a
+Uniprot sequence's coordinate system with the coding regions annotated on the
+ENA sequence. Jalview utilises cross-reference information in two ways.
 \subsubsection{Retrieval of Protein or DNA Cross References}
-The {\sl Calculations $\Rightarrow$ Get Cross References } function is only available when Jalview recognises that there are protein/DNA cross-references present on sequences in the alignment. When selected, it retrieves the cross references from the alignment's dataset (a set of sequence and annotation metadata shared between alignments) or using the sequence database fetcher. This function can be used for EMBL sequences containing coding regions to open the Uniprot protein products in a new alignment window. The new alignment window that is opened to show the protein products will also allow dynamic highlighting of codon positions in the EMBL record for each residue in the product(s).
+The {\sl Calculate $\Rightarrow$ Get Cross References } function is only available when Jalview recognises that there are protein/DNA cross-references present on sequences in the alignment. When selected, it retrieves the cross references from the alignment's dataset (a set of sequence and annotation metadata shared between alignments) or using the sequence database fetcher. This function can be used for ENA sequences containing coding regions to open the Uniprot protein products in a new alignment window. The new alignment window that is opened to show the protein products will also allow dynamic highlighting of codon positions in the ENA record for each residue in the protein product(s).
 
-\subsubsection{Retrieval of protein DAS features on coding regions}
+\subsubsection{Retrieval of Protein Features on Coding Regions}
 
-The Uniprot cross-references derived from EMBL records can be used by Jalview to visualize protein sequence features directly on nucleotide alignments. This is because the database cross references include the sequence coordinate mapping information to correspond regions on the protein sequence with that of the nucleotide contig. Jalview will use the Uniprot accessions associated with the sequence to retrieve features, and then map them onto the nucleotide sequence's coordinate system using the coding region location.
+The Uniprot cross-references derived from ENA records can be used by Jalview to visualize protein sequence features directly on nucleotide alignments.
+This is because the database cross references include the sequence coordinate mapping information to correspond regions on the protein sequence with that of the nucleotide contig. 
+Jalview will use the Uniprot accession numbers associated with the sequence to retrieve features, and then map them onto the nucleotide sequence's coordinate system using 
+the coding region location.
 
 \begin{figure}[htbp]
 \begin{center}
 \label{dnadasfeatures}
 \includegraphics[width=5in]{images/dnadasfeatures.pdf}
 
-\caption{Uniprot and PDB sum features retrieved {\sl via} DAS and mapped onto coding regions of EMBL record V00488}
+\caption{Uniprot and PDB sum features retrieved and mapped onto
+coding regions of ENA record V00488 (an earlier version of Jalview is shown
+here).}
 
 \end{center}
 \end{figure}
 
-\exercise{Visualizing protein features on coding regions}
+\exercise{Visualizing Protein Features on Coding Regions}
 {
-\exstep{Use the sequence fetcher to retrieve EMBL record V00488.}
-\exstep{Ensure that {\sl View $\Rightarrow$ Show Sequence Features} is checked and change the alignment view format to Wrapped mode so the distinct exons can be seen.}
-\exstep{Open the DAS sequence feature fetcher window and fetch features for V00488 the Uniprot reference server, and any additional servers that work with the Uniprot coordinate system.}
+\label{protfeatureex}
+\exstep{Use the sequence fetcher to retrieve ENA record D49489.}
+\exstep{Ensure that {\sl View $\Rightarrow$ Show Sequence Features} is checked and change the 
+alignment view format to {\sl Wrapped} mode so the distinct exons can be seen.}
+\exstep{Open the {\sl DAS Settings} tab in the {\sl Sequence Feature Settings\ldots} 
+window {\sl View $\Rightarrow$ Features setting}
+and fetch features for D49489 from the Uniprot reference server,
+and any additional servers that work with the Uniprot coordinate system.}
 \exstep{Mouse over the features retrieved, note that they have been mapped onto the coding regions, and in some cases broken into several parts to cover the distinct exons.}
-\exstep{Open a new alignment view containing the Uniprot protein product with {\sl Calculations $\Rightarrow$ Get Cross References $\Rightarrow$ Uniprot } and examine the database references and sequence features. Experiment with the interactive highlighting of codon position for each residue.
-}
+\exstep{Open a new alignment view containing the Uniprot protein product 
+with {\sl Calculate $\Rightarrow$ Get Cross References $\Rightarrow$ Uniprot } 
+and examine the database references and sequence features. Experiment with the 
+interactive highlighting of codon position for each residue.}
 }
+% \section{Working with RNA}
+% \label{workingwithrna}
+% 
+% \subsection{RNA specific alignment colourschemes}
+% \label{rnacolschemes}
+% 
+% \subsection{Exploring RNA secondary structure with VARNA}
+% \label{varna}
+% 
+% \subsection{RNA Secondary structure annotation}
+% \subsubsection{Interactive creation of RNA secondary structure annotation}
+% \label{rnasecstrediting}
+% 
+% \subsubsection{Import and export of RNA secondary structure annotation}
+% \label{rnasecstrio}
+
 
 % \chapter{Advanced Jalview}
 % 
@@ -1650,4 +4081,324 @@ The Uniprot cross-references derived from EMBL records can be used by Jalview to
 % \subsection{Working with Modeller files}
 % \subsection{Using local PDB files}
 % \section{Pairwise alignments}
-\r \end{document}
+
+\section{Working with RNA}
+Jalview allows the creation of RNA secondary structure annotation, and includes
+the VARNA secondary structure viewer for the display of RNA base pair diagrams.
+It also allows the extraction of RNA secondary structure from 3D data when
+available.
+
+\subsection{Performing RNA Secondary Structure Predictions}
+Secondary structure consensus calculations can be performed by enabling the
+VIENNA service {\sl via} the {\sl Web Service $\Rightarrow$ Secondary
+Structure} menu. These consensus structures are created by analysing the
+covariation patterns in all visible sequences on the alignment. For more
+information see the VIENNA documentation.
+
+\begin{figure}[htbp]
+\begin{center}
+\label{rnaviennaservice}
+\includegraphics[width=5in]{images/rnaViennaServiceWindow.pdf}
+
+\caption{Secondary structure consensus calculations can be performed by enabling the
+VIENNA service {\sl via} the {\sl Web Service $\Rightarrow$ Secondary
+Structure} menu.}
+
+\end{center}
+\end{figure}
+
+\begin{figure}[htbp]
+\begin{center}
+\label{rnaviennaaltpairs}
+\includegraphics[width=5in]{images/rnaViennaAlternateProbs.pdf}
+
+\caption{VIENNA can calculate alternate RNA base pairing probabilities. These
+are shown in Jalview as tool-tips on the RNA secondary structure probability
+score.}
+
+\end{center}
+\end{figure}
+
+
+\exercise{Viewing RNA Structures}
+{ \label{viewingrnaex}
+
+\exstep{Import RF00162 from the Rfam (Seed) source using {\sl Fetch sequence(s)}
+from the Desktop's File menu.} 
+
+\exstep{Select {\sl Colour by RNA Helices} to
+shade the alignment by the secondary structure annotation provided by Rfam.}
+
+\exstep{Open VARNA with {\sl Structure $\Rightarrow$ View Structure
+$\Rightarrow$ RNA Secondary Structure}.
+In the VARNA Structures Manager toggle between (i) secondary structure
+(alignment) (with gaps) and (ii) trimmed secondary structure (alignment). 
+Explore the difference between trimmed and untrimmed views.
+Click on different residues in the VARNA diagram - you should also see them
+highlighted and selected in the sequence alignment window.}
+
+\exstep{In the VARNA Structures Manager, right click on display window to
+bring up the pop up context menu. Explore the options within the File, Export,
+Display and Edit sections.
+
+{\em VARNA views are stored in Jalview project files, in the same way as 3D
+structure views produced by Jmol and Chimera.}}
+
+\exstep{Enable the calculation and display of an RNAAliFold secondary structure
+prediction for the alignment by selecting {\sl Web Service $\Rightarrow$ Secondary
+Structure Prediction $\Rightarrow$ RNAAliFold }.}
+% Compare this with the annotationline provided by Rfam.
+
+\exstep{Edit the RNAAliFold calculation settings to show
+Base Pair probabilities. Explore how editing the alignment affects the consensus
+calculation.}
+
+\exstep{Import 2GIS from the PDB database into a new window with {\sl Fetch
+sequence(s)}.}
+
+\exstep{Click on a sequence in Sequence ID panel and select {\sl Structure
+$\Rightarrow$ View Structure $\Rightarrow$ 2GIS}, to view the structure in Jmol
+window. Click on different residues and located them in the sequence alignment window.}
+
+%\exstep{Add and link a Jmol structure view
+%for Bacillus\_amyloliquef.9 for 3NPB (from the PDB). Display the secondary
+%structure along-side the consensus structure for the alignment by adding
+%reference annotation from the 3D structure.
+
+%{\sl Hint: You need to make sure the RNAview service is enabled in your {\sl
+%Structure} preferences to obtain RNA secondary structure annotation from PDB
+%files.}}
+
+ }
+
+\chapter{Webservices}
+
+\section{What are Web Services ?}
+
+\label{jvwebservices}
+The term ``Webservices'' refers to a variety of data exchange
+mechanisms based on HTTP.\footnote{HTTP: Hyper-Text Transfer Protocol.} 
+
+\parbox[c]{4.5in}{Jalview can exploit public webservices to access databases
+remotely, and also submit data to public services by opening pages with your web browser. These types of
+services are `one-way', {\sl i.e.} data is either sent to the webservice or
+retrieved from it by Jalview. The desktop application can also interact
+with `two-way' remote analysis services in order to offload computationally
+intensive tasks to High Performance Computing facilities. Most of these two-way
+services are provided by {\bf Ja}va {\bf B}ioinformatics {\bf A}nalysis {\bf
+W}eb {\bf S}ervice (JABAWS) servers\footnote{See
+http://www.compbio.dundee.ac.uk/jabaws for more information and to download
+your own server.}, which provides an easily installable system for performing
+a range of bioinformatics analysis tasks. }
+\parbox[c]{1.75in}{\includegraphics[width=1.65in]{images/wsmenu.pdf}}
+
+\subsection{One-Way Web Services}
+
+There are two types of one way service in Jalview. Database services,
+which were introduced in in Section \ref{fetchseq}, provide sequence and
+alignment data. They can also be used to add sequence IDs to an alignment
+imported from a local file, prior to further annotation retrieval, as described
+in Section \ref{featuresfromdb}.
+% The final type of one way service are sequence
+% and ID submission services.
+% exemplified by the `Envision2 Services' provided
+% by the ENFIN Consortium\footnote{ENFIN is the European Network for Functional
+% INtegration. Please see http://www.enfin.org for more information. }.
+
+% \subsubsection{One-way submission services}
+% Jalview can use the system's web browser to submit sets of sequences and
+% sequence IDs to web based applications. Single sequence IDs can be passed to
+% a web site using the user definable URL links listed under the {\sl
+% Links} submenu of the sequence ID popup menu. These are configured
+% in the {\sl Connections} tab of the {\sl Preferences} dialog box.
+% 
+% The Envision 2 services presented in the webservice menu provides are the first
+% example of one-way services where multiple sequences or sequence IDs can be
+% sent. The {\sl Web service $\Rightarrow$ Envision 2 Services} menu entry
+% provides two sub-menus that enable you to submit the sequences or IDs
+% associated with the alignment or just the currently selected sequences to one
+% of the Envision2 workflows. Selecting any one will open a new browser window on
+% the Envision2 web application. The menu entries and their tooltips provide
+% details of the Envision2 workflow and the dataset set that will be submitted
+% ({\sl i.e.} the database reference type, or associated sequence subset). Please
+% note, due to technical limitations, Jalview can currently only submit small
+% numbers of sequences to the workflows - if no sequence or ID submissions are
+% presented in the submenus, then try to select a smaller number of sequences to
+% submit. 
+
+\subsection{Remote Analysis Web Services}
+Remote analysis services enable Jalview to use external computational
+facilities. There are currently three types of service - multiple sequence
+alignment, protein secondary structure prediction, and alignment analysis.
+Many of these are provided by JABA servers, which are described at the end of
+this section. In all cases, Jalview will construct a job based on the alignment
+or currently selected sequences, ask the remote server to run the job, monitor
+status of the job and, finally, retrieve the results of the job and display
+them. The Jalview user is kept informed of the progress of the job through a
+status window.
+
+Currently, web service jobs and their status windows are not stored in Jalview
+Project Files\footnote{This may be rectified in future versions.}, so it is
+important that you do not close Jalview whilst a job is running. It is also
+essential that you have a continuous network connection in order to
+successfully use web services from Jalview, since it periodically checks the
+progress of running jobs.
+
+
+\section{JABA Web Services for Sequence Alignment and Analysis}
+\label{jabaservices}
+JABA stands for ``JAva Bioinformatics Analysis'', which is a system developed
+by Peter Troshin and Geoff Barton at the University of Dundee for running
+computationally intensive bioinformatics analysis programs. A JABA installation
+typically provides a range of JABA web services (JABAWS) for use by other
+programs, such as Jalview.
+
+Exercises in the remainder of this section will demonstrate the simplest way of
+installing JABA on your computer, and configuring Jalview so it can access the JABA services. If you
+need any further help or more information about the services, please go to the
+\href{http://www.compbio.dundee.ac.uk/jabaws}{JABAWS home page}.
+%% \subsubsection{Aims}
+%%  \begin{list}{$\bullet$}{}
+%%  \item Gain experience using the different alignment services provided by
+% JABA
+%%\item Learn about the way that Jalview stores user presets for JABA services
+%%\item Learn how to install JABA services and configure Jalview to access them
+%%\end{list}
+
+\subsection{Changing the Web Services Menu Layout}
+\label{changewsmenulayout}
+If you are working with a lot of different JABA services, you may wish to change
+the way Jalview lays out the web services menu. You can do this from the Web
+Services tab of the {\sl Preferences} dialog box.
+
+\exercise{Changing the Layout of the Web Services Menu}{
+\label{changewsmenulayoutex}
+\exstep{Make sure you have loaded an alignment into Jalview, and examine the
+current layout of the alignment window's {\sl Web Service} menu.}
+\exstep{Open the preferences dialog box and select the web services tab.}
+\exstep{Ensure the {\sl Enable JABAWS services} checkbox is selected, and unselect
+the {\sl Enable Enfin Services} checkboxes.}
+\exstep{Hit {\sl Refresh Services} to update the web services menu -- once the
+progress bar has completed, open the {\sl Web Service} menu to view the changes.}
+\exstep{Select the {\sl Index by host} checkbox and refresh the services once again.
+
+{\sl Observe the way the layout of the JABAWS Alignment submenu changes.}
+}
+\exstep{Do the same with the {\sl Index by type} checkbox.} 
+}
+
+Jalview provides these options for configuring the layout of the  {\sl Web Service}
+menu because different Jalview users may have access to a different number of
+JABA services, and each will have their own preference regarding the layout of
+the menu.
+
+\begin{figure}[htbc]
+\begin{center}
+\includegraphics[width=3in]{images/jvjabawsconfig.pdf}
+\caption{{\bf The Jalview Web Services preferences panel.} Options are provided
+for configuring the list of JABA servers that Jalview will use, enabling and
+disabling Enfin services, and configuring the layout of the web services
+menu.}
+\label{jvjabawsconfig}
+\end{center}
+\end{figure}
+
+
+\subsubsection{Testing JABA services}
+The JABAWS configuration dialog shown in Figure \ref{jvjabawsconfig} has colour
+codes to indicate whether the Desktop can access the server, and whether all
+services advertised by the server are functional. The colour codes are:
+
+\begin{list}{$\bullet$}{}
+  \item Red - Server cannot be contacted or reports a connection error.
+  \item Amber - Jalview can connect, but one or more services are non-functional.
+  \item Green - Server is functioning normally.
+\end{list}
+  %TODO green and a tick, red and a cros, amber and a value indicating whether its all going
+
+Test results from JABAWS are reported on Jalview's console output (opened from
+the Tools menu). Tests are re-run every time Jalview starts, and when the
+[Refresh Services] button is pressed on the Jalview JABAWS configuration panel.
+
+\subsubsection{Resetting the JABA Services Setting to their Defaults}
+Once you have configured a JABAWS server and selected the OK button of the
+preferences menu, the settings will be stored in your Jalview preferences file,
+along with any preferences regarding the layout of the web services menu. If
+you should ever need to reset the JABAWS server list to its defaults, use the
+`Reset Services' button on the Web Services preferences panel.
+
+\subsection{Running your own JABA Server}
+You can download and run JABA on your own machine using the `VMWare' or
+VirtualBox virtual machine environments. If you would like to do
+this, there are full instructions at the
+\href{http://www.compbio.dundee.ac.uk/jabaws/}{JABA web site}.
+
+\exercise{Installing a JABA Virtual Machine on your Computer}{
+\label{jabawsvmex}{\sl This tutorial will demonstrate the simplest way of
+installing JABA on your computer, and configuring Jalview so it can access the JABA services. 
+
+{\bf Prerequisites}
+
+You will need a copy of VMWare Player/Workstation/Fusion on your machine.
+}
+
+\exstep{If you do not have VMWare player installed, download it from
+www.vmware.com (this takes a few minutes -- you will need to register and wait
+for an email with a download link).}
+\exstep{Download the JABA virtual appliance archive called `jaba-vm.zip' from
+\textsf{http://www.compbio.dundee.ac.uk/jabaws/archive/jabaws-vm.zip}
+
+WARNING: This is large (about 300MB) and will take some time to download.
+}
+\exstep{Unpack the archive's contents to a place on your machine with at least
+2GB of free space (On Windows, right click on the archive, and use the 'Extract
+archive..' option).
+}
+\exstep{Open the newly extracted directory and double click the VMWare virtual
+machine configuration file (jabaws.vcf). This will launch the VMWare player.
+}
+\exstep{Once VMWare player has started up, it may ask the question ``Did you move or copy
+this virtual appliance?'' -- select `Copy'.}
+\exstep{You may be prompted to download the VMWare linux tools. These are not
+necessary, so close the window or click on `Later'.}
+\exstep{You may also be prompted to install support for one or more devices (USB
+or otherwise). Say `No' to these options.}
+\exstep{Once the machine has loaded, it will display a series of IP addresses
+for the different services provided by the VM. Make a note of the JABAWS URL --
+this will begin with `http:' and end with `/jabaws''.}
+}
+
+\exercise{Configuring Jalview to Access your new JABAWS Virtual Appliance}{
+\label{confnewjabawsappl}
+\exstep{Start Jalview (If you have not done so already).} 
+\exstep{Enable the Jalview Java Console by selecting its option from the Tools
+menu.
+
+{\sl Alternately, use the System Java console if you have
+configured it to open when Jalview is launched, {\sl via} your system's Java
+preferences (under the `Advanced' tab on Windows).}}
+\exstep{Open the {\sl Preferences} dialog and locate the Web Services tab.}
+\exstep{Add the URL for the new JABAWS server you started in Exercise
+\ref{jabawsvmex} to the list of JABAWS urls using the `New Service
+URL' button.}
+\exstep{You will be asked if you want to test the service. Hit `Yes' to do this
+-- you should then see some output in the console window.
+
+{\sl Take a close look at the output in the console.  What do you think is
+happening?}
+}
+\exstep{Hit OK to save your preferences -- you have now added a new JABA
+service to Jalview!}
+\exstep{Try out your new JABA services by loading the ferredoxin sequences from
+http://www.jalview.org/tutorial/alignment.fa}
+\exstep{Launch an alignment using one
+of the JABA methods provided by your server. It will be listed under the JABAWS Alignment submenu of the {\sl Web Service} menu on the alignment window.
+
+{\sl Note: You can watch the JABA VM appliance's process working by opening the
+process monitor on your system. (On Windows XP, this involves right-clicking the
+system clock and opening the task manager -- then selecting the 'Processes' tab
+and sort by CPU).}
+}
+}
+
+\end{document}