-\begin{figure}
-\begin{center}
-\includegraphics[width=5in]{images/trees3.pdf}
-\caption{{\bf Interactive Trees} The tree level cutoff can be used to designate
-groups in Jalview.}
-\label{trees2}
-\end{center}
-\end{figure}
-
-%\subsubsection{Multiple Views and Input Data recovery from PCA and Tree Viewers}
-% move to ch. 3 ?
-%Both PCA and Tree viewers are linked analysis windows. This means that their selection and display are linked to a particular alignment, and control and reflect the selection state for a particular view.
-
-\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} }}
-
-
-\exercise{Trees}{
-\exstep{Ensure that you have at least 1G memory available in Jalview (start with this link: \href{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}).}
-\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 three trees illustrates the importance of selecting appropriate regions of the alignment for the calculation of trees.
-}
-\exstep{Recover the {\sl Input Data} for the tree you just calculated from the {\sl File} menu. Check the {\sl Edit $\Rightarrow$ Pad Gaps } option is {\sl not} ticked, and insert one gap anywhere in the alignment. Now 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{Now select {\sl Edit $\Rightarrow$ Pad Gaps } and try to perform the tree calculation again - this time a new tree should appear.
-
-This demonstrates the use of the {\sl Pad Gaps } editing preference, which ensures that all sequences are the same length after editing. }
-
-}
-
-\subsection{Tree Based Conservation Analysis}
-\label{treeconsanaly}
-
-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 View $\Rightarrow$ Autocalculated
-Annotation $\Rightarrow$ Group Conservation} and {\sl Group Consensus} options)
-can help when working with larger alignments.
-
-\exercise{Tree Based Conservation Analysis}{
-\label{consanalyexerc}
-\exstep{Load the PF03460 PFAM 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 {\sl Sort Alignment By Tree} option in the tree viewer 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 if you first uncheck the {\sl View $\Rightarrow$ Show Annotations} 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)}
-{\sl Note: You may want to save the alignment and tree as a project file, since
-it is used in the next few exercises. } }
-
-\subsection{Redundancy Removal}
-
-The redundancy removal dialog box is opened using the {\sl Edit $\Rightarrow$ Remove Redundancy\ldots} option in the alignment menu. As its menu option placement suggests, this is actually an alignment editing function, but it is convenient to describe it here. The redundancy removal dialog box presents a percentage identity slider which sets the redundancy threshold. Aligned sequences which exhibit a percentage identity greater than the current threshold are highlighted in black. The [Remove] button can then be used to delete these sequences from the alignment as an edit operation\footnote{Which can usually be undone. A future version of Jalview may allow redundant sequences to be hidden, or represented by a chosen sequence, rather than deleted.}.
-\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.}
-\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{consanalyexerc})}
-\exstep{Open the Remove Redundancy dialog and adjust the threshold to 90\%. Remove the sequences that are more than 90\% similar under this alignment.}
-\exstep{Select the Tree viewer's {\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 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{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.
-
-\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 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 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 View $\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.
-
-\exercise{Group Conservation Analysis}{
-\exstep{Re-use or recreate the alignment and tree which you worked with in the
-tree based conservation analysis exercise (exercise \ref{consanalyexerc})}
-\exstep{Create a new view, and ensure the annotation panel is displayed, and
-enable the display of {\sl Group Consensus} and the display of sequence
-logos to make it easier to see the different residue populations within each group.}
-\exstep{Select a column exhibiting about 50\% conservation that lies within the
-central conserved region of the alignment. 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. 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.}
-}
-
-\subsection{Other Calculations}
-
-
-\subsubsection{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.
-
-\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.}
-\label{pairwise}
-\end{center}
-\end{figure}
-
-\pagebreak[2]
-
-\section{Webservices}
-\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}. A second type of one way service is provided
-by Jalview's DAS sequence feature retrieval system, which is described
-in Section \ref{dasfretrieval}.
-% 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 curently 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.
-
-
-\subsection{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 learn how 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).}