From: Jim Procter Date: Tue, 8 Jun 2010 16:50:02 +0000 (+0000) Subject: jalview 2.5 updates X-Git-Tag: Version_1.9.2~93 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f379664da723e2097b960168a0d20c3bfd6f4458;p=jalview-manual.git jalview 2.5 updates --- diff --git a/.texlipse b/.texlipse index 36b6c70..a33ee3d 100644 --- a/.texlipse +++ b/.texlipse @@ -1,5 +1,5 @@ #TeXlipse project settings -#Thu Aug 14 17:01:10 BST 2008 +#Mon May 24 09:33:34 BST 2010 builderNum=2 outputDir= makeIndSty= diff --git a/TheJalviewTutorial.tex b/TheJalviewTutorial.tex index ef909df..52faea0 100644 --- a/TheJalviewTutorial.tex +++ b/TheJalviewTutorial.tex @@ -1,10 +1,12 @@ %\documentclass[a4paper,11pt]{report} \documentclass[a4paper,11pt]{book} +\usepackage[format=hang,margin=10pt]{caption} \usepackage{footnote} \usepackage{graphicx} \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 @@ -18,14 +20,15 @@ %\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 } +\title{Jalview 2.5: A manual and introductory tutorial } \author{David Martin, James Procter, Andrew Waterhouse and Geoff Barton} -\date{Manual version 1.1 1st September 2008} +\date{Manual version 1.2 9st June 2010} \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}}\cleardoublepage} @@ -48,6 +51,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,13 +64,16 @@ 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.5 } \vspace{0.5in} {\huge @@ -90,9 +97,9 @@ Dundee, Scotland DD1 5EH, UK \vspace{2in} -Manual version 1.1 +Manual version 1.2 -1st September 2008 +8th June 2010 \end{center} @@ -116,7 +123,7 @@ Manual version 1.1 \label{jalviewbasics} \section{Introduction} \subsection{Jalview} -Jalview is a sequence multiple alignment viewer, editor and analysis tool. +Jalview is a multiple sequence 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 @@ -136,7 +143,7 @@ colouring.}, to allow customisable display of alignments for web sites such as {\bf pfam}\footnote{\url{http://pfam.sanger.ac.uk}}. -Jalview 2.4 was released in September 2008. The Jalview Desktop in this version +Jalview 2.5 was released in May 2010. 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 @@ -164,20 +171,19 @@ 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 is now supported for a further 5 years from October 2009 +by an award from the BBSRC's Tools and Resources fund. +%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. \subsection{About this tutorial } @@ -227,9 +233,9 @@ 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. +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 and from the {\sl Help $\Rightarrow$ About} menu option. %[fig 2] \begin{figure}[htbp] @@ -241,7 +247,10 @@ $\Rightarrow$ About} menu option. \end{center} \end{figure} When 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}. +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 will look like the one in Figure \ref{startpage} (this is taken +from the Jalview 2.4 manual). %[figure 3 ] \begin{figure}[htbp] @@ -255,7 +264,14 @@ Jalview site. This behaviour can be changed in the Jalview Desktop preferences d \exercise{Starting Jalview}{ \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{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 Desktop's user preferences dialog (from the Tools +menu), and untick the checkbox adjacent to the 'Open file' entry in the +'Visual' preferences tab.} +\exstep{Click OK to save the preferences, then close Jalview and launch it +again. The example alignment should not be loaded when Jalview starts up.} +} + \subsection{Getting Help} \label{gettinghelp} @@ -276,7 +292,7 @@ Jalview has comprehensive on-line help documentation. Select {\sl Help $\Righta 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. \section{Navigation} -\lavel{jvnavigation} +\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. @@ -328,7 +344,8 @@ Move to sequence 7 by pressing {\sl 7 S}. Move to column 18 by pressing {\sl 1 8 } \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. +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 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 @@ -354,7 +371,7 @@ A further option for navigation is to use the {\sl Select $\Rightarrow$ Find\ldo \end{center} \end{figure} \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. 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. %[fig 8] +\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 alignment' option in the menu that appears. The other is to select {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From Textbox} from the main menu, and paste the sequences into the textbox window that will appear (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} @@ -366,8 +383,9 @@ A further option for navigation is to use the {\sl Select $\Rightarrow$ Find\ldo \end{figure} \subsection{From a public database} -\label{fetchseq} Jalview 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. %[fig 9] \begin{figure}[htbp] +\label{fetchseq} Jalview 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, 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}} @@ -456,7 +474,10 @@ Select {\sl File $\Rightarrow$ Save As} from the alignment window menu. Choose a } } \section{Selecting and editing sequences} -\label{selectingandediting} Jalview makes extensive use of selections which are arbitrary regions in an alignment. This section illustrates how to make and use selections and groups. +\label{selectingandediting} Jalview makes extensive use of selections - most of the commands available from +its menus operate on the 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. \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. @@ -479,7 +500,10 @@ To clear (unselect) the selection press the [ESC] (escape) key. \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} @@ -493,7 +517,7 @@ To clear (unselect) the selection press the [ESC] (escape) key. \label{selectrows} \end{center} \end{figure} - To 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}). %[fig 14] + To select multiple complete sequences, click and drag the mouse down the sequence ID panel. 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}). %[fig 14] \subsubsection{Making selections in Cursor mode} @@ -514,13 +538,20 @@ Navigate to the bottom right corner of the proposed selection and press the [M] \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. +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.\footnote{It is also possible to hide +everything but the selected region using the {\sl View $\Rightarrow$ Hide +$\Rightarrow$ All but selected region } menu entry.} \subsection{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$ 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} +\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} @@ -543,9 +574,8 @@ Now hold down [CTRL] and click on several sequences ID's both selected and unsel \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{\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.} @@ -591,8 +621,6 @@ To hide a set of sequences, select them and right-click the mouse on the selecte \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. \begin{figure}[htbp] @@ -605,6 +633,11 @@ A similar mechanism applies to columns (Figure \ref{hidecol}). Selected columns \end{center} \end{figure} +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, use the {\sl View $\Rightarrow$ Hide +$\Rightarrow$ All but selected region } menu entry, or press [Shift]+[Ctrl]+H +to hide the unselected region. + \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. @@ -620,6 +653,8 @@ Repeat but using a non-contiguous set of sequences. Note that when multiple regi } \exstep{Repeat the above but hiding and revealing columns instead of sequences. } +\exstep{Select a region of the alignment, add in some additional columns to the +selection, and experiment with the 'Hide all but selected region' function. } \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.} } @@ -640,36 +675,39 @@ To introduce a gap, place the cursor on the residue to the immediate right of wh 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. +\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. + +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} + +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. + \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 with [SHIFT] pressed.} \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} - -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. - % % better idea to introduce hiding sequences, and use the invert selection, hide % others, to simplify manual alignment construction \exercise{Editing alignments}{ @@ -752,9 +790,15 @@ Now, enter cursor mode by pressing [F2]} \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 +{\sl 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 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. @@ -776,6 +820,7 @@ The second method is to use the {\sl Selection $\Rightarrow$ Group $\Rightarrow \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} @@ -798,11 +843,17 @@ For many colour schemes, the intensity of the colour in a column can be scaled b \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. +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 the original +colouring should be thresholded (the `Use original colours' option). }\parbox[c]{3in}{ \centerline{\includegraphics[width=2.5in]{images/col_byannot.pdf}}} \subsection{Colour schemes} @@ -963,7 +1014,6 @@ Jalview provides two screen layout modes, unwrapped (the default) where the alig 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. \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}} @@ -983,9 +1033,27 @@ Options in the {\sl Format} menu are provided to control the also provides a ran \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. +\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 Popup Menu $\Rightarrow$ Group +$\Rightarrow$ Show nonconserved}). 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} - -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. +% 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{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. \begin{figure} \begin{center} @@ -1027,7 +1095,7 @@ PNG is Portable Network Graphics. This output option produces an image that can 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}{ + \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.} @@ -1047,7 +1115,20 @@ Jalview facilitates the use of protein structures for the analysis of alignments 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. +Jalview can automatically determine which structures are associated with a +sequence if that sequence has an ID from a public database that contains +cross-references to the PDB, 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\footnote{Tip: The sequence ID tooltip can often become large for +heavily cross referenced sequence IDs. Use the {\sl View $\Rightarow$ Sequence +ID Tooltip $\Rightarrow$ } submenu to disable the display of database cross +references or non-positional features. } now shows the Uniprot ID and any +associated PDB structures. \begin{figure}[htbp] \begin{center} @@ -1077,7 +1158,21 @@ Jalview can automatically determine which structures are associated with a seque \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. +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. Often, the position highlighted may not be in the visible +portion of the current alignment view. If the alignment window's {\sl View +$\Rightarrow$ Automatic Scrolling } option is not selected, then you may have +to manually move the alignment scroll bars to see the highlighted region. \begin{figure}[htbp] \begin{center} @@ -1108,7 +1203,12 @@ By default, the structure will be coloured in the same way as the sequence in th \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} +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 +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. @@ -1172,7 +1272,15 @@ Click on the tree window. Careful selection of the tree partition location will \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 }. +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} menu option. \begin{figure} @@ -1201,16 +1309,17 @@ Clicking on the tree brings up a cursor across the height of the tree. The seque %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]{4in}{ +\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]{3in}{\centerline{\includegraphics[width=2.75in]{images/pca_vmenu.pdf} +} +\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]{5in}{ +\parbox[c]{4in}{ 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} -}} +} \parbox[c]{3in}{\centerline{ +\includegraphics[width=2.5in]{images/pca_vmenu.pdf} }} \exercise{Trees}{ @@ -1232,6 +1341,19 @@ This demonstrates the use of the {\sl Pad Gaps } editing preference, which ensur \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, 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$ Automatic +Annotation $\Rightarrow$ Group Consensus} and {\sl Group Conservation} options) +can help when working with larger alignments. + \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.} @@ -1239,7 +1361,8 @@ This demonstrates the use of the {\sl Pad Gaps } editing preference, which ensur 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)} -} +{\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} @@ -1254,23 +1377,105 @@ The redundancy removal dialog box is opened using the {\sl Edit $\Rightarrow$ Re \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{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$ 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} +\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 BLOSUM62) 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 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{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$ Automatic 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 '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{treeconsanaly})} +\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 excercise.} +} -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. +\subsection{Other Calculations} -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} 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. -\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.} @@ -1278,29 +1483,94 @@ Jalview can calculate optimal pairwise alignments between arbitrary sequences vi \end{center} \end{figure} +\pagebreak[2] \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. +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.} +\parbox[c]{1.75in}{\includegraphics[width=1.65in]{images/wsmenu.pdf}} + +\subsection{One way web services} + +There are three 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 Envision2 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 services $\Rightarrow$ Envision2 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 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. +Remote analysis services enable Jalview to use external computational +facilities. There are curently two types of service - multiple sequence +alignment and protein secondary structure prediction. In both 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{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 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. By default, the +new alignment will be ordered in the same way as the input sequences; +however, many alignment programs re-order the input to place homologous +sequences close together. This ordering can be recovered using the 'Original +ordering' entry within the {\sl Calculation $\Rightarrow$ Sort } sub menu. \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)} +\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} @@ -1324,23 +1594,32 @@ If the view or selected region that is submitted for alignment contains hidden r } -\subsection{Secondary Structure Prediction} +\subsection{Protein 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 +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: +{\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. +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. \begin{figure}[htbp] \begin{center} @@ -1353,7 +1632,14 @@ Jpred is launched in the same way as the other web services. Select {\sl Web Ser \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. +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 result in a more reliable\footnote{This, of course, cannot be guaranteed, but the profile +calculated by JNet will at least be different.} 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} @@ -1382,7 +1668,7 @@ When you get the result, verify that the prediction has not been made for the hi \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. -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. +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, sequence 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. 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. @@ -1404,7 +1690,20 @@ Creation of features from a selection spanning multiple sequences results in the \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. +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 +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. The Feature +Settings dialog also includes functions for more advanced feature shading +schemes and buttons for sorting the alignment according to the distribution of +features. These capabilities are described further in sections +\ref{featureschemes} and \ref{featureordering}. \begin{figure}[htbp] \begin{center} @@ -1421,6 +1720,16 @@ Feature display can be toggled on or off by selecting the {\sl View $\Rightarrow \end{center} \end{figure} +\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}{ \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. } @@ -1431,8 +1740,13 @@ Enter a suitable Sequence Feature Name (e.g. "Iron binding site") in the approp } \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}.} -} +\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}.} } \subsection{Creating user defined annotation} @@ -1479,8 +1793,8 @@ The format for this file is given in the Jalview help. Press [F1] to open it, an \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.} } -\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. } -} +\label{viewannotfileex}\exstep{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. } } \section{Importing features from databases} \label{featuresfromdb} @@ -1488,20 +1802,51 @@ Jalview supports feature retrieval from public databases either directly or {\sl \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. +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{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}). +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{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 +Webservices $\Rightarrow$ Fetch DB References} sub-menu in the Alignment +window. This menu allows you to query either the set of {\sl Standard +Databases}, which includes EMBL, Uniprot, the PDB, and the currently selected +DAS sequence sources, 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}). \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{Verify that there are no database references for the sequences by first +checking that the {\sl View $\Rightarrow$ Sequence ID Tooltip $\Rightarrow$ Show +Database IDs} option is selected, and then mousing over each sequence's ID.} \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. @@ -1512,7 +1857,8 @@ Now close all the windows and open the project again, and verify that the databa \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. +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. \begin{figure}[htbp] \begin{center} @@ -1523,11 +1869,17 @@ Jalview includes a client to retrieve features from DAS annotation servers. To r \end{center} \end{figure} +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. - -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. +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} @@ -1539,6 +1891,7 @@ Feature retrieval can take some time if a large number of sources is selected an \exercise{Retrieving features with DAS}{ +\label{dasfeatretrexcercise} \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. @@ -1548,7 +1901,7 @@ Feature retrieval can take some time if a large number of sources is selected an % 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. +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. } @@ -1559,26 +1912,137 @@ Select {\sl View $\Rightarrow$ Feature Settings\ldots} to reopen the Feature Set % TODO: describe working with features files and GFF } } -\subsection{Sequence Feature File Formats} - -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. +\subsection{Colouring features by score or description +text} +\label{featureschemes} +Sometimes, you may need to visualize the differences in information carried by +sequence features of the same type. This is most often the case when features +of a particular type are the result of a specific type of database query or calculation. Here, they may also carry information within their textual description, or most commonly for calculations, a score related to the property being investigated. Jalview can shade sequence +features using a graduated colourscheme in order to highlight these variations. +In order to apply a graduated scheme to a feature type, select the `Graduated +colour' entry in the Sequence feature type's popup menu, which is opened by +right-clicking the feature type's color in the settings dalog box. Two types +of colouring styles are currently supported: the default is quantitative +colouring, which shades each feature based on its score, with the highest +scores receiving the 'Max' colour, and the lowest scoring features coloured +with the 'Min' colour. Alternately, you can select the `Colour by label' +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. + +Graduated feature colour schemes can also be used to exclude low or +high-scoring features from the alignment display. This is done by choosing your +desired threshold type (either above or below), using the drop-down menu in the +dialog box. Then, adjust the slider or enter a value in the text box to set the +threshold for displaying this type of feature. + +The feature settings dialog box allows you to toggle between a graduated and +simple feature colourscheme using the pop-up menu for the feature type. When a +graduated scheme is applied, it will be indicated by in the colour column for +that feature type - with coloured blocks or text to indicate the colouring +style and a greater than ($>$) or less than ($<$) symbol to indicate when a +threshold has been defined. + +\subsection{Using features to re-order the alignment} +\label{featureordering} +The presence of sequence features on certain seqences 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 buttons two buttons, `Seq sort by Density' and `Seq 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 feature type's +popup menu. Simply right-click the type's style in the 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} +\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 graduated colourscheme 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 colour scheme icon for the feature type changes when you change the threshold type.} +\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 graduated colourscheme 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 sequence +feature file format, to see how the different types of graduated feature +colour styles are encoded. } +} \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. Nucleotide sequences and alignments are recognised 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. 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. +%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 +Alignment Window $\Rightarrow$ Calculations $\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 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. \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 Calculations $\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 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} @@ -1598,7 +2062,13 @@ Views of alignments involving DNA sequences are linked to views of alignments co \subsection{Coding regions from EMBL 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 EMBL records that can be retrieved with 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. \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). @@ -1611,7 +2081,9 @@ The Uniprot cross-references derived from EMBL records can be used by Jalview to \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 {\sl via} DAS and mapped onto +coding regions of EMBL record V00488 (an earlier version of Jalview is shown +here).} \end{center} \end{figure} diff --git a/images/PCA1.pdf b/images/PCA1.pdf index 99412ac..b612c99 100644 Binary files a/images/PCA1.pdf and b/images/PCA1.pdf differ diff --git a/images/Thumbs.db b/images/Thumbs.db new file mode 100644 index 0000000..0ccd672 Binary files /dev/null and b/images/Thumbs.db differ diff --git a/images/annot1.pdf b/images/annot1.pdf index 7f109c4..dc3913e 100644 Binary files a/images/annot1.pdf and b/images/annot1.pdf differ diff --git a/images/auto2.pdf b/images/auto2.pdf index 9d69e64..75a1c48 100644 Binary files a/images/auto2.pdf and b/images/auto2.pdf differ diff --git a/images/das1.pdf b/images/das1.pdf index 717236c..12a6897 100644 Binary files a/images/das1.pdf and b/images/das1.pdf differ diff --git a/images/das2.pdf b/images/das2.pdf index f7951b1..f2412d2 100644 Binary files a/images/das2.pdf and b/images/das2.pdf differ diff --git a/images/download.pdf b/images/download.pdf index 47f2b7d..248158d 100644 Binary files a/images/download.pdf and b/images/download.pdf differ diff --git a/images/features5.pdf b/images/features5.pdf index ce68a91..67c430b 100644 Binary files a/images/features5.pdf and b/images/features5.pdf differ diff --git a/images/group1.pdf b/images/group1.pdf index daabf41..c60188e 100644 Binary files a/images/group1.pdf and b/images/group1.pdf differ diff --git a/images/help1.pdf b/images/help1.pdf index a05efc1..f44e1d8 100644 Binary files a/images/help1.pdf and b/images/help1.pdf differ diff --git a/images/help2.pdf b/images/help2.pdf index eee4328..5a8d8d9 100644 Binary files a/images/help2.pdf and b/images/help2.pdf differ diff --git a/images/jalview_anatomy.pdf b/images/jalview_anatomy.pdf index 96ba506..62e97ff 100644 Binary files a/images/jalview_anatomy.pdf and b/images/jalview_anatomy.pdf differ diff --git a/images/newgroup.pdf b/images/newgroup.pdf index eda24bc..d631ffb 100644 Binary files a/images/newgroup.pdf and b/images/newgroup.pdf differ diff --git a/images/overview.pdf b/images/overview.pdf index 5060a3f..f4e8103 100644 Binary files a/images/overview.pdf and b/images/overview.pdf differ diff --git a/images/saveas2.pdf b/images/saveas2.pdf index 03a9224..a5f07bb 100644 Binary files a/images/saveas2.pdf and b/images/saveas2.pdf differ diff --git a/images/splash.pdf b/images/splash.pdf index 5a1847a..8d02010 100644 Binary files a/images/splash.pdf and b/images/splash.pdf differ diff --git a/images/start.pdf b/images/start.pdf index 19133a4..8fe736d 100644 Binary files a/images/start.pdf and b/images/start.pdf differ diff --git a/images/structure1.pdf b/images/structure1.pdf index adf6e75..0da8805 100644 Binary files a/images/structure1.pdf and b/images/structure1.pdf differ diff --git a/images/structure2.pdf b/images/structure2.pdf index 53c6013..6cc43f3 100644 Binary files a/images/structure2.pdf and b/images/structure2.pdf differ diff --git a/images/wrap1.pdf b/images/wrap1.pdf index 0af868c..1f2a8a2 100644 Binary files a/images/wrap1.pdf and b/images/wrap1.pdf differ diff --git a/images/wrap2.pdf b/images/wrap2.pdf index 06885bc..de202b7 100644 Binary files a/images/wrap2.pdf and b/images/wrap2.pdf differ diff --git a/images/ws1.pdf b/images/ws1.pdf index dcc6400..a7edb77 100644 Binary files a/images/ws1.pdf and b/images/ws1.pdf differ diff --git a/images/wsdbfetch.pdf b/images/wsdbfetch.pdf new file mode 100644 index 0000000..1d548f5 Binary files /dev/null and b/images/wsdbfetch.pdf differ diff --git a/images/wsenvision2.pdf b/images/wsenvision2.pdf new file mode 100644 index 0000000..d61d346 Binary files /dev/null and b/images/wsenvision2.pdf differ diff --git a/images/wsmenu.pdf b/images/wsmenu.pdf new file mode 100644 index 0000000..f317ed6 Binary files /dev/null and b/images/wsmenu.pdf differ diff --git a/latest/TheJalviewTutorial.pdf b/latest/TheJalviewTutorial.pdf index 80dc29a..26e05a0 100644 Binary files a/latest/TheJalviewTutorial.pdf and b/latest/TheJalviewTutorial.pdf differ diff --git a/latest/TheJalviewTutorial_screen.pdf b/latest/TheJalviewTutorial_screen.pdf index 21d25c4..7db1ab8 100644 Binary files a/latest/TheJalviewTutorial_screen.pdf and b/latest/TheJalviewTutorial_screen.pdf differ