From: Suzanne Duce Date: Thu, 18 Feb 2016 16:48:07 +0000 (+0000) Subject: Changes for Feb 2016 SLS course X-Git-Tag: Version_1.9.2~35 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview-manual.git;a=commitdiff_plain;h=921b817dd3d3eed415001f77b925e92dffac069d Changes for Feb 2016 SLS course --- diff --git a/TheJalviewTutorial.tex b/TheJalviewTutorial.tex index 0575ebd..231b364 100644 --- a/TheJalviewTutorial.tex +++ b/TheJalviewTutorial.tex @@ -28,7 +28,7 @@ \title{Jalview 2.5: A manual and introductory tutorial } -\author{David Martin, James Procter, Andrew Waterhouse and Geoff Barton} +\author{David Martin, James Procter, Andrew Waterhouse, Saif Shehata, Nancy Giang,Suzanne Duce and Geoff Barton} \date{Manual version 1.2.3 6th May 2011} \newcommand{\clearemptydoublepage}{\newpage{\pagestyle{empty}}\cleardoublepage} @@ -74,8 +74,7 @@ Exercise \theecount : #1 } {\Huge -Jalview 2.8.2 -} +Jalview 2.9.0b2} \vspace{0.5in} {\huge @@ -86,6 +85,8 @@ Manual and Introductory Tutorial } {\large David Martin, James Procter, Andrew Waterhouse, Saif Shehata, Nancy Giang, + + Suzanne Duce and Geoff Barton @@ -100,11 +101,11 @@ Dundee, Scotland DD1 5EH, UK \vspace{2in} -Manual Version 1.5.1 +Manual Version 1.6 % post CLS lifesci course on 15th January % draft. Remaining items are AACon, RNA visualization/editing and Protein disorder analysis exercises. -24th April 2015 +18th February 2016 \end{center} @@ -119,14 +120,13 @@ Manual Version 1.5.1 \pagenumbering{roman} \setcounter{page}{1} \tableofcontents -\clearemptydoublepage +%\clearemptydoublepage % \listoffigures % \newpage % \listoftables -% \newpage +\newpage \pagenumbering{arabic} \setcounter{page}{1} - \chapter{Basics} \label{jalviewbasics} \section{Introduction} @@ -242,7 +242,7 @@ that contains them - for example {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From URL} means to select the `From URL' option from the `Input Alignment' submenu of a window's `File' dropdown menu. -\section{Obtaining and Starting the Jalview Desktop Application} +\section{Launching the Jalview Desktop Application} \label{startingjv} \begin{figure}[htbp] \begin{center} @@ -368,8 +368,7 @@ sequence during the launch process, then go to the {\sl Tools $\Rightarrow$ Preferences...} menu on the desktop. The tick the `Open file' entry of `Visual' preferences tab, type in the URL of the sequence you want to load. This -file will load during the start up process.\\ - +file will load during the start up process. As the jalview.jnlp file launches Jalview on your desktop, you may want to move this from the downloads folder to another folder. Opening from this file will allow Jalview to be launched offline. @@ -489,9 +488,19 @@ move to sequence (row). {\sl n} \item {\bf Jump to Residue {\sl n}:} Type a number {\sl n} then press [P] to move to residue number {\sl n} in the current sequence. \item {\bf Jump to column {\sl m} row {\sl n}:} Type the column number {\sl m}, a comma, the row number {\sl n} and press [RETURN]. \end{list} +\subsection{The Find Dialog Box} +\label{searchfunction} +A further option for navigation is to use the {\sl Select $\Rightarrow$ +Find\ldots} function. This opens a dialog box into which can be entered regular +expressions for searching sequences and sequence IDs, or sequence numbers. +Hitting the [Find next] button will highlight the first (or next) occurrence of +that pattern in the sequence ID panel or the alignment, and will adjust the view +in order to display the highlighted region. The Jalview Help provides +comprehensive documentation for this function, and a quick guide to the regular +expressions that can be used with it. +%TODO insert a figure for the Find dialog box \exercise{Navigation}{ -\label{navigate} Jalview has two navigation and editing modes: {\bf normal} mode (where editing and navigation are via the mouse) and the {\bf cursor} mode (where editing and navigation are via the keyboard). @@ -513,7 +522,7 @@ alignment by clicking and dragging the red box in the overview window.} corner of the alignment window) as you move the mouse over the alignment. It indicates information about the sequence and residue under the cursor.} \exstep{Press [F2] key (or [Fn]/[F2] on Mac) to enter {\bf Cursor mode}. Use -the direction {\bfarrow keys} to move the cursor around the alignment.} +the direction keys to move the cursor around the alignment.} \exstep{Move to sequence 7 by pressing {\bf 7 S}. Move to column 18 by pressing {\bf 1 8 C}. Move to residue 18 by pressing {\bf 1 8 P}. Note that these can be two different positions if gaps are inserted into the sequence. Move to sequence 5, @@ -522,29 +531,15 @@ column 13 by typing {\bf 1 3 , 5 [RETURN]}.} {\bf Note:} To view Jalview's comprehensive on-line help documentations select Help on desktop menu, clicking on Documentation will open a Documentation window. Select topic from the navigation panel on the left hand side or use the -Search tab to select specific key words - +Search tab to select specific key words. {\bf Help navigating is available in videos on the Getting Started page -of the Jalview website at \url{http://www.jalview.org/Help/Getting-Started}.}} - -\subsection{The Find Dialog Box} -\label{searchfunction} -A further option for navigation is to use the {\sl Select $\Rightarrow$ -Find\ldots} function. This opens a dialog box into which can be entered regular -expressions for searching sequences and sequence IDs, or sequence numbers. -Hitting the [Find next] button will highlight the first (or next) occurrence of -that pattern in the sequence ID panel or the alignment, and will adjust the view -in order to display the highlighted region. The Jalview Help provides -comprehensive documentation for this function, and a quick guide to the regular -expressions that can be used with it. - -%TODO insert a figure for the Find dialog box - +of the Jalview website at \url{http://www.jalview.org/Help/Getting-Started}} +} -\section{Loading your Own Sequences} +\section{Loading Sequences and Alignments} \label{loadingseqs} -Jalview provides many ways to load your own sequences. %For this section of the tutorial you will need to download the file http://www.jalview.org/tutorial/alignment.fa to a suitable location on your hard drive. - +%Jalview provides many ways to load your own sequences. %For this section of the +% tutorial you will need to download the file http://www.jalview.org/tutorial/alignment.fa to a suitable location on your hard drive. \subsection{Drag and Drop} In most operating systems you can just drag a file icon from a file browser window and drop it on an open Jalview application window. The file will then be opened as a new alignment window. %You can try this with the tutorial file you have downloaded. When you have opened the file, close it again by selecting the close control on the window. If you drop an alignment file onto an open alignment window it will be appended. @@ -656,7 +651,22 @@ record.} \label{loadseq} \end{center} \end{figure} - + +\subsection{Memory Limits} +\label{memorylimits} +Jalview is a Java program. One unfortunate implication of this is that Jalview +cannot dynamically request additional memory from the operating system. It is +important, therefore, that you ensure that you have allocated enough memory to +work with your data. On most occasions, Jalview will warn you when you have +tried to load an alignment that is too big to fit in to memory (for instance, +some of the PFAM alignments are {\bf very} large). You can find out how much +memory is available to Jalview with the desktop window's {\sl $\Rightarrow$ +Tools $\Rightarrow$ Show Memory Usage} function, which enables the display of +the currently available memory at the bottom left hand side of the Desktop +window's background. Should you need to increase the amount of memory available +to Jalview, full instructions are given in the built in documentation (opened by +selecting {\sl Help $\Rightarrow$ Documentation}) and on the JVM memory +parameters page (\url{http://www.jalview.org/jvmmemoryparams.html}). \exercise{Loading Sequences}{ \label{load} @@ -673,7 +683,7 @@ your web browser and {\bf save} the file to your desktop. Open the file you have just saved in Jalview by selecting {\sl File $\Rightarrow$ Input Alignment $\Rightarrow$ From File} from the desktop menu and selecting this file. -Click OK to load the alignment.} +Click OK to load.} \exstep{{\bf Loading sequences by `Drag and Drop' / `Cut and Paste':} (i) Select {\sl Desktop $\Rightarrow$ Window @@ -681,14 +691,13 @@ $\Rightarrow$ Close All}. Then drag the alignment.fa file from the desktop and drop it onto the Jalview window, the alignment should open. Test the differences -between (a) dragging the sequence onto the empty Jalview desktop and (b) +between (a) dragging the sequence onto the Jalview desktop and (b) dragging the sequence onto an existing alignment window. (ii) Open \url{http://www.jalview.org/tutorial/alignment.fa} in a -web browser. Drag the URL directly from browser window onto Jalview. - -(If the URL is downloaded instead of opened in the browser, then -locate the file in your download directory and open it in a text editor.) +web browser. Drag the URL directly from browser onto Jalview desktop. (If +the URL is downloaded, then locate the file in your +download directory and open it in a text editor.) (iii) Open the alignment.fa file using text editor. Copy the sequence text from the file into the clipboard and paste it into the desktop @@ -704,40 +713,22 @@ loaded.} \exstep{{\bf Loading sequences from Public Database:} Select {\sl File $\Rightarrow$ Fetch Sequence(s)...} from the Desktop to open up new window called New Sequence Fetcher. -Press database selection button at the top of the dialog box, this opens +Press database selection button (top of the dialog box), this opens another window called Select Database Retrieval Source showing all the database sources. -Select the {\bf PFAM seed} database and click ok, then enter the accession +Select the {\bf PFAM seed} database and click OK, then enter the accession number {\bf PF03460} and click OK. An alignment of about 174 sequences should -load, these can be viewed using the Overview window accessible from {\sl View -$\Rightarrow$ Overview Window.}. - -Several database IDs -or accession numbers can be loaded by using semicolons to separate them.} +load. These can be viewed using the Overview window accessible from {\sl View +$\Rightarrow$ Overview Window.} +Several database IDs can be loaded by using semicolons to separate them.} {\bf Help loading sequences is available in videos on the Getting Started page of the Jalview website at \url{http://www.jalview.org/Help/Getting-Started}.} } -\subsection{Memory Limits} -\label{memorylimits} -Jalview is a Java program. One unfortunate implication of this is that Jalview -cannot dynamically request additional memory from the operating system. It is -important, therefore, that you ensure that you have allocated enough memory to -work with your data. On most occasions, Jalview will warn you when you have -tried to load an alignment that is too big to fit in to memory (for instance, -some of the PFAM alignments are {\bf very} large). You can find out how much -memory is available to Jalview with the desktop window's {\sl $\Rightarrow$ -Tools $\Rightarrow$ Show Memory Usage} function, which enables the display of -the currently available memory at the bottom left hand side of the Desktop -window's background. Should you need to increase the amount of memory available -to Jalview, full instructions are given in the built in documentation (opened by -selecting {\sl Help $\Rightarrow$ Documentation}) and on the JVM memory -parameters page (\url{http://www.jalview.org/jvmmemoryparams.html}). - - -\section{Writing Sequence Alignments} -\label{savingalignments} \subsection{Saving the Alignment} Jalview allows the +\section{Saving Sequences and Alignments} +\label{savingalignments} +\subsection{Saving Alignments} Jalview allows the current sequence alignments to be saved to file so they can be restored at a later date, passed to colleagues or analysed in other programs. From the alignment window menu select {\sl File $\Rightarrow$ Save As} and a dialog box @@ -818,21 +809,24 @@ positions are exactly as they were when they were saved. } of the Jalview website at \url{http://www.jalview.org/Help/Getting-Started}.}} -\section{Selecting and Editing Sequences} +\chapter{Selecting and Editing Sequences } +\label{jalviewediting} + \label{selectingandediting} Jalview makes extensive use of selections - most of the commands available from its menus operate on the {\sl currently selected region} of the alignment, either to change their appearance or perform some kind of analysis. This section illustrates how to make and use selections and groups. -\subsection{Selecting Parts of an Alignment} -Selections can be of arbitrary regions in an alignment, one or more complete columns, or one or more complete sequences. - -A selected region can be copied and pasted as a new alignment using the {\sl Edit $\Rightarrow$ Copy} and {\sl Edit $\Rightarrow$ Paste $\Rightarrow$ To New Alignment} in the alignment window menu options. - +\section{Selecting Parts of an Alignment} +Selections can be of arbitrary regions in an alignment, one or more complete columns, or one or +more complete sequences. +A selected region can be copied and pasted as a new alignment +using the {\sl Edit $\Rightarrow$ Copy} and {\sl Edit $\Rightarrow$ Paste $\Rightarrow$ To New +Alignment} in the alignment window menu options. {\bf To clear (unselect) the selection press the [ESC] (escape) key.} -\subsubsection{Selecting Arbitrary Regions} +\subsection{Selecting Arbitrary Regions} To select part of an alignment, place the mouse at the top left corner of the region you wish to select. Press and hold the mouse button and drag the mouse to the bottom right corner of the chosen region then release the mouse button. A dashed red box appears around the selected region (Figure \ref{select}). %[fig 12] @@ -844,7 +838,7 @@ To select part of an alignment, place the mouse at the top left corner of the re \end{center} \end{figure} -\subsubsection{Selecting Columns} +\subsection{Selecting Columns} To select the same residues in all sequences, click and drag along the alignment ruler. This selects the entire column of the alignment. Ranges of positions from the alignment ruler can also be selected by clicking on the first position and then @@ -863,7 +857,7 @@ selection. } \end{center} \end{figure} -\subsubsection{Selecting Sequences} +\subsection{Selecting Sequences} \begin{figure}[htb] \begin{center} @@ -879,7 +873,7 @@ 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} +\subsection{Making Selections in Cursor Mode} To define a selection in cursor mode (which is enabled by pressing [F2] when the alignment window is selected), navigate to the top left corner of the proposed selection (using the mouse, the arrow keys, or the keystroke @@ -895,23 +889,33 @@ Navigate to the bottom right corner of the proposed selection and press the [M] \includegraphics[width=1.5in]{images/csel3.pdf} \includegraphics[width=1.5in]{images/csel4.pdf} \caption{{\bf Making a selection in cursor mode.} Navigate to the top left -corner (left), press [Q] (left center), navigate to the bottom right corner (right center) and press [M] (right).} +corner (left), press [Q], navigate to the bottom right corner and press [M] (right).} \label{cselect} \end{center} \end{figure} -\subsubsection{Inverting the Current Selection} +\begin{figure} +\begin{center} +\includegraphics[width=3in]{images/group1.pdf} +\includegraphics[width=1.5in]{images/newgroup.pdf} +\caption{{\bf Creating a new group from a selection.}} +\label{makegroup} +\end{center} +\end{figure} +\subsection{Inverting the Current Selection} The current sequence or column selection can be inverted, using {\sl Select $\Rightarrow$ Invert Sequence/Column Selection} in the alignment window. Inverting the selection is useful when selecting large regions in an alignment, simply select the region that is to be kept unselected, and then invert the selection. -This may also be useful when hiding large regions in an alignment (see Section \ref{hidingregions} below). -Instead of selecting the columns and rows that are to be hidden, simply select the region that is to be kept +This may also be useful when hiding large regions in an alignment (see Section \ref{hidingregions} +below). +Instead of selecting the columns and rows that are to be hidden, simply select the +region that is to be kept visible, invert the selection, then select {\sl View $\Rightarrow$ Hide $\Rightarrow$ Selected Region}. -\subsection{Creating Groups} +\section{Creating Groups} Selections are lost as soon as a different region is selected. Groups can be created which are labeled regions of the alignment. To create a group, first select the region which is to comprise the group. Then click the right mouse @@ -921,27 +925,8 @@ current group}\footnote{In earlier versions of Jalview, this entry was variously `Group', `Edit Group Name', or `JGroupXXXXX' (Where XXXXX was some serial number).} then enter a name for the group in the dialogue box which appears. -\begin{figure} -\begin{center} -\includegraphics[width=3in]{images/group1.pdf} -\includegraphics[width=1.5in]{images/newgroup.pdf} -\caption{{\bf Creating a new group from a selection.}} -\label{makegroup} -\end{center} -\end{figure} - By default the new group will have a box drawn around it. The appearance of the group can be changed (see Section \ref{colours} below). This group will stay defined even when the selection is removed. -\subsection{Exporting the Current Selection} - -The current selection can be copied to the clipboard (in PFAM format). It can -also be output to a textbox using the output functions in the pop-up menu -obtained by right clicking the current selection. The textbox enables quick -manual editing of the alignment prior to importing it into a new window (using -the [New Window] button) or saving to a file with the {\sl File $\Rightarrow$ -Save As } pulldown menu option from the text box. - - \exercise{Making Selections and Groups}{ \label{exselect} \exstep{Close windows. @@ -1003,7 +988,15 @@ file into a new alignment window.} % more? change colouring style. set border colour. } -\subsection{Reordering the Alignment} +\section{Exporting the Current Selection} +The current selection can be copied to the clipboard (in PFAM format). It can +also be output to a textbox using the output functions in the pop-up menu +obtained by right clicking the current selection. The textbox enables quick +manual editing of the alignment prior to importing it into a new window (using +the [New Window] button) or saving to a file with the {\sl File $\Rightarrow$ +Save As } pulldown menu option from the text box. + +\section{Reordering an Alignment} Sequence reordering is simple. Highlight the sequences to be moved then press the up or down arrow keys as appropriate (Figure \ref{reorder}). If you wish to move a sequence up past several other sequences it is often quicker to select the group past which you want to move it and then move the group rather than the individual sequence. \begin{figure}[htbp] @@ -1030,7 +1023,7 @@ together when they are re-ordered using the up and down arrow keys.} at \url{http://www.jalview.org/training/Training-Videos}.}} -\subsection{Hiding Regions} +\section{Hiding Regions} \label{hidingregions} It is sometimes convenient to exclude some sequences or residues in the alignment without actually deleting them. Jalview allows sequences or alignment columns within a view to be hidden, and this facility has been used to create the several different views in the example alignment file that is loaded when Jalview is first started (See Figure \ref{startpage}). @@ -1071,7 +1064,7 @@ than the regions that you want to hide. In this case, select the required region $\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} +\subsection{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. @@ -1084,14 +1077,14 @@ menu, select {\sl Hide Sequences}. \exstep{ Right click on the blue triangle indicating hidden sequences and select {\sl Reveal Sequences} in the panel. (If you have hidden all sequences then you will -need to use the alignment window menu option {\sl View $\Rightarrow$ Show $\Rightarrow$ All Sequences.}) } +need to use the alignment window menu option {\sl View $\Rightarrow$ Show $\Rightarrow$ +All Sequences.}) } \exstep{ Repeat the process but use a non-contiguous set of sequences. Note that when multiple regions are hidden there are two options, {\sl Reveal Sequences} and {\sl Reveal All}. } \exstep{Repeat the above using columns to hide and reveal columns -instead of sequences. -} +instead of sequences.} \exstep{Select a region of the alignment, then add in some additional columns to the selection, and experiment with the `Hide all but selected region' function in {\sl View $\Rightarrow$ Hide $\Rightarrow$ All but selected region.}} @@ -1124,14 +1117,10 @@ group is dragged to the right with [CTRL] pressed.} \end{center} \end{figure} - - - -\subsection{Introducing and Removing Gaps} - +\section{Introducing and Removing Gaps} The alignment view provides an interactive editing interface, allowing gaps to be inserted or deleted to the left of any position in a sequence or sequence group. Alignment editing can only be performed whilst in keyboard editing mode (entered by pressing [F2]) or by clicking and dragging residues with the mouse when [SHIFT] or [CTRL] is held down (which differs from earlier versions of Jalview). -\subsubsection{Locked Editing} +\subsection{Locked Editing} \label{lockededits} The Jalview alignment editing model is different to that used in other alignment editors. Because edits are restricted to the insertion and deletion of gaps to the left of a particular sequence position, @@ -1142,77 +1131,62 @@ However, its effect can be limited by performing the edit within a selected regi In this case, gaps will only be removed or inserted within the selected region. Edits are similarly constrained when they occur adjacent to a hidden column. -\subsubsection{Introducing Gaps in a Single Sequence} - +\subsection{Introducing Gaps in a Single Sequence} To introduce a gap, first select the sequence in the sequence ID panel and then place the cursor on the residue to the immediate right of where the gap should appear. Hold down the SHIFT key and the left mouse button, then drag the sequence to the right until the required number of gaps has been inserted. One common error is to forget to hold down [SHIFT]. This results in a selection which is one sequence high and one residue long. Gaps cannot be inserted in such a selection. The selection can be cleared and editing enabled by pressing the [ESC] key. -\subsubsection{Introducing Gaps in all Sequences of a Group} - +\subsection{Introducing Gaps in all Sequences of a Group} To insert gaps in all sequences in a selection or group, select the required sequences in the sequence ID panel and then place the mouse cursor on any residue in the selection or group to the immediate right of the position in which a gap should appear. Hold down the CTRL key and the left mouse button, then drag the sequences to the right until the required number of gaps has appeared. Gaps can be removed by dragging the residue to the immediate right of the gap leftwards whilst holding down [SHIFT] (for single sequences) or [CTRL] (for a group of sequences). -\subsubsection{Sliding Sequences} +\subsection{Sliding Sequences} Pressing the [$\leftarrow$] or [$\rightarrow$] arrow keys when one or more sequences are selected will ``slide'' the entire selected sequences to the left or right (respectively). Slides occur regardless of the region selection - which, for example, allows you to easily reposition misaligned subfamilies within a larger alignment. - -\subsubsection{Undoing Edits} -Jalview supports the undoing of edits {\sl via} the {\sl Edit $\Rightarrow$ Undo Edit} -alignment window menu option, or CTRL-Z. An edit, if undone, may be re-applied -with {\sl Edit $\Rightarrow$ Redo Edit}, or CTRL-Y. Note, however, that the -{\sl Undo} function only works for edits to the alignment or sequence ordering. -Colouring of the alignment, showing and hiding of sequences or modification of -annotation cannot be undone. - - % % better idea to introduce hiding sequences, and use the invert selection, hide % others, to simplify manual alignment construction -\exercise{Editing Alignments}{ -\label{mousealedit} + +\exercise{Editing Alignments} + %\label{mousealedit} % TODO: VERIFY FOR 2.6.1 and 2.7 - NUMBERING/INSTRUCTIONS APPEAR OFF -{You are going to manually reconstruct part of the example Jalview alignment - available at - \href{http://www.jalview.org/examples/exampleFile.jar}{http://www.jalview.org/examples/exampleFile.jar}. -} - \item{Remember to use [CTRL]+Z to undo an edit, or the {\sl File $\Rightarrow$ +{You are going to manually reconstruct part of the example Jalview +alignment available at + \href{http://www.jalview.org/examples/exampleFile.jar} + {http://www.jalview.org/examples/exampleFile.jar}. +Remember to use [CTRL]+Z to undo an edit, or the {\sl File $\Rightarrow$ Reload } function to revert the alignment back to the original version if you - want to start again.} - \item{ If you are using OSX, and a key combination - such as [CTRL]+A - does + want to start again. +If you are using OSX, and a key combination - such as [CTRL]+A - does not work, then try pressing the [CMD] key instead of [CTRL]. - } \exstep{ Load the URL \textsf{http://www.jalview.org/tutorial/unaligned.fa} which contains part of the -ferredoxin alignment from PF03460. -} +ferredoxin alignment from PF03460.} \exstep{ Select the first 7 sequences, and press H to hide them (or right click on the sequence IDs to open the sequence ID pop-up menu, and select {\sl Hide -Sequences}). } +Sequences}).} \exstep{ Select FER3\_RAPSA and FER\_BRANA. Slide the sequences to the right so the initial {\bf A} lies at column 57 using the $\Rightarrow$ key.} \exstep{ Select FER1\_SPIOL, FER1\_ARATH, FER2\_ARATH, Q93Z60\_ARATH and O80429\_MAIZE - (Hint: you can do this by pressing [CTRL]-I to invert the sequence selection and then deselect FER1\_MAIZE), and use the $\Rightarrow$ key to slide them to so they begin at column 5 of the alignment view.} \exstep{ Select all the visible sequences (those not hidden) in the block by pressing [CTRL]-A. - Insert a single gap in all selected sequences at column 38 of the alignment by holding [CTRL] and clicking on the R at column 38 in the FER1\_SPIOL, then drag one @@ -1230,7 +1204,8 @@ columns 47 to 57 of the FER1\_SPIOL row. Move the mouse onto the G at column 50, hold [SHIFT] and drag the G in column 47 of FER1\_SPIOL to the left by one column to insert a gap at column 57.} -\exstep{ In the next two steps you will complete the alignment of the last two sequences. +\exstep{ In the next two steps you will complete the alignment of the last two +sequences. Select the last two sequences (FER1\_MAIZE and O80429\_MAIZE), then press [SHIFT] and click and drag the initial methionine of O80429\_MAIZE 5 columns to the right @@ -1251,11 +1226,9 @@ remove the gap in O80429\_MAIZE at column 56 using [SHIFT]-drag to the left on {\sl Edit $\Rightarrow$ Undo Edit} and {\sl Edit $\Rightarrow$ Redo Edit} menu option, or their keyboard shortcuts ([CTRL]+Z and [CTRL]+Y) to step backwards and replay the edits you have made.} - } -\subsubsection{Editing in Cursor mode} - +\subsection{Editing in Cursor mode} Gaps can be easily inserted when in cursor mode (toggled with [F2]) by pressing [SPACE]. Gaps will be inserted at the cursor, shifting the residue under the cursor to the right. To insert {\sl n} gaps type {\sl n} and then @@ -1271,27 +1244,37 @@ together). Note that the deletion will only occur if the gaps are in the same columns in all sequences in the selected group, and those columns are to the right of the selected residue. -\exercise{Keyboard Edits}{ \item{This continues on from exercise +\section{Undoing Edits} +Jalview supports the undoing of edits {\sl via} the {\sl Edit $\Rightarrow$ Undo Edit} +alignment window menu option, or CTRL-Z. An edit, if undone, may be re-applied +with {\sl Edit $\Rightarrow$ Redo Edit}, or CTRL-Y. Note, however, that the +{\sl Undo} function only works for edits to the alignment or sequence ordering. +Colouring of the alignment, showing and hiding of sequences or modification of +annotation cannot be undone. + +\exercise{Keyboard Edits} +{This continues on from exercise \ref{mousealedit}, and recreates the final part of the example ferredoxin alignment from the unaligned sequences using Jalview's keyboard editing mode. -{{\bf Note:}} For Mac users, [CTRL]-[SPACE] command +{\bf Note:} For Mac users, [CTRL]-[SPACE] command has the same effect as the [SHIFT]-[SPACE] command mentioned in this exercise. - Window users should use [SHIFT]-[SPACE] rather than the [CTRL]-[SPACE] command, -as this command will close the window.} +as this command will close the window. \exstep{Load the sequence alignment at \textsf{http://www.jalview.org/tutorial/unaligned.fa}, or continue using the edited alignment from exercise \ref{mousealedit}. If you continue from the -previous exercise, then first right click on the sequence ID panel and select -{\sl Reveal All}. - -Now, enter cursor mode by pressing [F2]} +previous exercise, first right click on the sequence ID panel and select +{\sl Reveal All}. Enter cursor mode by pressing [F2].} % TODO: BACKSPACE or DELETE WHEN SEQS ARE SELECTED WILL DELETE ALL SEQS JAL-783 -\exstep{Insert 58 gaps at the start of the first sequence (FER\_CAPAA). Press {\sl 58} then {\sl [SPACE]}. } + +\exstep{Insert 58 gaps at the start of the sequence 1 (FER\_CAPAA). Press +{\sl 58} then {\sl [SPACE]}. } + \exstep{Go down one sequence and select rows 2-5 as a block. Click on the second sequence ID (FER\_CAPAN). Hold down shift and click on the fifth (FER1\_PEA). } + \exstep{Insert 6 gaps at the start of this group. Go to column 1 row 2 by typing {\sl 1,2} then press {\sl [RETURN]}. Now insert 6 gaps in all the sequences. Type {\sl 6} then hold down {\sl [SHIFT]} and press {\sl [SPACE]}.} @@ -1301,9 +1284,15 @@ Press {\sl 34C} then {\sl [SHIFT]-[SPACE]}. Press {\sl 38C} then Press {\sl 47C} then {\sl 3 [SHIFT-SPACE]} the first through fourth sequences are now aligned.} \exstep{The fifth sequence (FER1\_PEA) is poorly aligned. We will delete some gaps and add some new ones. Press {\sl [ESC]} to clear the selection. Navigate to the start of sequence 5 and delete 3 gaps. Press {\sl 1,5 [RETURN]} then {\sl 3 [BACKSPACE]} to delete three gaps. Go to column 31 and delete the gap. Press {\sl 31C [BACKSPACE]} .} -\exstep{ Similarly delete the gap now at column 34, then insert two gaps at column 38. Press {\sl 34C [BACKSPACE] 38C 2 [SPACE]}. Delete three gaps at column 44 and insert one at column 47 by pressing {\sl 44C 3 [BACKSPACE] 47C [SPACE]}. The top five sequences are now aligned.} +\exstep{ Similarly delete the gap now at column 34, then insert two gaps at +column 38. +Press {\sl 34C [BACKSPACE] 38C 2 [SPACE]}. Delete three gaps at column 44 and +insert one at column 47 by pressing {\sl 44C 3 [BACKSPACE] 47C [SPACE]}. The top five sequences are +now aligned.} } +\chapter{Colouring Sequences and Figure Generation} +\label{colouringfigures} \section{Colouring Sequences} \label{colours} @@ -1567,7 +1556,7 @@ The new colour scheme appears in the list of colour schemes in the {\sl Colour} } } -\section{Alignment Formatting and Graphics Output} +\section{Formatting and Graphics Output} \label{layoutandoutput} Jalview is a WYSIWIG alignment editor. This means that for most kinds of graphics output, the layout that is seen on screen will be the same as what is outputted in an @@ -1706,669 +1695,890 @@ Photoshop, Illustrator, Inkscape, Ghostview, Powerpoint (Windows), or Preview (Mac OS X). Zoom in and note that the image has near-infinite resolution.} } -\chapter{Analysis and Annotation} -\label{analysisannotation} +\chapter{Features and Annotation} +\label{annotation} +\section{Features and Annotation} +\label{featannot} +Features and annotations are additional information that is overlaid on the sequences and the alignment. Generally speaking, annotations are associated with columns in the alignment. Features are associated with specific residues in the sequence. -This chapter describes the annotation, analysis, and visualization tasks that -the Jalview Desktop can perform. +Annotations are shown 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, so as the alignment changes, they change along with it. Conversely, sequence features are properties of the individual sequences, so they do not change with the alignment, but are shown mapped on to specific residues within the alignment. -Section \ref{wkwithstructure} introduces the structure visualization -capabilities of Jalview. In Section \ref{alignanalysis}, you will find -descriptions and exercises on building and displaying trees, PCA analysis, -alignment redundancy removal, pairwise alignments and alignment conservation -analysis. Section \ref{jvwebservices} introduces the various web based services -available to Jalview users, and Section \ref{jabaservices} explains how to -configure the Jalview Desktop for access to new JABAWS servers. -Section \ref{msaservices} describes how to use the range of multiple alignment -programs provided by JABAWS, and Section \ref{aacons} introduces JABAWS AACon -service for protein multiple alignment conservation analysis. -Section \ref{protsspredservices} explains how to perform protein secondary -structure predictions with JPred, and JABAWS protein disorder prediction -services are introduced in Section \ref{protdisorderpred}. +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 JNet (see \ref{jpred} above) can be used to analyse a +given sequence or alignment and generate annotation for it. -Section \ref{featannot} describes the mechanisms provided by Jalview for -interactive creation of sequence and alignment annotation, and how they can be -displayed, imported and exported and used to reorder the alignment. Section -\ref{featuresfromdb} discusses the retrieval of database references and -establishment of sequence coordinate systems for the retrieval and display of -features from databases and DAS annotation services. Section -\ref{workingwithnuc} describes functions and visualization techniques relevant -to working with nucleotide sequences, coding region annotation and nucleotide -sequence alignments. -% and Section \ref{workingwithrna} covers the visualization, -% editing and analysis of RNA secondary structure. +\section{Importing Features from Databases} +\label{featuresfromdb} +Jalview supports feature retrieval from public databases either directly or {\sl +via} the Distributed Annotation System (DAS\footnote{http://www.biodas.org/}). +It includes built in parsers for Uniprot and ENA (or EMBL) records retrieved +from the EBI. Sequences retrieved from these sources using the sequence fetcher (see +Section \ref{fetchseq}) will already possess features. -\section{Working with Structures} -\label{wkwithstructure} -Jalview facilitates the use of protein structures for the analysis of alignments -by providing a linked view of structures associated with sequences in -the alignment. The Java based molecular viewing program Jmol\footnote{See the -Jmol homepage \url{http://www.jmol.org} for more information.} has been -incorporated\footnote{Earlier versions of Jalview included MCView - a simple -main chain structure viewer. Structures are visualized as an alpha carbon trace -and can be viewed, rotated and coloured in a structure viewer and the results -interpreted on a sequence alignment.} which enables sophisticated molecular -visualizations to be prepared and investigated alongside an analysis of -associated sequences. -PDB format files can be imported directly or structures can be retrieved from -the European Protein Databank (PDBe) using the Sequence Fetcher (see -\ref{fetchseq}). +\subsection{Sequence Database Reference Retrieval} +\label{fetchdbrefs} +Jalview maintains a list of external database references for each sequence in +an alignment. These are listed in a tooltip when the mouse is moved over the +sequence ID when the {\sl View $\Rightarrow$ Sequence ID Tooltip $\Rightarrow$ +Show Database Refs } option is enabled. Sequences retrieved using the sequence +fetcher will always have at least one database reference, but alignments +imported from an alignment file generally have no database references. -\subsection{Automatic Association of PDB Structures with Sequences} -Jalview can automatically determine which structures are associated with a -sequence in a number of ways. -\subsubsection{Discovery of PDB IDs from Sequence Database Cross-references} -If a 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 Structure $\Rightarrow$ -Associate Structure with Sequence $\Rightarrow$ Discover PDB IDs } from the context menu (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 $\Rightarrow$ 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. +\subsubsection{Database References and Sequence Coordinate Systems} -\begin{figure}[htbp] -\begin{center} -%TODO fix formatting -\parbox{1.5in}{ -{\centering -\begin{center} -\includegraphics[width=1.5in]{images/auto1.pdf} -\end{center}} -} \parbox{3.25in}{ -{\centering -\begin{center} -\includegraphics[scale=0.5]{images/auto2.pdf} -\end{center} -} -} \parbox{1.5in}{ -{\centering -\begin{center} -\includegraphics[width=1.5in]{images/auto3.pdf} -\end{center} -} -} +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. -\caption{{\bf Automatic PDB ID discovery.} The tooltip (left) indicates that no PDB structure has been associated with the sequence. -After PDB ID discovery (center) the tool tip now indicates the Uniprot ID and -any associated PDB structures (right).} -\label{auto} -\end{center} -\end{figure} +\subsubsection{Viewing and Exporting a Sequence's Database Annotation} -\subsubsection{Drag-and-Drop Association of PDB Files with Sequences by Filename -Match} -\label{multipdbfileassoc} -If one or more PDB files stored on your computer are dragged from their location -on the file browser onto an alignment window, Jalview will search the alignment -for sequences with IDs that match any of the files dropped onto the alignment. -If it discovers matches, a dialog like the one in Figure -\ref{multipdbfileassocfig} is shown, giving the option of creating associations -for the matches. +You can export all the database cross references and annotation terms shown in +the sequence ID tooltip for a sequence by right-clicking and selecting the {\sl +[Sequence ID] $\Rightarrow$ Sequence details \ldots} option from the popup menu. +A similar option is provided in the {\sl Selection} sub-menu allowing you to +obtain annotation for the sequences currently selected. -If no associations are made, then sequences extracted -from the structure will be simply added to the alignment. However, if only -some of the PDB files are associated, Jalview will raise another dialog box -giving you the option to add any remaining sequences from the PDB structure files not present in -the alignment. This allows you to easily decorate sequences in a newly imported -alignment with any corresponding structures you've already collected in a directory -accessible from your computer.\footnote{We plan to extend this facility in -future so Jalview will automatically search for PDB files matching your -sequence within a local directory. Check out -\href{http://issues.jalview.org/browse/JAL-801}{Jalview issue 801}} +\parbox[l]{3.4in}{ +The {\sl Sequence Details +\ldots} option will open a window containing the same text as would be shown in +the tooltip window, including any web links associated with the sequence. The +text is HTML, and options on the window allow the raw code to be copied and +pasted into a web page.} +\parbox[c]{3in}{ +\centerline{\includegraphics[width=2.2in]{images/seqdetailsreport.pdf}}} -% there is no mention of the other footnote (#3) that appears saying: Tip: The sequence ID tooltip can often become large for heavily cross-referenced sequence IDs. Use the ... -% JBP: yes there is - under 'Discovery of ' subsection. -\begin{figure}[htbp] -\begin{center} -\includegraphics[]{images/pdbdragdropassoc.pdf} +\subsubsection{Automatically Discovering a Sequence's Database References} +Jalview includes a function to automatically verify and update each sequence's +start and end numbering against any of the sequence databases that the {\sl +Sequence Fetcher} has access to. This function is accessed from the {\sl +Webservice $\Rightarrow$ Fetch DB References} sub-menu in the Alignment +window. This menu allows you to query either the set of {\sl Standard +Databases}, which includes EMBL, Uniprot, the PDB, 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. -\caption{{\bf Associating PDB files with sequences by drag-and-drop.} Dragging -PDB files onto an alignment of sequences with names matching the dragged files -names (A), results in a dialog box (B) that gives the option to associate each -file with any sequences with matching IDs. } -\label{multipdbfileassocfig} -\end{center} -\end{figure} +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{Verify that there are no database references for the sequences by first +checking that the {\sl View $\Rightarrow$ Sequence ID Tooltip $\Rightarrow$ Show +Database Refs} option is selected, and then mousing over each sequence's ID.} +\exstep{Use the {\sl Webservice $\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.} +\exstep{Now close all the windows and open the project again, and verify that the database references and sequence features are still present on the alignment} -\subsection{Viewing Structures} -\label{viewAllStructures} -The structure viewer can be launched in two ways from the sequence ID context -menu. To view a particular structure associated with a sequence in the -alignment, simply select it from popup menu's associated structures submenu in -{\sl Structure $\Rightarrow$ View Structure $\Rightarrow$ $<$PDB ID$>$}. The -second way is most useful if you want to view all structural data available for -a set of sequences in an alignment. If any of the {\bf currently selected} -sequences have structures associated, the {\sl Structure } submenu of the -sequence ID popup menu will include an option to {\sl View {\bf N} -structures}. Selecting this option will open a new structure view containing -the associated structures superposed according to the alignment. +\exstep{View the {\sl Sequence details \ldots} report for the FER1\_SPIOL sequence and for the whole alignment. Which sequences have web links associated with them ?} -In both cases, each structure to be displayed will be downloaded or loaded from -the local file system, and shown as a ribbon diagram coloured according to the -associated sequence in the current alignment view (Figure \ref{structure} -(right)). The structure can be rotated by clicking and dragging in the structure -window. The structure can be zoomed using the mouse scroll wheel or by -[SHIFT]-dragging the structure. -Moving the mouse cursor over a sequence to which the structure is linked in the -alignment view highlights the respective residue's sidechain atoms. The -sidechain highlight may be obscured by other parts of the molecule. Similarly, -moving the cursor over the structure shows a tooltip and highlights the -corresponding residue in the alignment. Clicking the alpha carbon or phosphorous -backbone atom will toggle the highlight and residue label on and off. Often, the -position highlighted in the sequence may not be in the visible portion of the -current alignment view and the sliders will scroll automatically to show the -position. If the alignment window's {\sl View $\Rightarrow$ Automatic Scrolling -} option is not selected, however, then the automatic adjustment will be -disabled for the current view. +} + +\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 Sequence 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} -\parbox{3in}{ -{\centering -\begin{center} -\includegraphics[scale=0.5]{images/structure1.pdf} -\end{center} -} -} -\parbox{3.2in}{ -{\centering -\begin{center} -\includegraphics[width=3in]{images/structure2.pdf} -\end{center} -} -} -\caption{{\bf Structure visualization} The structure viewer is launched from the sequence ID context menu (left) and allows the structure to be visualized using the embedded Jmol molecular viewer (right). } -\label{structure} +\includegraphics[width=2.5in]{images/das1.pdf} +\includegraphics[width=2.5in]{images/das2.pdf} +\caption{{\bf Retrieving DAS annotations.} DAS features are retrieved using the {\sl DAS Settings} tab (left) and their display customised using the {\sl Feature Settings} tab (right).} +\label{das} \end{center} \end{figure} -\subsection{Customising Structure Display} +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. -Structure display can be modified using the {\sl Colour} and {\sl View} menus -in the structure viewer. The background colour can be modified by selecting the -{\sl Colours $\Rightarrow$ Background Colour\ldots} option. +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 labelled box at the top of the panel. -By default, the structure will be coloured in the same way as the associated -sequence(s) in the alignment view from which it was launched. The structure can -be coloured independently of the sequence by selecting an appropriate colour -scheme from the {\sl Colours} menu. It can be coloured according to the -alignment using the {\sl Colours $\Rightarrow$ By Sequence } option. The image -in the structure viewer can be saved as an EPS or PNG with the {\sl File -$\Rightarrow$ Save As $\Rightarrow$ \ldots} submenu, which also allows the raw -data to be saved as PDB format. The mapping between the structure and the -sequence (How well and which parts of the structure relate to the sequence) can -be viewed with the {\sl File $\Rightarrow$ View Mapping} menu option. +\exercise{Retrieving Features with DAS}{ +\label{dasfeatretrexcercise} +\exstep{Load the alignment at +\textsf{http://www.jalview.org/tutorial/alignment.fa}. Select {\sl View +$\Rightarrow$ Feature Settings \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 netnglyc. Click. +A window may prompt whether you wish Jalview to fetch DAS features. 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 Sequence Feature Settings window. } +\exstep{Move the mouse over the sequence ID panel. +Non-positional features such as literature references and protein localisation predictions are given in the tooltip, below any database cross references associated with the sequence.} +\exstep{Search through the alignment to find a feature with a link symbol next to it. +Right click to bring up the alignment view popup menu, and find a corresponding entry in the {\sl Link } sub menu. } +% TODO this doesn't work ! \includegraphics[width=.3in]{images/link.pdf} -\subsubsection{Using the Jmol Visualization Interface } +\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 are drawn on top of those below, obscuring them in the alignment view where they overlap. 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. +} -Jmol has a comprehensive set of selection and visualization functions that are -accessed from the Jmol popup menu (by right-clicking in the Jmol window or by -clicking the Jmol logo). Molecule colour and rendering style can be manipulated, -and distance measurements and molecular surfaces can be added to the view. It -also has its own ``Rasmol\footnote{See \url{http://www.rasmol.org}}-like'' scripting -language, which is described elsewhere\footnote{Jmol Wiki: -\url{http://wiki.jmol.org/index.php/Scripting} +\exstep{Press the {\sl Optimise Order} button. The features will be ordered according to increasing length, placing features that annotate shorter regions of sequence higher on the display stack.} -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. +\exstep{Select {\sl File $\Rightarrow$ Export Features\ldots} from the Alignment window. You can choose to export the retrieved features as a GFF file, or Jalview's own Features format. +% TODO: describe working with features files and GFF +} +} -If you would prefer to use Jmol to manage structure colours, then select the -{\sl Colours $\Rightarrow$ Colour with Jmol} option. This will disable any -automatic application of colour schemes when new structure data is added, or -when associated alignment views are modified. +\subsubsection{The Fetch Uniprot IDs Dialog Box} +\label{discoveruniprotids} +If any sources are selected which refer to Uniprot coordinates as their reference system, +then you may be asked if you wish to retrieve Uniprot IDs for your sequence. Pressing OK instructs Jalview to verify the sequences against Uniprot records retrieved using the sequence's ID string. This operates in much the same way as the {\sl Web Service $\Rightarrow$ Fetch Database References } function described in Section \ref{fetchdbrefs}. If a sequence is verified, then the start/end numbering will be adjusted to match the Uniprot record to ensure that features retrieved from the DAS source are rendered at the correct position. +\subsubsection{Rate of Feature Retrieval} +Feature retrieval can take some time if a large number of sources is selected and if the alignment +contains a large number of sequences. This is because Jalview only queries a particular DAS source with one sequence at a time, to avoid overloading it. As features are retrieved, they are immediately added to the current alignment view. The retrieved features are shown on the sequence and can be customised as described previously. -\exercise{Viewing Structures}{\label{viewingstructex} -\exstep{Load the alignment at -\textsf{http://www.jalview.org/examples/exampleFile.jar}. Right-click on the -sequence ID label of {\sl FER1\_SPIOL}, this brings up -the context menu. Select {\sl FER1\_SPIOL $\Rightarrow$ Structure $\Rightarrow$ -Associate Structure with Sequence $\Rightarrow$ Discover -PDB IDs}. Jalview will now attempt to find PDB structures for the sequences in -the alignment. -% JBP Note: Bug JAL-1238 needs to be fixed ASAP -{\bf Note:} If you are using Jalview v2.8 - use the {\sl Uniprot } source from the {\sl Web services $\Rightarrow$ Fetch DB References $\Rightarrow$ ..} submenu of the Alignment Window to retrieve the PDB IDs. } -\exstep{ Right-click on the sequence ID for {\sl FER1\_SPIOL}. -Select { \sl FER1\_SPIOL $\Rightarrow$ Structure $\Rightarrow$ View Structure -$\Rightarrow$ 1A70}. A structure viewing window appears. Rotate the molecule by clicking and dragging in the structure viewing box. Zoom with the mouse scroll wheel. } \exstep{Roll the mouse cursor along the {\sl FER1\_SPIOL} sequence in the alignment. Note that if a residue in the sequence maps to one in the structure, a label will appear next to that residue in the structure viewer. Move the mouse over the structure. Placing the mouse over a part of the structure will bring up a tool tip indicating the name and number of that residue. The corresponding residue in the sequence is highlighted in black. Clicking the alpha carbon toggles the highlight and residue label on and off. Try this by clicking on a set of three or four adjacent residues so that the labels are persistent, then finding where they are in the sequence. } -\exstep{Select {\sl Colours $\Rightarrow$ Background Colour\ldots} from the structure viewer menu and choose a suitable colour. Press OK to apply this. Select {\sl File $\Rightarrow$ Save As $\Rightarrow$ PNG} and save the image. View this with a suitable program. } -\exstep{Select {\sl File $\Rightarrow$ View Mapping} from the structure viewer menu. A new window opens showing the residue by residue alignment between the sequence and the structure.} -\exstep{Select {\sl File $\Rightarrow$ Save $\Rightarrow$ PDB file} and choose a new filename to save the PDB file. Once the file is saved, open the location in your file browser (or explorer window) and drag the PDB file that you just saved on to the Jalview desktop (or load it from the {\sl Jalview Desktop $\Rightarrow$ Input Alignment $\Rightarrow$ From File } menu). Verify that you can open and view the associated structure from the sequence ID pop-up menu's {\sl Structure } submenu in the new alignment window.} +\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 {\sl Feature Type}'s popup menu, which is opened by +right-clicking the {\sl Feature Type} or {\sl Color} in the {\sl Sequence Feature Settings} dialog box. Two types +of colouring styles are currently supported: the default is quantitative +colouring, which shades each feature based on its score, with the highest +scores receiving the `Max' colour, and the lowest scoring features coloured +with the `Min' colour. Alternately, you can select the `Colour by label' +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. -\exstep{Right click on the structure in the submenu and bring up the Jmol -window. -Explore the menu options. Try to change the style of molecular display - by first using the {\sl Jmol $\Rightarrow$ Select (n) $\Rightarrow$ All} command (where {\sl n} is the number of residues selected), and then the {\sl Jmol $\Rightarrow$ Style $\Rightarrow$ Scheme $\Rightarrow$ Ball and Stick} command.} \exstep{Use the {\sl File $\Rightarrow$ Save As .. } function to save the alignment as a Jalview Project. Now close the alignment and the structure view, and load the project file you just saved. +Graduated feature colourschemes 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. -Verify that the Jmol display is as it was when you just saved the file.} -} +The feature settings dialog box allows you to toggle between a graduated and +simple feature colourscheme using the pop-up menu for the feature type. When a +graduated scheme is applied, it will be indicated in the colour column for +that feature type - with coloured blocks or text to indicate the colouring +style and a greater than ($>$) or less than ($<$) symbol to indicate when a +threshold has been defined. -\subsection{Superimposing Structures} -\label{superposestructs} -Many comparative biomolecular analysis investigations aim to determine if the -biochemical properties of a given molecule are significantly different to its -homologues. When structure data is available, comparing the shapes of molecules -by superimposing them enables substructure that may impart different behaviour -to be quickly identified. The identification of optimal 3D superpositions -involves aligning 3D data rather than sequence symbols, but the result can -still be represented as a sequence alignment, where columns indicate positions -in each molecule that should be superposed to recreate the optimal 3D alignment. - -Jalview can employ Jmol's 3D fitting routines\footnote{See -\href{http://chemapps.stolaf.edu/jmol/docs/?ver=12.2$\#$compare}{http://chemapps.stolaf.edu/jmol/docs/?ver=12.2$\#$compare} -for more information.} to recreate 3D structure superpositions based on the -correspondences defined by one or more sequence alignments involving structures shown in the Jmol display. Superposition based on the currently displayed alignment view happens automatically if a -structure is added to an existing Jmol display using the {\sl Structure -$\Rightarrow$ View PDB Structure $\Rightarrow$ ..}. A new Jmol view containing -superposed structures can also be created using the {\sl Structure -$\Rightarrow$ View all {\bf N} PDB Structures} option (when {\bf {\sl N}} -$>$ 1) if the current selection contains two or more sequences with associated -structures. - -\subsubsection{Obtaining the RMSD for a Superposition} -The RMSD (Root Mean Square Deviation) is a measure of how similar the structures -are when they are superimposed. Figure \ref{mstrucsuperposition} shows a -superposition created during the course of Exercise \ref{superpositionex}. The -parts of each molecule used to construct the superposition are rendered using -the cartoon style, with other parts of the molecule drawn in wireframe. The Jmol -console, which has been opened after the superposition was performed, shows the -RMSD report for the superposition. -Full information about the superposition is also outputed to the Jalview -console.\footnote{The Jalview Java Console is opened from {\sl Tools -$\Rightarrow$ Java Console} option in the Desktop's menu bar} This output also -includes the precise atom pairs used to superpose structures. +\subsection{Using Features to Re-order the Alignment} +\label{featureordering} +The presence of sequence features on certain sequences or in a particular +region of an alignment can quantitatively identify important trends in +the aligned sequences. In this case, it is more useful to +re-order the alignment based on the number of features or their associated scores, rather than simply re-colour the aligned sequences. The sequence feature settings +dialog box provides two buttons: `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 {\sl Feature Type}'s +popup menu. Simply right-click the type's style in the Sequence Feature Settings dialog +box, and select one of the {\sl Sort by Score} and {\sl Sort by Density} +options to re-order the alignment. Finally, if a specific region is selected, +then only features found in that region of the alignment will be used to +create the new alignment ordering. +% \exercise{Shading and Sorting Alignments using Sequence Features}{ +% \label{shadingorderingfeatsex} +% +% This exercise is currently not included in the tutorial because no DAS servers +% currently exist that yield per-residue features for any Uniprot sequence. +% +% \exstep{Re-load the alignment from \ref{dasfeatretrexcercise}. +% } +% \exstep{Open the +% feature settings panel, and, after first clearing the current +% selection, press the {\em Seq Sort by Density} button a few times.} +% \exstep{Use the DAS fetcher to retrieve the Kyte and Doolittle Hydrophobicity +% scores for the protein sequences in the alignment. +% {\sl Hint: the nickname for the das source is `KD$\_$hydrophobicity'.}} +% \exstep{Change the feature settings so only the hydrophobicity features are +% displayed. Mouse over the annotation and also export and examine the GFF and +% Jalview features file to better understand how the hydrophobicity measurements +% are recorded.} +% \exstep{Apply a {\sl Graduated Colour} to the hydrophobicity annotation to +% reveal the variation in average hydrophobicity across the alignment.} +% \exstep{Select a range of alignment columns, and use one of the sort by feature buttons to order the alignment according to that region's average +% hydrophobicity.} +% \exstep{Save the alignment as a project, for use in exercise +% \ref{threshgradfeaturesex}.} } +% +% \exercise{Shading alignments with combinations of graduated feature +% colourschemes}{ +% \label{threshgradfeaturesex} +% \exstep{Reusing the annotated alignment from exercise +% \ref{shadingorderingfeatsex}, experiment with the colourscheme threshold to +% highlight the most, or least hydrophobic regions. Note how the {\sl Colour} icon for the {\sl Feature Type} changes when you change the threshold type and press OK.} +% \exstep{Change the colourscheme so +% that features at the threshold are always coloured grey, and the most +% hydrophobic residues are coloured red, regardless of the threshold value +% ({\em hint - there is a switch on the dialog to do this for you}).} +% \exstep{Enable the Uniprot {\em chain} annotation in the feature settings +% display and re-order the features so it is visible under the hydrophobicity +% annotation.} +% \exstep{Apply a {\sl Graduated Colour} to the {\em chain} +% annotation so that it distinguishes the different canonical names associated +% with the mature polypeptide chains.} +% \exstep{Export the alignment's sequence features using the Jalview and GFF file formats, to see how the different types of graduated feature +% colour styles are encoded. } +% } -\subsubsection{Choosing which part of the Alignment is used for Structural -Superposition} Jalview uses the visible part of each alignment view to define -which parts of each molecule are to be superimposed. Hiding a column in a view -used for superposition will remove that correspondence from the set, and will -exclude it from the superposition and RMSD calculation. -This allows the selection of specific parts of the alignment to be used for -superposition. Only columns that define a complete set of correspondences for -all structures will be used for structural superposition, and as a consequence, -the RMSD values generated for each pair of structures superimposed can be -directly compared. +\subsection{Creating Sequence Features} +Sequence features can be created simply by selecting the area in a sequence (or sequences) to form the feature and selecting {\sl Selection $\Rightarrow$ Create Sequence Feature } from the right-click context menu (Figure \ref{features}). A dialogue box allows the user to customise the feature with respect to name, group, and colour. The feature is then associated with the sequence. Moving the mouse over a residue associated with a feature brings up a tool tip listing all features associated with the residue. -In order to recompute a superposition after changing a view or editing the -alignment, select the {\sl Jmol $\Rightarrow$ Align sequences } menu option. The {\sl -Jmol $\Rightarrow$ Superpose with ..} submenu allows you to choose which of the -associated alignments and views are to be used to create the set of -correspondences. This menu is useful when composing complex superpositions -involving multi-domain and multi-chain complexes, when correspondences may be -defined by more than one alignment. +\begin{figure}[htbp] +\begin{center} +\includegraphics[width=2in]{images/feature1.pdf} +\includegraphics[width=2.5in]{images/feature2.pdf} +\includegraphics[width=1.5in]{images/feature3.pdf} +\caption{{\bf Creating sequence features.} Features can readily be created from selections via the context menu and are then displayed on the sequence. } +\label{features} +\end{center} +\end{figure} -Note that these menu options appear when you have two or more structures in one Jmol viewer. +Creation of features from a selection spanning multiple sequences results in the creation of one feature per sequence. +Each feature remains associated with its own sequence. +\subsection{Customising Feature Display} +Feature display can be toggled on or off by selecting the {\sl View +$\Rightarrow$ Show Sequence Features} menu option. When multiple features are +present it is usually necessary to customise the display. Jalview allows the +display, colour, rendering order and transparency of features to be modified +{\sl via} the {\sl View $\Rightarrow$ Feature Settings\ldots} menu option. This +brings up a 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} -\includegraphics[width=5.5in]{images/fdxsuperposition.pdf} -\caption{{\bf Superposition of two ferredoxin structures.} The alignment on the -left was used by Jalview to superpose structures associated with the -FER1\_SPIOL and FER1\_MAIZE sequences in the alignment. Parts of each structure -used for superposition are rendered as a cartoon, the remainder rendered in -wireframe. The RMSD between corresponding positions in the structures before and -after the superposition is shown in the Jmol console.} -\label{mstrucsuperposition} +\includegraphics[width=4in]{images/features4.pdf} +\caption{{\bf Multiple sequence features.} An alignment with JPred secondary structure prediction annotation below it, and many sequence features overlaid onto the aligned sequences. The tooltip lists the features annotating the residue below the mouse-pointer.} \end{center} \end{figure} -\exercise{Aligning Structures using the Ferredoxin -Sequence Alignment}{\label{superpositionex} +\begin{figure}[htbp] +\begin{center} +\includegraphics[width=4in]{images/features5.pdf} +\caption{{\bf Customising sequence features.} Features can be recoloured, switched on or off and have the rendering order changed. } +\label{custfeat} +\end{center} +\end{figure} -\exstep{Continue with the Jalview project created in exercise -\ref{viewingstructex}. Use the {\sl Discover PDB IDs} function to retrieve PDB -IDs associated with the FER1\_MAIZE sequence.} -\exstep{Once discovery has completed, use the {\sl -View PDB Structure} submenu to view one of the PDB file associated with -FER1\_MAIZE (eg. 3B2F) -Jalview will give you the option of aligning the structure to the one already -open. To superimpose the structure associated with FER1\_MAIZE with the one -associated with FER1\_SPIOL, press the {\bf Yes} button. +\subsection{Sequence Feature File Formats} -{\sl The Jmol view will update to show both structures, and one will be -moved on to the other. If this doesn't happen, use the Align function in the Jmol submenu}} -\exstep{Create a new view on the alignment, and hide all but columns 121 -through to 132.} -\exstep{Use the {\sl Jmol} submenu to -recompute the superposition using just columns 121-132 of the alignment -(The easiest way to achieve this is to select column 121-132 and in the View -menu selected ``All but selected region'' from the Hide options). +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. -{\sl Note how the molecules shift position when superposed using a short part of -the two structures.}} -\exstep{Compare the initial and final RMSDs for superimposing molecules with -the small section and with the whole alignment. (The RMSD report can be -viewed by right clicking the mouse on Jmol window, and select ``Show" and ``Measurements") Which view do you think give the best 3D -superposition, and why ?} } +\exercise{Creating Features}{ +\exstep{Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. +We know that the Cysteine residues at columns 97, 102, 105 and 135 are involved in +iron binding so we will create them as features. Navigate to column 97, sequence 1. +Select the entire column by clicking in the ruler bar. Then right-click on the selection +to bring up the context menu and select {\sl Selection $\Rightarrow$ Create Sequence Feature}. +A dialogue box will appear. +} +\exstep{ +Enter a suitable Sequence Feature Name (e.g. ``Iron binding site") in the +appropriate box. Click on the Feature Colour bar to change the colour if +desired, add a short description (``One of four Iron binding Cysteines") and press OK. The features will then appear on the sequences. } \exstep{Roll the mouse cursor over the new features. Note that the position given in the tool tip is the residue number, not the column number. To demonstrate that there is one feature per sequence, clear all selections by pressing [ESC] then insert a gap in sequence 3 at column 95. Roll the mouse over the features and you will see that the feature has moved with the sequence. Delete the gap you created. +} +\exstep{ +Add a similar feature to column 102. When the feature dialogue box appears, clicking the Sequence Feature Name box brings up a list of previously described features. Using the same Sequence Feature Name allows the features to be grouped.} +\exstep{Select {\sl View $\Rightarrow$ Feature Settings\ldots} from the +alignment window menu. The Sequence Feature Settings window will appear. Move +this so that you can see the features you have just created. Click the check +box for ``Iron binding site" under {\sl Display} and note that display of this +feature type is now turned off. Click it again and note that the features are +now displayed. Close the sequence feature settings box by clicking OK or +Cancel.} } -\subsection{Colouring Structure Data Associated with Multiple Alignments and -Views} Normally, the original view from which a particular structure view was -opened will be the one used to colour structure data. If alignments involving -sequences associated with structure data shown in a Jmol have multiple views, Jalview gives you full control -over which alignment, or alignment view, is used to colour the structure -display. Sequence-structure colouring associations are -changed {\sl via} the {\sl View $\Rightarrow$ Colour by ..} menu, which lists all -views associated with data shown in the embedded Jmol view. A tick is shown beside -views currently used as colouring source, and moving the -mouse over each view will bring it to the front of the alignment display, -allowing you to browse available colour sources prior to selecting one. If the -{\sl Select many views} option is selected, then multiple views can be selected as sources for colouring the -structure data. {\sl Invert selection} and {\sl Select all views} options are also provided to quickly change between multi-view selections. +\subsection{Creating User Defined Annotation} -Note that the {\sl Select many views} option is useful if you have different -views that colour different areas or domains of the alignment. This option is -further explored in Section \ref{complexstructurecolours}. +Annotations are properties that apply to the alignment as a whole and are visualized on rows in the annotation panel. +To create a new annotation row, right click on the annotation label panel and select the {\sl Add New Row} menu option (Figure \ref{newannotrow}). A dialogue box appears. Enter the label to use for this row and a new row will appear. \begin{figure}[htbp] \begin{center} -\includegraphics[width=5.5in]{images/mviewstructurecol.pdf} -\caption{{\bf Choosing a different view for colouring a structure display} -Browsing the {\sl View $\Rightarrow$ Colour by ..} menu provides full control -of which alignment view is used to colour structures when the {\sl Colours -$\Rightarrow$ By Sequence} option is selected.} -\label{mviewstructurecol} +\includegraphics[width=1.3in]{images/annots1.pdf} +\includegraphics[width=2in]{images/annots2.pdf} +\caption{{\bf Creating a new annotation row.} Annotation rows can be reordered by dragging them to the desired place.} +\label{newannotrow} \end{center} \end{figure} -\subsubsection{Colouring Complexes} -\label{complexstructurecolours} -The ability to control which multiple alignment view is used to colour -structural data is essential when working with data relating to -multidomain biomolecules and complexes. - -In these situations, each chain identified in the structure may have a different -evolutionary history, and a complete picture of functional variation can -only be gained by integrating data from different alignments on the same -structure view. An example of this is shown in Figure -\ref{mviewalcomplex}, based on data from Song et. al.\footnote{Structure of -DNMT1-DNA Complex Reveals a Role for Autoinhibition in Maintenance DNA Methylation. Jikui Song, Olga Rechkoblit, Timothy H. Bestor, and Dinshaw J. Patel. -{\sl Science} 2011 {\bf 331} 1036-1040 -\href{http://www.sciencemag.org/content/331/6020/1036}{DOI:10.1126/science.1195380}} +To create a new annotation, first select all the positions to be annotated on the appropriate row. Right-clicking on this selection brings up the context menu which allows the insertion of graphics for secondary structure ({\sl Helix} or {\sl Sheet}), text {\sl Label} and the colour in which to present the annotation (Figure \ref{newannot}). On selecting {\sl Label} a dialogue box will appear, requesting the text to place at that position. After the text is entered, the selection can be removed and the annotation becomes clearly visible\footnote{When annotating a block of positions, the text can be partly obscured by the selection highlight. Pressing the [ESC] key clears the selection and the label is then visible.}. Annotations can be coloured or deleted as desired. \begin{figure}[htbp] \begin{center} -\includegraphics[]{images/mchainstructureview.pdf} -\caption{{\bf The biological assembly of Mouse DNA Methyltransferase-1 coloured -by Pfam alignments for its major domains} Alignments for each domain within the -Uniprot sequence DNMT1\_MOUSE have been used to visualise sequence conservation -in each component of this protein-DNA complex. Instructions for recreating this figure are given in exercise \ref{dnmtcomplexex}. } -\label{mviewalcomplex} +\includegraphics[width=2in]{images/annots3.pdf} +\includegraphics[width=2in]{images/annots4.pdf} +\includegraphics[width=2in]{images/annots5.pdf} +\caption{{\bf Creating a new annotation.} Annotations are created from a selection on the annotation row and can be coloured as desired.} +\label{newannot} \end{center} \end{figure} -\exercise{Colouring a Protein Complex to Explore Domain-Domain -Interfaces}{\label{dnmtcomplexex} - -\exstep{Download the PDB file at -\textsf{\url{http://www.jalview.org/tutorial/DNMT1\_MOUSE.pdb}} to your desktop. - -This is the biological unit for PDB ID 3pt6, as identified by the PDBe's PISA -server.} - -\exstep{Launch the Jalview desktop and ensure you have at least 256MB of -free memory available. - -{\sl Use the following webstart link: - -\href{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}.} - -{\sl Alternatively in the Development section of the Jalview web site -(\href{http://www.jalview.org/development/development-builds}{http://www.jalview.org/development/development-builds}) -in the ``latest official build'' row in the table, go to the -``Webstart'' column, click on ``G2''.}} -\exstep{Retrieve the following {\bf full} PFAM alignments: PF02008, PF01426 -(make sure you select the {\sl PFAM {\bf (Full)}} source). These will each be retrieved into their own alignment window.} \exstep{Drag the URL or file of the structure you downloaded in -step 1 onto one of the alignments to associate it with the mouse sequence in -that Pfam domain family.} -\exstep{For every DNMT1\_MOUSE sequence in the alignment, use the sequence -ID popup menu's {\sl Structure} submenu to view the DNMT1\_MOUSE structure for the associated mouse sequence. When given the option, {\bf view all of the structures in the same Jmol viewer}. Check the contents of the {\sl View $\Rightarrow$ Colour by ..} submenu to see what alignments can be used to -colour the sequence.} -\exstep{Repeat the previous two steps for each of -the other alignments. In each case, when performing the `View DNMT1\_MOUSE.pdb' -step, Jalview will ask if you wish to create a new Jmol view. You should -respond `No', {\bf ensuring that each sequence fragment is associated with the same Jmol view}.} -\exstep{Pick a different colourscheme for each alignment, and use the {\sl -Colour by ..} submenu to ensure they are all used to colour the complex shown -in the Jmol window.} -\exstep{The final step needed to reproduce the shading in Figure -\ref{mviewalcomplex} is to use the {\sl Colour $\Rightarrow$ By -Annotation } option in each alignment window to shade the alignment by the -{\bf Conservation} annotation row. This function was described in section -\ref{colourbyannotation}. - -Ensure that you first disable the {\sl View $\Rightarrow$ Show Features} menu option, or you may not see any colour changes in the associated structure. +\exercise{Annotating Alignments}{ +\exstep{Load the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. +Right-click on the {\sl Conservation} annotation row to +bring up the context menu and select {\sl Add New Row}. A dialogue box will appear asking for {\sl Label for annotation}. +Enter ``Iron binding site" and click OK. A new, empty, row appears. +} +\exstep{ +Navigate to column 97. Move down and on the new annotation row called +``Iron binding site, select column 97. +Right click at this selection and select {\sl Label} from the context menu. +Enter ``Fe" in the box and click OK. Right-click on the selection again and select {\sl Colour}. +Choose a colour from the colour chooser dialogue +and click OK. Press [ESC] to remove the selection. +} +\exstep{ Select columns 70-77 on the annotation row. Right-click and choose {\sl Sheet} from the + context menu. You will be prompted for a label. Enter ``B" and press OK. A new line showing the + sheet as an arrow appears. The colour of the label can be changed but not the colour of the sheet + arrow. +} +\exstep{Right click on the title text of annotation row that you just created. +Select {\sl Export Annotation} and, in the {\bf Export Annotation} dialog box that will open, select the Jalview format and click +the [To Textbox] button. -{\sl Note: Choose a different shading scheme for each -alignment so that the regions of strong physicochemical conservation are highlighted. This -kind of shading will reveal conserved regions of interaction between domains -in the structure.}} -\exstep{Save your work as a Jalview project and verify that it can be opened again by starting another Jalview Desktop instance, and dragging the saved project into the desktop window.} +The format for this file is given in the Jalview help. Press [F1] to open it, and find +the ``Annotations File Format'' entry in the ``Alignment Annotations'' section of the contents +pane. } -% {\sl Note: This exercise relies on new features introduced in Jalview 2.7. If -% you notice any strange behaviour when trying out this exercise, it may be a -% bug (see -% \href{http://issues.jalview.org/browse/JAL-1008}{http://issues.jalview.org/browse/JAL-1008} -% for one relating to highlighting of positions in the alignment window).} +\exstep{Export the file to a text editor and edit the file to change the name of the annotation +row. Save the file and drag it onto the alignment view.} +\exstep{Try to add an additional helix somewhere along the row by editing the file and +re-importing it. +{\sl Hint: Use the {\bf Export Annotation} function to view what helix annotation looks like in +a Jalview annotation file.}} +\exstep{Use the {\sl Alignment Window $\Rightarrow$ File $\Rightarrow$ Export Annotations...} +function to export all the alignment's annotation to a file.} +\exstep{Open the exported annotation in a text editor, and use the {\bf Annotation File Format} +documentation to modify the style of the Conservation, Consensus and Quality annotation rows so +they appear as several lines on a single line graph. +{\sl Hint: You need to change the style of annotation row in the first field of the annotation +row entry in the file, and create an annotation row grouping to overlay the three quantitative +annotation rows.} } +\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{Analysis of Alignments} -\label{alignanalysis} -Jalview provides support for sequence analysis in two ways. A number of -analytical methods are `built-in', these are accessed from the {\sl Calculate} -alignment window menu. Computationally intensive analyses are run outside -Jalview {\sl via} web services - these are typically accessed {\sl via} the {\sl -Web Service} menu, and described in \ref{jvwebservices} and subsequent sections. -In this section, we describe the built-in analysis capabilities common to both -the Jalview Desktop and the JalviewLite applet. - -\subsection{PCA} -This calculation creates a spatial representation of the similarities within the -current selection or the whole alignment if no selection has been made. After -the calculation finishes, a 3D viewer displays the each sequence as a point in -3D `similarity space'. Sets of similar sequences tend to lie near each other in -this space. -Note: The calculation is computationally expensive, and may fail for very large -sets of sequences - because the JVM has run out of memory. Memory issues, and -how to overcome them, were discussed in Section \ref{memorylimits}. - -\subsubsection{What is PCA?} -Principal components analysis is a technique for examining the structure of -complex data sets. The components are a set of dimensions formed from the -measured values in the data set, and the principle component is the one with the -greatest magnitude, or length. The sets of measurements that differ the most -should lie at either end of this principle axis, and the other axes correspond -to less extreme patterns of variation in the data set. -In this case, the components are generated by an eigenvector decomposition of -the matrix formed from the sum of pairwise substitution scores at each aligned -position between each pair of sequences. The basic method is described in the -1995 paper by {\sl G. Casari, C. Sander} and {\sl A. Valencia} \footnote{{\sl -Nature Structural Biology} (1995) {\bf 2}, 171-8. -PMID: 7749921} and implemented at the SeqSpace server at the EBI. +\chapter{Multiple Sequence Alignment} +\label{msaservices} +Sequences can be aligned using a range of algorithms provided by JABA web +services. These include ClustalW\footnote{{\sl ``CLUSTAL W: improving the +sensitivity of progressive multiple sequence alignment through sequence +weighting, position specific gap penalties and weight matrix choice."} Thompson +JD, Higgins DG, Gibson TJ (1994) {\sl Nucleic Acids Research} {\bf 22}, +4673-80}, Muscle\footnote{{\sl ``MUSCLE: a multiple sequence alignment method +with reduced time and space complexity"} Edgar, R.C. +(2004) {\sl BMC Bioinformatics} {\bf 5}, 113}, MAFFT\footnote{{\sl ``MAFFT: a +novel method for rapid multiple sequence alignment based on fast Fourier +transform"} Katoh, K., Misawa, K., Kuma, K. and Miyata, T. (2002) {\sl Nucleic +Acids Research} {\bf 30}, 3059-3066. and {\sl ``MAFFT version 5: +improvement in accuracy of multiple sequence alignment"} Katoh, K., Kuma, K., +Toh, H. and Miyata, T. (2005) {\sl Nucleic Acids Research} {\bf 33}, 511-518.}, +ProbCons,\footnote{PROBCONS: Probabilistic Consistency-based Multiple Sequence +Alignment. +Do, C.B., Mahabhashyam, M.S.P., Brudno, M., and Batzoglou, S. +(2005) {\sl Genome Research} {\bf 15} 330-340.} T-COFFEE\footnote{T-Coffee: +A novel method for multiple sequence alignments. (2000) Notredame, Higgins and +Heringa {\sl JMB} {\bf 302} 205-217} and Clustal Omega.\footnote{Fast, scalable +generation of high-quality protein multiple sequence alignments using Clustal +Omega. Sievers F, Wilm A, Dineen DG, Gibson TJ, Karplus K, Li W, Lopez R, +McWilliam H, Remmert M, Soding J, Thompson JD, Higgins DG (2011) {\sl Molecular +Systems Biology} {\bf 7} 539 +\href{http://dx.doi.org/10.1038/msb.2011.75}{doi:10.1038/msb.2011.75}} Of these, +T-COFFEE is the slowest, but also the most accurate. ClustalW is historically +the most widely used. Muscle is faster than ClustalW and probably the most +accurate for smaller alignments and MAFFT is probably the best for large +alignments, however {\bf Clustal Omega}, which was released in 2011, is +arguably the fastest and most accurate tool for protein multiple alignment. -Jalview provides two different options for the PCA calculation. Protein PCAs are -by default computed using BLOSUM 62 pairwise substitution scores, and nucleic -acid alignment PCAs are computed using a score model based on the identity -matrix that also treats Us and Ts as identical, to support analysis of both RNA -and DNA alignments. The {\sl Change Parameters} menu also allows the calculation -method to be toggled between SeqSpace and a variant calculation that is detailed -in Jalview's built in documentation.\footnote{See -\url{http://www.jalview.org/help/html/calculations/pca.html}.} -\subsubsection{The PCA Viewer} +To run an alignment web service, select the appropriate method from the {\sl +Web Service $\Rightarrow$ Alignment $\Rightarrow$ \ldots} submenu (Figure +\ref{webservices}). For each service you may either perform an alignment with +default settings, use one of the available presets, or customise the parameters +with the `{\sl Edit and Run ..}' dialog box. Once the job is submitted, a +progress window will appear giving information about the job and any errors that +occur. After successful completion of the job, a new 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 Calculate +$\Rightarrow$ Sort } sub menu. -PCA analysis can be launched from the {\sl Calculate $\Rightarrow$ Principle -Component Analysis} menu option. {\bf PCA requires a selection containing at -least 4 sequences}. A window opens containing the PCA tool (Figure \ref{PCA}). -Each sequence is represented by a small square, coloured by the background -colour of the sequence ID label. The axes can be rotated by clicking and -dragging the left mouse button and zoomed using the $\uparrow$ and $\downarrow$ -keys or the scroll wheel of the mouse (if available). A tool tip appears if the -cursor is placed over a sequence. Sequences can be selected by clicking on them. -[CTRL]-Click can be used to select multiple sequences. -\begin{figure}[hbtp] +\begin{figure}[htbp] \begin{center} -\includegraphics[width=2in]{images/PCA1.pdf} -\includegraphics[width=3in]{images/PCA3.pdf} -\caption{{\bf PCA Analysis.} } -\label{PCA} +\parbox[c]{1.5in}{\includegraphics[width=1.5in]{images/ws1.pdf}} +\parbox[c]{2.5in}{\includegraphics[width=2.5in]{images/ws2.pdf}} +\parbox[c]{2in}{\includegraphics[width=2in]{images/ws3.pdf}} +\caption{{\bf Multiple alignment via web services} The appropriate method is +selected from the menu (left), a status box appears (centre), and the results +appear in a new window (right).} +\label{webservices} \end{center} \end{figure} -Labels will be shown for each sequence by toggling the {\sl View $\Rightarrow$ -Show Labels} menu option, and the plot background colour changed {\sl via} the -{\sl View $\Rightarrow$ Background Colour..} dialog box. A graphical -representation of the PCA plot can be exported as an EPS or PNG image {\sl via} -the {\sl File $\Rightarrow$ Save As $\Rightarrow$ \ldots } submenu. +\subsubsection{Realignment} -\exercise{Principle Component Analysis}{ \exstep{Load the alignment at -\textsf{http://www.jalview.org/examples/exampleFile.jar} and press [ESC] to clear any selections. Alternatively, select {\sl Select $\Rightarrow$ Undefine Groups} to remove all groups and colourschemes. } \exstep{Select the menu option {\sl Calculate $\Rightarrow$ Principle Component Analysis}. A new window will open. Move this window so that the tree, alignment and PCA viewer window are all visible. Try rotating the plot by clicking and dragging the mouse on the plot in the PCA window. Note that clicking on points in the plot will highlight them on the alignment and tree. } -\exstep{ Click on the tree window. Careful selection of the tree partition -location will divide the alignment into a number of groups, each of a different -colour. Note how the colour of the sequence ID label matches both the colour of -the partitioned tree and the points in the PCA plot. -} } +The re-alignment option is currently only supported by ClustalW and Clustal +Omega. When performing a re-alignment, Jalview submits the current selection to +the alignment service complete with any existing gaps. This approach is useful +when one wishes to align additional sequences to an existing alignment without +any further optimisation to the existing alignment. The re-alignment service +provided by ClustalW in this case is effectively a simple form of profile +alignment. -\subsubsection{PCA Data Export} -Although the PCA viewer supports export of the current view, the plots produced -are rarely suitable for direct publication. The PCA viewer's {\sl File} menu -includes a number of options for exporting the PCA matrix and transformed points -as comma separated value (CSV) files. These files can be imported by tools such -as {\bf R} or {\bf gnuplot} in order to graph the data. +\subsubsection{Alignments of Sequences that include Hidden Regions} -\subsection{Trees} -\label{trees} -Jalview can calculate and display trees, providing interactive tree-based -grouping of sequences though a tree viewer. All trees are calculated {\sl via} -the {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ \ldots} submenu. -Trees can be calculated from distance matrices determined from \% identity or -aggregate BLOSUM 62 score using either {\sl Average Distance} (UPGMA) or {\sl -Neighbour Joining} algorithms. The input data for a tree is either the selected -region or the whole alignment, excluding any hidden regions. +If the view or selected region that is submitted for alignment contains hidden +regions, then {\bf only the visible sequences will be submitted to the service}. +Furthermore, each contiguous segment of sequences will be aligned independently +(resulting in a number of alignment `subjobs' appearing in the status window). +Finally, the results of each subjob will be concatenated with the hidden regions +in the input data prior to their display in a new window. This approach ensures +that 1) hidden column boundaries in the input data are preserved in the +resulting alignment - in a similar fashion to the constraint that hidden columns +place on alignment editing (see Section \ref{lockededits} and 2) hidden +columns can be used to preserve existing parts of an alignment whilst the +visible parts are locally refined. -On calculating a tree, a new window opens (Figure \ref{trees1}) which contains -the tree. Various display settings can be found in the tree window {\sl View} -menu, including font, scaling and label display options, and the {\sl File -$\Rightarrow$ Save As} submenu contains options for image and Newick file -export. Newick format is a standard file format for trees which allows them to -be exported to other programs. Jalview can also read in external trees in -Newick format {\sl via} the {\sl File $\Rightarrow$ Load Associated Tree} menu -option. Leaf names on imported trees will be matched to the associated alignment -- unmatched leaves will still be displayed, and can be highlighted using the -{\sl View $\Rightarrow$ Mark Unlinked Leaves} menu option. +\exercise{Multiple Sequence Alignment}{ +\exstep{ Close all windows and open the alignment at {\sf +http://www.jalview.org/tutorial/unaligned.fa}. Select {\sl +Web Service $\Rightarrow$ Alignment $\Rightarrow$ Muscle with Defaults}. +A window will open giving the job status. After a short time, a second window will open + with the results of the alignment.} + \exstep{Return to the first sequence alignment window by clicking on + the window, and repeat using Clustal and MAFFT (from the {\sl Web + Service $\Rightarrow$ Alignment} menu) on the same initial alignment. Compare them and + you should notice small differences. } +\exstep{Select the last three sequences in the MAFFT alignment, and de-align them +with {\sl Edit $\Rightarrow$ Remove All Gaps}. Press [ESC] to deselect them and then +submit the view for re-alignment with Clustal.} +\exstep{Use [CTRL]-Z to recover the alignment of the last three sequences in the MAFFT alignment. +Once the Clustal re-alignment has completed, compare the results of re-alignment of the +three sequences with their alignment in the original MAFFT result.} +\exstep{Select columns 60 to 125 in the original MAFFT alignment and hide them. +Select {\sl Web Services $\Rightarrow$ Alignment $\Rightarrow$ Mafft with Defaults} to +submit the visible portion of the alignment to MAFFT. When the web service job pane appears, +note that there are now two alignment job status panes shown in the window.} +\exstep{When the MAFFT job has finished, compare the alignment of the N-terminal visible +region in the result with the corresponding region of the original alignment. If you wish, +select and hide a few more columns in the N-terminal region, and submit the alignment to the +service again and explore the effect of local alignment on the non-homologous parts of the +N-terminal region.} +} -\begin{figure} -\begin{center} -\includegraphics[width=2.5in]{images/trees1.pdf} -\includegraphics[width=2.5in]{images/trees2.pdf} -\includegraphics[width=1.25in]{images/trees4.pdf} -\caption{{\bf Calculating Trees} Jalview provides four built in models for calculating trees. -Jalview can also load precalculated trees in Newick format (right).} -\label{trees1} -\end{center} -\end{figure} +\subsection{Customising the Parameters used for Alignment} +JABA web services allow you to vary the parameters used when performing a +bioinformatics analysis. For JABA alignment services, this means you are +usually able to modify the following types of parameters: +\begin{list}{$\bullet$}{} +\item Amino acid or nucleotide substitution score matrix +\item Gap opening and widening penalties +\item Types of distance metric used to construct guide trees +\item Number of rounds of re-alignment or alignment optimisation +\end{list} -Clicking on the tree brings up a cursor across the height of the tree. The -sequences are automatically partitioned and coloured (Figure \ref{trees2}). To -group them together, select the {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$ -By Tree Order $\Rightarrow$ \ldots} alignment window menu option and choose the -correct tree. The sequences will then be sorted according to the leaf order -currently shown in the tree view. The coloured background to the sequence IDs -can be removed with {\sl Select $\Rightarrow$ Undefine Groups} from the -alignment window menu. Note that tree partitioning will also remove any groups -and colourschemes on a view, so create a new view ([CTRL-T]) if you wish to -preserve these. -\begin{figure} +\subsubsection{Getting Help on the Parameters for a Service} +Each parameter available for a method usually has a short description, which +Jalview will display as a tooltip, or as a text pane that can be opened under +the parameter's controls. In the parameter shown in Figure +\ref{clustalwparamdetail}, the description was opened by selecting the button on the left hand side. Online help for the +service can also be accessed, by right clicking the button and selecting a URL +from the pop-up menu that will open. + +\begin{figure}[htbp] \begin{center} -\includegraphics[width=5in]{images/trees3.pdf} -\caption{{\bf Interactive Trees} The tree level cutoff can be used to designate -groups in Jalview.} -\label{trees2} +\includegraphics[width=2.5in]{images/clustalwparamdetail.pdf} +\caption{{\bf ClustalW parameter slider detail}. From the ClustalW {\sl Clustal $\Rightarrow$ Edit settings and run ...} dialog box. } +\label{clustalwparamdetail} \end{center} -\end{figure} +\end{figure} -%\subsubsection{Multiple Views and Input Data recovery from PCA and Tree Viewers} -% move to ch. 3 ? -%Both PCA and Tree viewers are linked analysis windows. This means that their selection and display are linked to a particular alignment, and control and reflect the selection state for a particular view. +\subsection{Alignment Presets} +The different multiple alignment algorithms available from JABA vary greatly in +the number of adjustable parameters, and it is often difficult to identify what +are the best values for the sequences that you are trying to align. For these +reasons, each JABA service may provide one or more presets -- which are +pre-defined sets of parameters suited for particular types of alignment +problem. For instance, the Muscle service provides the following presets: +\begin{list}{$\bullet$}{} +\item Large alignments (balanced) +\item Protein alignments (fastest speed) +\item Nucleotide alignments (fastest speed) +\end{list} -\subsubsection{Recovering input Data for a Tree or PCA Plot Calculation} -\parbox[c]{5in}{ -The {\sl File $\Rightarrow$ Input Data } option will open a new alignment window containing the original data used to calculate the tree or PCA plot (if available). This function is useful when a tree has been created and then the alignment subsequently changed. -} -\parbox[c]{1.25in}{\centerline{\includegraphics[width=1.25in]{images/pca_fmenu.pdf} -}} +The presets are displayed in the JABA web services submenu, and can also be +accessed from the parameter editing dialog box, which is opened by selecting +the `{\sl Edit settings and run ...}' option from the web services menu. If you have used +a preset, then it will be mentioned at the beginning of the job status file shown +in the web service job progress window. -\subsubsection{Changing the associated View for a Tree or PCA Viewer} -\parbox[c]{4in}{ -The {\sl View $\Rightarrow$ Associated Nodes With $\Rightarrow$ .. } submenu is shown when the viewer is associated with an alignment that is involved in multiple views. Selecting a different view does not affect the tree or PCA data, but will change the colouring and display of selected sequences in the display according to the colouring and selection state of the newly associated view. -} \parbox[c]{3in}{\centerline{ -\includegraphics[width=2.5in]{images/pca_vmenu.pdf} }} +\subsubsection{Alignment Service Limits} +Multiple alignment is a computationally intensive calculation. Some JABA server +services and service presets only allow a certain number of sequences to be +aligned. The precise number will depend on the server that you are using to +perform the alignment. Should you try to submit more sequences than a service +can handle, then an error message will be shown informing you of the maximum +number allowed by the server. +\subsection{User Defined Presets} +Jalview allows you to create your own presets for a particular service. To do +this, select the `{\sl Edit settings and run ...}' option for your service, +which will open a parameter editing dialog box like the one shown in Figure +\ref{jwsparamsdialog}. -\exercise{Trees}{ -\exstep{Ensure that you have at least 1G memory available in Jalview -(Either start with this link: -\href{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}, -or in the Development section of the Jalview web site -(\href{http://www.jalview.org/development/development-builds}{http://www.jalview.org/development/development-builds}) -in the ``latest official build'' row in the table, go to the -``Webstart'' column, click on ``G2''.)} -\exstep{Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. A new tree window will appear.} -\exstep{Click on the tree window. A cursor will appear. Note that placing this cursor divides the tree into a number of groups by colour. Place the cursor to give about 4 groups, then select {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$ By Tree Order $\Rightarrow$ Neighbour Joining Tree using BLOSUM62 from ... }. The sequences are reordered to match the order in the tree and groups are formed implicitly.} -\exstep{Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ -Neighbour Joining Using \% Identity}. A new tree window will appear. The group colouring -makes it easy to see the differences between the two trees, calculated using - different methods.} \exstep{Select from sequence 2 column 60 to sequence 12 column 123. Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. A new tree window will appear. It can be seen that the tree contains 11 sequences. It has been coloured according to the already selected groups from the first tree and is calculated purely from the residues in the selection. -Comparing the location of individual sequences between the three trees illustrates the importance of selecting appropriate regions of the alignment for the calculation of trees. -} -\exstep{Recover the {\sl Input Data} for the tree you just calculated from the {\sl File} menu. Check the {\sl Edit $\Rightarrow$ Pad Gaps } option is {\sl not} ticked, and insert one gap anywhere in the alignment. Now select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. +The top row of this dialog allows you to browse the existing presets, and +when editing a parameter set, allows you to change its nickname. As you +adjust settings, buttons will appear at the top of the parameters dialog that +allow you to Revert or Update the currently selected user preset with your changes, Delete the current preset, or Create a new preset, if none exists with the given name. In addition to the parameter set name, you can also provide a short +description for the parameter set, which will be shown in the tooltip for the +parameter set's entry in the web services menu. -A warning dialog box {\bf ``Sequences not aligned'' } appears because the sequences input to the tree calculation are of different lengths. } +\begin{figure}[htbc] +\center{ +\includegraphics[width=3in]{images/jvaliwsparamsbox.pdf} +\caption{{\bf Jalview's JABA alignment service parameter editing dialog box}.} +\label{jwsparamsdialog} } +\end{figure} -\exstep{Now select {\sl Edit $\Rightarrow$ Pad Gaps } and try to perform the tree calculation again - this time a new tree should appear. +\subsubsection{Saving Parameter Sets} +When creating a custom parameter set, you will be asked for a file name to save +it. The location of the file is recorded in the Jalview user preferences in the +same way as a custom alignment colourscheme, so when Jalview is launched again, +it will show your custom preset amongst the options available for running the +JABA service. -This demonstrates the use of the {\sl Pad Gaps } editing preference, which ensures that all sequences are the same length after editing. } +% +% \exercise{Creating and using user defined presets}{\label{createandusepreseex} +% \exstep{Import the file at +% \textsf{http://www.jalview.org/tutorial/fdx\_unaligned.fa} into jalview.} +% \exstep{Use the `{\slDiscover Database Ids}' function to recover the PDB cross +% references for the sequences.} +% \exstep{Align the sequences using the default ClustalW parameters.} +% \exstep{Use the `{\sl Edit and run..}' +% option to open the ClustalW parameters dialog box, and create a new preset using +% the following settings: +% \begin{list}{$\bullet$}{} +% \item BLOSUM matrix (unchanged) +% \item Gap Opening and End Gap penalties = 0.05 +% \item Gap Extension and Separation penalties = 0.05 +% \end{list} +% +% As you edit the parameters, buttons will appear on the dialog box +% allowing you revert your changes or save your settings as a new parameter +% set. +% +% Before you save your settings, remeber to give them a meaningful name by editing +% the text box at the top of the dialog box. +% } +% \exstep{Repeat the alignment using your new parameter set by selecting it from +% the {\sl ClustalW Presets menu}.} +% \exstep{These sequences have PDB structures associated with them, so it is +% possible to compare the quality of the alignments. +% +% Use the {\sl View all {\bf N} +% structures} option to calculate the superposition of 1fdn on 1fxd for both +% alignments (refer to section \ref{superposestructs} for instructions). Which +% alignment gives the best RMSD ? } +% \exstep{Apply the same alignment parameter settings to the example alignment +% (available from \textsf{http://www.jalview.org/examples/uniref50.fa}). +% +% Are there differences ? If not, why not ? +% } +% } -} +\section{Protein Alignment Conservation Analysis} +\label{aacons} +The {\sl Web Service $\Rightarrow$ Conservation} menu controls the computation +of up to 17 different amino acid conservation measures for the current alignment +view. The JABAWS AACon Alignment Conservation Calculation Service, which is used +to calculate these scores, provides a variety of standard measures described by +Valdar in 2002\footnote{Scoring residue conservation. Valdar (2002) {\sl +Proteins: Structure, Function, and Genetics} {\bf 43} 227-241.} as well as an efficient implementation of the SMERFs +score developed by Manning et al. in 2008.\footnote{SMERFS Score Manning et al. {\sl BMC +Bioinformatics} 2008, {\bf 9} 51 \href{http://dx.doi.org/10.1186/1471-2105-9-51}{doi:10.1186/1471-2105-9-51}} -\subsection{Tree Based Conservation Analysis} -\label{treeconsanaly} +\subsubsection{Enabling and Disabling AACon Calculations} +When the AACon Calculation entry in the {\sl Web Services $\Rightarrow$ +Conservation} menu is ticked, AACon calculations will be performed every time +the alignment is modified. Selecting the menu item will enable or disable +automatic recalculation. -Trees reflect the pattern of global sequence similarity exhibited by the -alignment, or region within the alignment, that was used for their calculation. -The Jalview tree viewer enables sequences to be partitioned into groups based -on the tree. This is done by clicking within the tree viewer window. Once subdivided, the -conservation between and within groups can be visually compared in order to -better understand the pattern of similarity revealed by the tree and the -variation within the clades partitioned by the grouping. The conservation based -colourschemes and the group associated conservation and consensus annotation -(enabled using the alignment window's {\sl View $\Rightarrow$ Autocalculated -Annotation $\Rightarrow$ Group Conservation} and {\sl Group Consensus} options) -can help when working with larger alignments. +\subsubsection{Configuring which AACon Calculations are Performed} +The {\sl Web Services $\Rightarrow$ Conservation $\Rightarrow$ Change AACon +Settings ...} menu entry will open a web services parameter dialog for the +currently configured AACon server. Standard presets are provided for quick and +more expensive conservation calculations, and parameters are also provided to +change the way that SMERFS calculations are performed. +AACon settings for an alignment are saved in Jalview projects along with the +latest calculation results. -\exercise{Tree Based Conservation Analysis}{ -\label{consanalyexerc} -\exstep{Load the PF03460 PFAM seed alignment using the sequence fetcher. Colour it with the {\sl Taylor colourscheme}, and apply {\sl Conservation } shading. } -\exstep{Build a Neighbour joining tree using BLOSUM62 and use the {\sl Sort -Alignment By Tree} option in the tree viewer submenu to order alignment using the calculated tree.} \exstep{Select a point on the tree to partition the alignment, and examine the variation in colouring between different groups. +\subsubsection{Changing the Server used for AACon Calculations} +If you are working with alignments too large to analyse with the public JABAWS +server, then you will most likely have already configured additional JABAWS +servers. By default, Jalview will chose the first AACon service available from +the list of JABAWS servers available. If available, you can switch to use +another AACon service by selecting it from the {\sl Web Services $\Rightarrow$ +Conservation $\Rightarrow$ Switch Server} submenu. -You may find it easier to browse the alignment if you first uncheck the {\sl -Annotations $\Rightarrow$ Show Annotations} option, and open the Overview Window -within the View menu to aid navigation.} -\exstep{Try changing the colourscheme to BLOSUM62 (whilst ensuring that {\sl Apply Colour to All Groups} is selected)} +\chapter{Analysis of Alignments} +\label{alignanalysis} +Jalview provides support for sequence analysis in two ways. A number of +analytical methods are `built-in', these are accessed from the {\sl Calculate} +alignment window menu. Computationally intensive analyses are run outside +Jalview {\sl via} web services - these are typically accessed {\sl via} the {\sl +Web Service} menu, and described in \ref{jvwebservices} and subsequent sections. +In this section, we describe the built-in analysis capabilities common to both +the Jalview Desktop and the JalviewLite applet. + +\section{PCA} +This calculation creates a spatial representation of the similarities within the +current selection or the whole alignment if no selection has been made. After +the calculation finishes, a 3D viewer displays the each sequence as a point in +3D `similarity space'. Sets of similar sequences tend to lie near each other in +this space. +Note: The calculation is computationally expensive, and may fail for very large +sets of sequences - because the JVM has run out of memory. Memory issues, and +how to overcome them, were discussed in Section \ref{memorylimits}. + +\subsubsection{What is PCA?} +Principal components analysis is a technique for examining the structure of +complex data sets. The components are a set of dimensions formed from the +measured values in the data set, and the principle component is the one with the +greatest magnitude, or length. The sets of measurements that differ the most +should lie at either end of this principle axis, and the other axes correspond +to less extreme patterns of variation in the data set. +In this case, the components are generated by an eigenvector decomposition of +the matrix formed from the sum of pairwise substitution scores at each aligned +position between each pair of sequences. The basic method is described in the +1995 paper by {\sl G. Casari, C. Sander} and {\sl A. Valencia} \footnote{{\sl +Nature Structural Biology} (1995) {\bf 2}, 171-8. +PMID: 7749921} and implemented at the SeqSpace server at the EBI. + +Jalview provides two different options for the PCA calculation. Protein PCAs are +by default computed using BLOSUM 62 pairwise substitution scores, and nucleic +acid alignment PCAs are computed using a score model based on the identity +matrix that also treats Us and Ts as identical, to support analysis of both RNA +and DNA alignments. The {\sl Change Parameters} menu also allows the calculation +method to be toggled between SeqSpace and a variant calculation that is detailed +in Jalview's built in documentation.\footnote{See +\url{http://www.jalview.org/help/html/calculations/pca.html}.} + +\subsubsection{The PCA Viewer} + +PCA analysis can be launched from the {\sl Calculate $\Rightarrow$ Principle +Component Analysis} menu option. {\bf PCA requires a selection containing at +least 4 sequences}. A window opens containing the PCA tool (Figure \ref{PCA}). +Each sequence is represented by a small square, coloured by the background +colour of the sequence ID label. The axes can be rotated by clicking and +dragging the left mouse button and zoomed using the $\uparrow$ and $\downarrow$ +keys or the scroll wheel of the mouse (if available). A tool tip appears if the +cursor is placed over a sequence. Sequences can be selected by clicking on them. +[CTRL]-Click can be used to select multiple sequences. +\begin{figure}[hbtp] +\begin{center} +\includegraphics[width=2in]{images/PCA1.pdf} +\includegraphics[width=3in]{images/PCA3.pdf} +\caption{{\bf PCA Analysis.} } +\label{PCA} +\end{center} +\end{figure} + +Labels will be shown for each sequence by toggling the {\sl View $\Rightarrow$ +Show Labels} menu option, and the plot background colour changed {\sl via} the +{\sl View $\Rightarrow$ Background Colour..} dialog box. A graphical +representation of the PCA plot can be exported as an EPS or PNG image {\sl via} +the {\sl File $\Rightarrow$ Save As $\Rightarrow$ \ldots } submenu. + +\exercise{Principle Component Analysis}{ \exstep{Load the alignment at +\textsf{http://www.jalview.org/examples/exampleFile.jar} and press [ESC] to clear any selections. Alternatively, select {\sl Select $\Rightarrow$ Undefine Groups} to remove all groups and colourschemes. } \exstep{Select the menu option {\sl Calculate $\Rightarrow$ Principle Component Analysis}. A new window will open. Move this window so that the tree, alignment and PCA viewer window are all visible. Try rotating the plot by clicking and dragging the mouse on the plot in the PCA window. Note that clicking on points in the plot will highlight them on the alignment and tree. } +\exstep{ Click on the tree window. Careful selection of the tree partition +location will divide the alignment into a number of groups, each of a different +colour. Note how the colour of the sequence ID label matches both the colour of +the partitioned tree and the points in the PCA plot. +} } + +\subsubsection{PCA Data Export} +Although the PCA viewer supports export of the current view, the plots produced +are rarely suitable for direct publication. The PCA viewer's {\sl File} menu +includes a number of options for exporting the PCA matrix and transformed points +as comma separated value (CSV) files. These files can be imported by tools such +as {\bf R} or {\bf gnuplot} in order to graph the data. + +\section{Trees} +\label{trees} +Jalview can calculate and display trees, providing interactive tree-based +grouping of sequences though a tree viewer. All trees are calculated {\sl 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 {\sl Average Distance} (UPGMA) or {\sl +Neighbour Joining} algorithms. The input data for a tree is either the selected +region or the whole alignment, excluding any hidden regions. + +On calculating a tree, a new window opens (Figure \ref{trees1}) which contains +the tree. Various display settings can be found in the tree window {\sl View} +menu, including font, scaling and label display options, and the {\sl File +$\Rightarrow$ Save As} submenu contains options for image and Newick file +export. Newick format is a standard file format for trees which allows them to +be exported to other programs. Jalview can also read in external trees in +Newick format {\sl via} the {\sl File $\Rightarrow$ Load Associated Tree} menu +option. Leaf names on imported trees will be matched to the associated alignment +- unmatched leaves will still be displayed, and can be highlighted using the +{\sl View $\Rightarrow$ Mark Unlinked Leaves} menu option. + + +\begin{figure} +\begin{center} +\includegraphics[width=2.5in]{images/trees1.pdf} +\includegraphics[width=2.5in]{images/trees2.pdf} +\includegraphics[width=1.25in]{images/trees4.pdf} +\caption{{\bf Calculating Trees} Jalview provides four built in models for calculating trees. +Jalview can also load precalculated trees in Newick format (right).} +\label{trees1} +\end{center} +\end{figure} + + +Clicking on the tree brings up a cursor across the height of the tree. The +sequences are automatically partitioned and coloured (Figure \ref{trees2}). To +group them together, select the {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$ +By Tree Order $\Rightarrow$ \ldots} alignment window menu option and choose the +correct tree. The sequences will then be sorted according to the leaf order +currently shown in the tree view. The coloured background to the sequence IDs +can be removed with {\sl Select $\Rightarrow$ Undefine Groups} from the +alignment window menu. Note that tree partitioning will also remove any groups +and colourschemes on a view, so create a new view ([CTRL-T]) if you wish to +preserve these. + +\begin{figure} +\begin{center} +\includegraphics[width=5in]{images/trees3.pdf} +\caption{{\bf Interactive Trees} The tree level cutoff can be used to designate +groups in Jalview.} +\label{trees2} +\end{center} +\end{figure} + +%\subsubsection{Multiple Views and Input Data recovery from PCA and Tree Viewers} +% move to ch. 3 ? +%Both PCA and Tree viewers are linked analysis windows. This means that their selection and display are linked to a particular alignment, and control and reflect the selection state for a particular view. + +\subsubsection{Recovering input Data for a Tree or PCA Plot Calculation} +\parbox[c]{5in}{ +The {\sl File $\Rightarrow$ Input Data } option will open a new alignment window containing the original data used to calculate the tree or PCA plot (if available). This function is useful when a tree has been created and then the alignment subsequently changed. +} +\parbox[c]{1.25in}{\centerline{\includegraphics[width=1.25in]{images/pca_fmenu.pdf} +}} + +\subsubsection{Changing the associated View for a Tree or PCA Viewer} +\parbox[c]{4in}{ +The {\sl View $\Rightarrow$ Associated Nodes With $\Rightarrow$ .. } submenu is shown when the viewer is associated with an alignment that is involved in multiple views. Selecting a different view does not affect the tree or PCA data, but will change the colouring and display of selected sequences in the display according to the colouring and selection state of the newly associated view. +} \parbox[c]{3in}{\centerline{ +\includegraphics[width=2.5in]{images/pca_vmenu.pdf} }} + + +\exercise{Trees}{ +\exstep{Ensure that you have at least 1G memory available in Jalview +(Either start with this link: +\href{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}, +or in the Development section of the Jalview web site +(\href{http://www.jalview.org/development/development-builds}{http://www.jalview.org/development/development-builds}) +in the ``latest official build'' row in the table, go to the +``Webstart'' column, click on ``G2''.)} +\exstep{Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. A new tree window will appear.} +\exstep{Click on the tree window. A cursor will appear. Note that placing this cursor divides the tree into a number of groups by colour. Place the cursor to give about 4 groups, then select {\sl Calculate $\Rightarrow$ Sort $\Rightarrow$ By Tree Order $\Rightarrow$ Neighbour Joining Tree using BLOSUM62 from ... }. The sequences are reordered to match the order in the tree and groups are formed implicitly.} +\exstep{Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ +Neighbour Joining Using \% Identity}. A new tree window will appear. The group colouring +makes it easy to see the differences between the two trees, calculated using + different methods.} \exstep{Select from sequence 2 column 60 to sequence 12 column 123. Select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. A new tree window will appear. It can be seen that the tree contains 11 sequences. It has been coloured according to the already selected groups from the first tree and is calculated purely from the residues in the selection. +Comparing the location of individual sequences between the three trees illustrates the importance of selecting appropriate regions of the alignment for the calculation of trees. +} +\exstep{Recover the {\sl Input Data} for the tree you just calculated from the {\sl File} menu. Check the {\sl Edit $\Rightarrow$ Pad Gaps } option is {\sl not} ticked, and insert one gap anywhere in the alignment. Now select {\sl Calculate $\Rightarrow$ Calculate Tree $\Rightarrow$ Neighbour Joining Using BLOSUM62}. + +A warning dialog box {\bf ``Sequences not aligned'' } appears because the sequences input to the tree calculation are of different lengths. } + +\exstep{Now select {\sl Edit $\Rightarrow$ Pad Gaps } and try to perform the tree calculation again - this time a new tree should appear. + +This demonstrates the use of the {\sl Pad Gaps } editing preference, which ensures that all sequences are the same length after editing. } + +} + +\subsection{Tree Based Conservation Analysis} +\label{treeconsanaly} + +Trees reflect the pattern of global sequence similarity exhibited by the +alignment, or region within the alignment, that was used for their calculation. +The Jalview tree viewer enables sequences to be partitioned into groups based +on the tree. This is done by clicking within the tree viewer window. Once subdivided, the +conservation between and within groups can be visually compared in order to +better understand the pattern of similarity revealed by the tree and the +variation within the clades partitioned by the grouping. The conservation based +colourschemes and the group associated conservation and consensus annotation +(enabled using the alignment window's {\sl View $\Rightarrow$ Autocalculated +Annotation $\Rightarrow$ Group Conservation} and {\sl Group Consensus} options) +can help when working with larger alignments. + +\exercise{Tree Based Conservation Analysis}{ +\label{consanalyexerc} +\exstep{Load the PF03460 PFAM seed alignment using the sequence fetcher. Colour it with the {\sl Taylor colourscheme}, and apply {\sl Conservation } shading. } +\exstep{Build a Neighbour joining tree using BLOSUM62 and use the {\sl Sort +Alignment By Tree} option in the tree viewer submenu to order alignment using the calculated tree.} \exstep{Select a point on the tree to partition the alignment, and examine the variation in colouring between different groups. + +You may find it easier to browse the alignment if you first uncheck the {\sl +Annotations $\Rightarrow$ Show Annotations} option, and open the Overview Window +within the View menu 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. } } @@ -2508,1166 +2718,723 @@ Jalview can calculate optimal pairwise alignments between arbitrary sequences {\ \pagebreak[2] -\section{Webservices} -\label{jvwebservices} -The term ``Webservices'' refers to a variety of data exchange -mechanisms based on HTTP.\footnote{HTTP: Hyper-Text Transfer Protocol.} +\chapter{Working with 3D structures} +\label{3Dstructure} -\parbox[c]{4.5in}{Jalview can exploit public webservices to access databases -remotely, and also submit data to public services by opening pages with your web browser. These types of -services are `one-way', {\sl i.e.} data is either sent to the webservice or -retrieved from it by Jalview. The desktop application can also interact -with `two-way' remote analysis services in order to offload computationally -intensive tasks to High Performance Computing facilities. Most of these two-way -services are provided by {\bf Ja}va {\bf B}ioinformatics {\bf A}nalysis {\bf -W}eb {\bf S}ervice (JABAWS) servers\footnote{See -http://www.compbio.dundee.ac.uk/jabaws for more information and to download -your own server.}, which provides an easily installable system for performing -a range of bioinformatics analysis tasks. } -\parbox[c]{1.75in}{\includegraphics[width=1.65in]{images/wsmenu.pdf}} -\subsection{One-Way Web Services} +This chapter describes the annotation, analysis, and visualization tasks that +the Jalview Desktop can perform. -There are two types of one way service in Jalview. Database services, -which were introduced in in Section \ref{fetchseq}, provide sequence and -alignment data. They can also be used to add sequence IDs to an alignment -imported from a local file, prior to further annotation retrieval, as described -in Section \ref{featuresfromdb}. A second type of one way service is provided -by Jalview's DAS sequence feature retrieval system, which is described -in Section \ref{dasfretrieval}. -% The final type of one way service are sequence -% and ID submission services. -% exemplified by the `Envision2 Services' provided -% by the ENFIN Consortium\footnote{ENFIN is the European Network for Functional -% INtegration. Please see http://www.enfin.org for more information. }. +Section \ref{wkwithstructure} introduces the structure visualization +capabilities of Jalview. In Section \ref{alignanalysis}, you will find +descriptions and exercises on building and displaying trees, PCA analysis, +alignment redundancy removal, pairwise alignments and alignment conservation +analysis. Section \ref{jvwebservices} introduces the various web based services +available to Jalview users, and Section \ref{jabaservices} explains how to +configure the Jalview Desktop for access to new JABAWS servers. +Section \ref{msaservices} describes how to use the range of multiple alignment +programs provided by JABAWS, and Section \ref{aacons} introduces JABAWS AACon +service for protein multiple alignment conservation analysis. +Section \ref{protsspredservices} explains how to perform protein secondary +structure predictions with JPred, and JABAWS protein disorder prediction +services are introduced in Section \ref{protdisorderpred}. -% \subsubsection{One-way submission services} -% Jalview can use the system's web browser to submit sets of sequences and -% sequence IDs to web based applications. Single sequence IDs can be passed to -% a web site using the user definable URL links listed under the {\sl -% Links} submenu of the sequence ID popup menu. These are configured -% in the {\sl Connections} tab of the {\sl Preferences} dialog box. -% -% The Envision 2 services presented in the webservice menu provides are the first -% example of one-way services where multiple sequences or sequence IDs can be -% sent. The {\sl Web service $\Rightarrow$ Envision 2 Services} menu entry -% provides two sub-menus that enable you to submit the sequences or IDs -% associated with the alignment or just the currently selected sequences to one -% of the Envision2 workflows. Selecting any one will open a new browser window on -% the Envision2 web application. The menu entries and their tooltips provide -% details of the Envision2 workflow and the dataset set that will be submitted -% ({\sl i.e.} the database reference type, or associated sequence subset). Please -% note, due to technical limitations, Jalview can currently only submit small -% numbers of sequences to the workflows - if no sequence or ID submissions are -% presented in the submenus, then try to select a smaller number of sequences to -% submit. - -\subsection{Remote Analysis Web Services} -Remote analysis services enable Jalview to use external computational -facilities. There are currently three types of service - multiple sequence -alignment, protein secondary structure prediction, and alignment analysis. -Many of these are provided by JABA servers, which are described at the end of -this section. In all cases, Jalview will construct a job based on the alignment -or currently selected sequences, ask the remote server to run the job, monitor -status of the job and, finally, retrieve the results of the job and display -them. The Jalview user is kept informed of the progress of the job through a -status window. - -Currently, web service jobs and their status windows are not stored in Jalview -Project Files\footnote{This may be rectified in future versions.}, so it is -important that you do not close Jalview whilst a job is running. It is also -essential that you have a continuous network connection in order to -successfully use web services from Jalview, since it periodically checks the -progress of running jobs. - - -\subsection{JABA Web Services for Sequence Alignment and Analysis} -\label{jabaservices} -JABA stands for ``JAva Bioinformatics Analysis'', which is a system developed -by Peter Troshin and Geoff Barton at the University of Dundee for running -computationally intensive bioinformatics analysis programs. A JABA installation -typically provides a range of JABA web services (JABAWS) for use by other -programs, such as Jalview. - -Exercises in the remainder of this section will demonstrate the simplest way of -installing JABA on your computer, and configuring Jalview so it can access the JABA services. If you -need any further help or more information about the services, please go to the -\href{http://www.compbio.dundee.ac.uk/jabaws}{JABAWS home page}. -%% \subsubsection{Aims} -%% \begin{list}{$\bullet$}{} -%% \item Gain experience using the different alignment services provided by -% JABA -%%\item Learn about the way that Jalview stores user presets for JABA services -%%\item Learn how to install JABA services and configure Jalview to access them -%%\end{list} - -\subsection{Changing the Web Services Menu Layout} -\label{changewsmenulayout} -If you are working with a lot of different JABA services, you may wish to change -the way Jalview lays out the web services menu. You can do this from the Web -Services tab of the {\sl Preferences} dialog box. - -\exercise{Changing the Layout of the Web Services Menu}{ -\label{changewsmenulayoutex} -\exstep{Make sure you have loaded an alignment into Jalview, and examine the -current layout of the alignment window's {\sl Web Service} menu.} -\exstep{Open the preferences dialog box and select the web services tab.} -\exstep{Ensure the {\sl Enable JABAWS services} checkbox is selected, and unselect -the {\sl Enable Enfin Services} checkboxes.} -\exstep{Hit {\sl Refresh Services} to update the web services menu -- once the -progress bar has completed, open the {\sl Web Service} menu to view the changes.} -\exstep{Select the {\sl Index by host} checkbox and refresh the services once again. - -{\sl Observe the way the layout of the JABAWS Alignment submenu changes.} -} -\exstep{Do the same with the {\sl Index by type} checkbox.} -} - -Jalview provides these options for configuring the layout of the {\sl Web Service} -menu because different Jalview users may have access to a different number of -JABA services, and each will have their own preference regarding the layout of -the menu. - -\begin{figure}[htbc] -\begin{center} -\includegraphics[width=3in]{images/jvjabawsconfig.pdf} -\caption{{\bf The Jalview Web Services preferences panel.} Options are provided -for configuring the list of JABA servers that Jalview will use, enabling and -disabling Enfin services, and configuring the layout of the web services -menu.} -\label{jvjabawsconfig} -\end{center} -\end{figure} - - -\subsubsection{Testing JABA services} -The JABAWS configuration dialog shown in Figure \ref{jvjabawsconfig} has colour -codes to indicate whether the Desktop can access the server, and whether all -services advertised by the server are functional. The colour codes are: - -\begin{list}{$\bullet$}{} - \item Red - Server cannot be contacted or reports a connection error. - \item Amber - Jalview can connect, but one or more services are non-functional. - \item Green - Server is functioning normally. -\end{list} - %TODO green and a tick, red and a cros, amber and a value indicating whether its all going - -Test results from JABAWS are reported on Jalview's console output (opened from -the Tools menu). Tests are re-run every time Jalview starts, and when the -[Refresh Services] button is pressed on the Jalview JABAWS configuration panel. - -\subsubsection{Resetting the JABA Services Setting to their Defaults} -Once you have configured a JABAWS server and selected the OK button of the -preferences menu, the settings will be stored in your Jalview preferences file, -along with any preferences regarding the layout of the web services menu. If -you should ever need to reset the JABAWS server list to its defaults, use the -`Reset Services' button on the Web Services preferences panel. - -\subsection{Running your own JABA Server} -You can download and run JABA on your own machine using the `VMWare' or -VirtualBox virtual machine environments. If you would like to learn how to do -this, there are full instructions at the -\href{http://www.compbio.dundee.ac.uk/jabaws/}{JABA web site}. - -\exercise{Installing a JABA Virtual Machine on your Computer}{ -\label{jabawsvmex}{\sl This tutorial will demonstrate the simplest way of -installing JABA on your computer, and configuring Jalview so it can access the JABA services. - -{\bf Prerequisites} - -You will need a copy of VMWare Player/Workstation/Fusion on your machine. -} - -\exstep{If you do not have VMWare player installed, download it from -www.vmware.com (this takes a few minutes -- you will need to register and wait -for an email with a download link).} -\exstep{Download the JABA virtual appliance archive called `jaba-vm.zip' from -\textsf{http://www.compbio.dundee.ac.uk/jabaws/archive/jabaws-vm.zip} - -WARNING: This is large (about 300MB) and will take some time to download. -} -\exstep{Unpack the archive's contents to a place on your machine with at least -2GB of free space. - -(On Windows, right click on the archive, and use the 'Extract archive..' option). -} -\exstep{Open the newly extracted directory and double click the VMWare virtual -machine configuration file (jabaws.vcf). This will launch the VMWare player. -} -\exstep{Once VMWare player has started up, it may ask the question ``Did you move or copy -this virtual appliance?'' -- select `Copy'.} -\exstep{You may be prompted to download the VMWare linux tools. These are not -necessary, so close the window or click on `Later'.} -\exstep{You may also be prompted to install support for one or more devices (USB -or otherwise). Say `No' to these options.} -\exstep{Once the machine has loaded, it will display a series of IP addresses -for the different services provided by the VM. Make a note of the JABAWS URL -- -this will begin with `http:' and end with `/jabaws''.} -} - -\exercise{Configuring Jalview to Access your new JABAWS Virtual Appliance}{ -\label{confnewjabawsappl} -\exstep{Start Jalview (If you have not done so already).} -\exstep{Enable the Jalview Java Console by selecting its option from the Tools -menu. - -{\sl Alternately, use the System Java console if you have -configured it to open when Jalview is launched, {\sl via} your system's Java -preferences (under the `Advanced' tab on Windows).}} -\exstep{Open the {\sl Preferences} dialog and locate the Web Services tab.} -\exstep{Add the URL for the new JABAWS server you started in Exercise -\ref{jabawsvmex} to the list of JABAWS urls using the `New Service -URL' button.} -\exstep{You will be asked if you want to test the service. Hit `Yes' to do this --- you should then see some output in the console window. - -{\sl Take a close look at the output in the console. What do you think is -happening?} -} -\exstep{Hit OK to save your preferences -- you have now added a new JABA -service to Jalview!} -\exstep{Try out your new JABA services by loading the ferredoxin sequences from -http://www.jalview.org/tutorial/alignment.fa} -\exstep{Launch an alignment using one -of the JABA methods provided by your server. It will be listed under the JABAWS Alignment submenu of the {\sl Web Service} menu on the alignment window. - -{\sl Note: You can watch the JABA VM appliance's process working by opening the -process monitor on your system. (On Windows XP, this involves right-clicking the -system clock and opening the task manager -- then selecting the 'Processes' tab -and sort by CPU).} -} -} - -\section{Multiple Sequence Alignment} -\label{msaservices} -Sequences can be aligned using a range of algorithms provided by JABA web -services. These include ClustalW\footnote{{\sl ``CLUSTAL W: improving the -sensitivity of progressive multiple sequence alignment through sequence -weighting, position specific gap penalties and weight matrix choice."} Thompson -JD, Higgins DG, Gibson TJ (1994) {\sl Nucleic Acids Research} {\bf 22}, -4673-80}, Muscle\footnote{{\sl ``MUSCLE: a multiple sequence alignment method -with reduced time and space complexity"} Edgar, R.C. -(2004) {\sl BMC Bioinformatics} {\bf 5}, 113}, MAFFT\footnote{{\sl ``MAFFT: a -novel method for rapid multiple sequence alignment based on fast Fourier -transform"} Katoh, K., Misawa, K., Kuma, K. and Miyata, T. (2002) {\sl Nucleic -Acids Research} {\bf 30}, 3059-3066. and {\sl ``MAFFT version 5: -improvement in accuracy of multiple sequence alignment"} Katoh, K., Kuma, K., -Toh, H. and Miyata, T. (2005) {\sl Nucleic Acids Research} {\bf 33}, 511-518.}, -ProbCons,\footnote{PROBCONS: Probabilistic Consistency-based Multiple Sequence -Alignment. -Do, C.B., Mahabhashyam, M.S.P., Brudno, M., and Batzoglou, S. -(2005) {\sl Genome Research} {\bf 15} 330-340.} T-COFFEE\footnote{T-Coffee: -A novel method for multiple sequence alignments. (2000) Notredame, Higgins and -Heringa {\sl JMB} {\bf 302} 205-217} and Clustal Omega.\footnote{Fast, scalable -generation of high-quality protein multiple sequence alignments using Clustal -Omega. Sievers F, Wilm A, Dineen DG, Gibson TJ, Karplus K, Li W, Lopez R, -McWilliam H, Remmert M, Soding J, Thompson JD, Higgins DG (2011) {\sl Molecular -Systems Biology} {\bf 7} 539 -\href{http://dx.doi.org/10.1038/msb.2011.75}{doi:10.1038/msb.2011.75}} Of these, -T-COFFEE is the slowest, but also the most accurate. ClustalW is historically -the most widely used. Muscle is faster than ClustalW and probably the most -accurate for smaller alignments and MAFFT is probably the best for large -alignments, however {\bf Clustal Omega}, which was released in 2011, is -arguably the fastest and most accurate tool for protein multiple alignment. - - -To run an alignment web service, select the appropriate method from the {\sl -Web Service $\Rightarrow$ Alignment $\Rightarrow$ \ldots} submenu (Figure -\ref{webservices}). For each service you may either perform an alignment with -default settings, use one of the available presets, or customise the parameters -with the `{\sl Edit and Run ..}' dialog box. Once the job is submitted, a -progress window will appear giving information about the job and any errors that -occur. After successful completion of the job, a new 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 Calculate -$\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 (centre), and the results -appear in a new window (right).} -\label{webservices} -\end{center} -\end{figure} - -\subsubsection{Realignment} - -The re-alignment option is currently only supported by ClustalW and Clustal -Omega. When performing a re-alignment, Jalview submits the current selection to -the alignment service complete with any existing gaps. This approach is useful -when one wishes to align additional sequences to an existing alignment without -any further optimisation to the existing alignment. The re-alignment service -provided by ClustalW in this case is effectively a simple form of profile -alignment. - -\subsubsection{Alignments of Sequences that include Hidden Regions} - -If the view or selected region that is submitted for alignment contains hidden -regions, then {\bf only the visible sequences will be submitted to the service}. -Furthermore, each contiguous segment of sequences will be aligned independently -(resulting in a number of alignment `subjobs' appearing in the status window). -Finally, the results of each subjob will be concatenated with the hidden regions -in the input data prior to their display in a new window. This approach ensures -that 1) hidden column boundaries in the input data are preserved in the -resulting alignment - in a similar fashion to the constraint that hidden columns -place on alignment editing (see Section \ref{lockededits} and 2) hidden -columns can be used to preserve existing parts of an alignment whilst the -visible parts are locally refined. - -\exercise{Multiple Sequence Alignment}{ -\exstep{ Close all windows and open the alignment at {\sf -http://www.jalview.org/tutorial/unaligned.fa}. Select {\sl -Web Service $\Rightarrow$ Alignment $\Rightarrow$ Muscle with Defaults}. -A window will open giving the job status. After a short time, a second window will open - with the results of the alignment.} - \exstep{Return to the first sequence alignment window by clicking on - the window, and repeat using Clustal and MAFFT (from the {\sl Web - Service $\Rightarrow$ Alignment} menu) on the same initial alignment. Compare them and - you should notice small differences. } -\exstep{Select the last three sequences in the MAFFT alignment, and de-align them -with {\sl Edit $\Rightarrow$ Remove All Gaps}. Press [ESC] to deselect them and then -submit the view for re-alignment with Clustal.} -\exstep{Use [CTRL]-Z to recover the alignment of the last three sequences in the MAFFT alignment. -Once the Clustal re-alignment has completed, compare the results of re-alignment of the -three sequences with their alignment in the original MAFFT result.} -\exstep{Select columns 60 to 125 in the original MAFFT alignment and hide them. -Select {\sl Web Services $\Rightarrow$ Alignment $\Rightarrow$ Mafft with Defaults} to -submit the visible portion of the alignment to MAFFT. When the web service job pane appears, -note that there are now two alignment job status panes shown in the window.} -\exstep{When the MAFFT job has finished, compare the alignment of the N-terminal visible -region in the result with the corresponding region of the original alignment. If you wish, -select and hide a few more columns in the N-terminal region, and submit the alignment to the -service again and explore the effect of local alignment on the non-homologous parts of the -N-terminal region.} -} - - -\subsection{Customising the Parameters used for Alignment} - -JABA web services allow you to vary the parameters used when performing a -bioinformatics analysis. For JABA alignment services, this means you are -usually able to modify the following types of parameters: -\begin{list}{$\bullet$}{} -\item Amino acid or nucleotide substitution score matrix -\item Gap opening and widening penalties -\item Types of distance metric used to construct guide trees -\item Number of rounds of re-alignment or alignment optimisation -\end{list} - - -\subsubsection{Getting Help on the Parameters for a Service} -Each parameter available for a method usually has a short description, which -Jalview will display as a tooltip, or as a text pane that can be opened under -the parameter's controls. In the parameter shown in Figure -\ref{clustalwparamdetail}, the description was opened by selecting the button on the left hand side. Online help for the -service can also be accessed, by right clicking the button and selecting a URL -from the pop-up menu that will open. - -\begin{figure}[htbp] -\begin{center} -\includegraphics[width=2.5in]{images/clustalwparamdetail.pdf} -\caption{{\bf ClustalW parameter slider detail}. From the ClustalW {\sl Clustal $\Rightarrow$ Edit settings and run ...} dialog box. } -\label{clustalwparamdetail} -\end{center} -\end{figure} - -\subsection{Alignment Presets} -The different multiple alignment algorithms available from JABA vary greatly in -the number of adjustable parameters, and it is often difficult to identify what -are the best values for the sequences that you are trying to align. For these -reasons, each JABA service may provide one or more presets -- which are -pre-defined sets of parameters suited for particular types of alignment -problem. For instance, the Muscle service provides the following presets: -\begin{list}{$\bullet$}{} -\item Large alignments (balanced) -\item Protein alignments (fastest speed) -\item Nucleotide alignments (fastest speed) -\end{list} - -The presets are displayed in the JABA web services submenu, and can also be -accessed from the parameter editing dialog box, which is opened by selecting -the `{\sl Edit settings and run ...}' option from the web services menu. If you have used -a preset, then it will be mentioned at the beginning of the job status file shown -in the web service job progress window. - -\subsubsection{Alignment Service Limits} -Multiple alignment is a computationally intensive calculation. Some JABA server -services and service presets only allow a certain number of sequences to be -aligned. The precise number will depend on the server that you are using to -perform the alignment. Should you try to submit more sequences than a service -can handle, then an error message will be shown informing you of the maximum -number allowed by the server. - -\subsection{User Defined Presets} -Jalview allows you to create your own presets for a particular service. To do -this, select the `{\sl Edit settings and run ...}' option for your service, -which will open a parameter editing dialog box like the one shown in Figure -\ref{jwsparamsdialog}. - -The top row of this dialog allows you to browse the existing presets, and -when editing a parameter set, allows you to change its nickname. As you -adjust settings, buttons will appear at the top of the parameters dialog that -allow you to Revert or Update the currently selected user preset with your changes, Delete the current preset, or Create a new preset, if none exists with the given name. In addition to the parameter set name, you can also provide a short -description for the parameter set, which will be shown in the tooltip for the -parameter set's entry in the web services menu. - -\begin{figure}[htbc] -\center{ -\includegraphics[width=3in]{images/jvaliwsparamsbox.pdf} -\caption{{\bf Jalview's JABA alignment service parameter editing dialog box}.} -\label{jwsparamsdialog} } -\end{figure} - -\subsubsection{Saving Parameter Sets} -When creating a custom parameter set, you will be asked for a file name to save -it. The location of the file is recorded in the Jalview user preferences in the -same way as a custom alignment colourscheme, so when Jalview is launched again, -it will show your custom preset amongst the options available for running the -JABA service. - -% -% \exercise{Creating and using user defined presets}{\label{createandusepreseex} -% \exstep{Import the file at -% \textsf{http://www.jalview.org/tutorial/fdx\_unaligned.fa} into jalview.} -% \exstep{Use the `{\slDiscover Database Ids}' function to recover the PDB cross -% references for the sequences.} -% \exstep{Align the sequences using the default ClustalW parameters.} -% \exstep{Use the `{\sl Edit and run..}' -% option to open the ClustalW parameters dialog box, and create a new preset using -% the following settings: -% \begin{list}{$\bullet$}{} -% \item BLOSUM matrix (unchanged) -% \item Gap Opening and End Gap penalties = 0.05 -% \item Gap Extension and Separation penalties = 0.05 -% \end{list} -% -% As you edit the parameters, buttons will appear on the dialog box -% allowing you revert your changes or save your settings as a new parameter -% set. -% -% Before you save your settings, remeber to give them a meaningful name by editing -% the text box at the top of the dialog box. -% } -% \exstep{Repeat the alignment using your new parameter set by selecting it from -% the {\sl ClustalW Presets menu}.} -% \exstep{These sequences have PDB structures associated with them, so it is -% possible to compare the quality of the alignments. -% -% Use the {\sl View all {\bf N} -% structures} option to calculate the superposition of 1fdn on 1fxd for both -% alignments (refer to section \ref{superposestructs} for instructions). Which -% alignment gives the best RMSD ? } -% \exstep{Apply the same alignment parameter settings to the example alignment -% (available from \textsf{http://www.jalview.org/examples/uniref50.fa}). -% -% Are there differences ? If not, why not ? -% } -% } - -\section{Protein Alignment Conservation Analysis} -\label{aacons} -The {\sl Web Service $\Rightarrow$ Conservation} menu controls the computation -of up to 17 different amino acid conservation measures for the current alignment -view. The JABAWS AACon Alignment Conservation Calculation Service, which is used -to calculate these scores, provides a variety of standard measures described by -Valdar in 2002\footnote{Scoring residue conservation. Valdar (2002) {\sl -Proteins: Structure, Function, and Genetics} {\bf 43} 227-241.} as well as an efficient implementation of the SMERFs -score developed by Manning et al. in 2008.\footnote{SMERFS Score Manning et al. {\sl BMC -Bioinformatics} 2008, {\bf 9} 51 \href{http://dx.doi.org/10.1186/1471-2105-9-51}{doi:10.1186/1471-2105-9-51}} - -\subsubsection{Enabling and Disabling AACon Calculations} -When the AACon Calculation entry in the {\sl Web Services $\Rightarrow$ -Conservation} menu is ticked, AACon calculations will be performed every time -the alignment is modified. Selecting the menu item will enable or disable -automatic recalculation. - -\subsubsection{Configuring which AACon Calculations are Performed} -The {\sl Web Services $\Rightarrow$ Conservation $\Rightarrow$ Change AACon -Settings ...} menu entry will open a web services parameter dialog for the -currently configured AACon server. Standard presets are provided for quick and -more expensive conservation calculations, and parameters are also provided to -change the way that SMERFS calculations are performed. -AACon settings for an alignment are saved in Jalview projects along with the -latest calculation results. - -\subsubsection{Changing the Server used for AACon Calculations} -If you are working with alignments too large to analyse with the public JABAWS -server, then you will most likely have already configured additional JABAWS -servers. By default, Jalview will chose the first AACon service available from -the list of JABAWS servers available. If available, you can switch to use -another AACon service by selecting it from the {\sl Web Services $\Rightarrow$ -Conservation $\Rightarrow$ Switch Server} submenu. - -% TODO -\section{Protein Secondary Structure Prediction} -\label{protsspredservices} -Protein secondary structure prediction is performed using the -Jpred\footnote{{\sl ``The Jpred 3 Secondary Structure Prediction Server''} Cole, C., Barber, J. D. and Barton, G. J. (2008) {\sl Nucleic Acids Research} {\bf 36}, (Web Server Issue) W197-W201 - -{\sl ``Jpred: A Consensus Secondary Structure Prediction Server''} Cuff, J. A., -Clamp, M. E., Siddiqui, A. S., Finlay, M. and Barton, G. J. (1998) {\sl -Bioinformatics} {\bf 14}, 892-893} server at the University of -Dundee\footnote{http://www.compbio.dundee.ac.uk/www-jpred/}. The behaviour of -this calculation depends on the current selection: -\begin{list}{$\circ$}{} -\item If nothing is selected, Jalview will check the length of each alignment row to determine if the visible sequences in the view are aligned. -\begin{list}{-}{} - \item If all rows are the same length (often due to the - application of the {\sl Edit $\Rightarrow$ Pad Gaps} option), then - a JPred prediction will be run for the first sequence in the - alignment, using the current alignment as the profile to use for prediction. - \item Otherwise, just the first sequence will be submitted for a - full JPred prediction. -\end{list} -\item If just one sequence (or a region in one sequence) has been selected, it -will be submitted to the automatic JPred prediction server for homolog detection -and prediction. -\item If a set of sequences are selected, and they appear to be aligned using -the same criteria as above, then the alignment will be used for a JPred -prediction on the first sequence in the set (that is, the one that appears first in the alignment window). -\end{list} -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}\footnote{JNet is the Neural Network based -secondary structure prediction method that the JPred server uses.} from the -alignment window menu (Figure \ref{jpred}). -A status window opens to inform you of the progress of the job. Upon completion, a new alignment window opens and the Jpred -predictions are included as annotations. Consult the Jpred documentation for -information on interpreting these results. - -\begin{figure}[htbp] -\begin{center} -\includegraphics[width=2.25in]{images/jpred1.pdf} -\includegraphics[width=3in]{images/jpred2.pdf} -\caption{{\bf Secondary Structure Prediction} Status (left) and results (right) windows for JNet predictions. } -\label{jpred} -\end{center} -\end{figure} +Section \ref{featannot} describes the mechanisms provided by Jalview for +interactive creation of sequence and alignment annotation, and how they can be +displayed, imported and exported and used to reorder the alignment. Section +\ref{featuresfromdb} discusses the retrieval of database references and +establishment of sequence coordinate systems for the retrieval and display of +features from databases and DAS annotation services. Section +\ref{workingwithnuc} describes functions and visualization techniques relevant +to working with nucleotide sequences, coding region annotation and nucleotide +sequence alignments. +% and Section \ref{workingwithrna} covers the visualization, +% editing and analysis of RNA secondary structure. -\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 can produce different results. In some cases, these secondary structure predictions can be more reliable for sequence on either side of the insertion\footnote{This, of course, cannot be guaranteed.}. Prediction results returned from the service will -be mapped back onto the visible parts of the sequence, to ensure a single frame -of reference is maintained in your analysis. +\section{Working with Structures} +\label{wkwithstructure} +Jalview facilitates the use of protein structures for the analysis of alignments +by providing a linked view of structures associated with sequences in +the alignment. The Java based molecular viewing program Jmol\footnote{See the +Jmol homepage \url{http://www.jmol.org} for more information.} has been +incorporated\footnote{Earlier versions of Jalview included MCView - a simple +main chain structure viewer. Structures are visualized as an alpha carbon trace +and can be viewed, rotated and coloured in a structure viewer and the results +interpreted on a sequence alignment.} which enables sophisticated molecular +visualizations to be prepared and investigated alongside an analysis of +associated sequences. +PDB format files can be imported directly or structures can be retrieved from +the European Protein Databank (PDBe) using the Sequence Fetcher (see +\ref{fetchseq}). -\exercise{Secondary Structure Prediction}{ -\label{secstrpredex} -\exstep{ Open the alignment at \url{http://www.jalview.org/tutorial/alignment.fa}. Select the sequence {\sl FER\_MESCR} by clicking on the sequence ID. Then select {\sl Web Services $\Rightarrow$ Secondary Structure Prediction $\Rightarrow$ JNet Secondary Structure Prediction} from the alignment window menu. A status window will appear and after some time (about 2-4 min) a new window with the JPred prediction will appear. Note that the number of sequences in the results window is many more than in the original alignment as JNet performs a PSI-BLAST search to expand the prediction dataset. -} -% TODO: check how long this takes - about 2 mins once it gets on the cluster. -\exstep{ -Select a different sequence and perform a JNet prediction in the same way. There will probably be minor differences in the predictions. -} -\exstep{ -Select the second sequence prediction, and copy and paste it into the first -prediction window. You can now compare the two predictions. Jnet secondary structure prediction annotations are examples of {\bf sequence-associated alignment annotation}. -% which is described in Section \ref{seqassocannot} below. +\subsection{Automatic Association of PDB Structures with Sequences} +Jalview can automatically determine which structures are associated with a +sequence in a number of ways. +\subsubsection{Discovery of PDB IDs from Sequence Database Cross-references} +If a 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 Structure $\Rightarrow$ +Associate Structure with Sequence $\Rightarrow$ Discover PDB IDs } from the context menu (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 $\Rightarrow$ 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} +%TODO fix formatting +\parbox{1.5in}{ +{\centering +\begin{center} +\includegraphics[width=1.5in]{images/auto1.pdf} +\end{center}} +} \parbox{3.25in}{ +{\centering +\begin{center} +\includegraphics[scale=0.5]{images/auto2.pdf} +\end{center} } -\exstep{ -Select and hide some columns in one of the profiles that were returned from the JNet service, and then submit the profile for prediction again. +} \parbox{1.5in}{ +{\centering +\begin{center} +\includegraphics[width=1.5in]{images/auto3.pdf} +\end{center} } -\exstep{ -When you get the result, verify that the prediction has not been made for the -hidden parts of the profile, and that the JPred reliability scores differ from the prediction made on the full profile. - -{\sl Note: you may want to keep this data for use in exercise \ref{viewannotfileex}.} } -\exstep{ -In the original alignment that you loaded in step 1, {\bf select all} sequences, -then open the {\bf Sequence ID $\Rightarrow$ Selection } submenu and select the -{\bf Add Reference Annotation} option. - -The JNet predictions for the sequences should now be visible in the original -alignment.} } -\section{Protein Disorder Prediction} -\label{protdisorderpred} +\caption{{\bf Automatic PDB ID discovery.} The tooltip (left) indicates that no PDB structure has been associated with the sequence. +After PDB ID discovery (center) the tool tip now indicates the Uniprot ID and +any associated PDB structures (right).} +\label{auto} +\end{center} +\end{figure} -Disordered regions in proteins were classically thought to correspond to -``linkers'' between distinct protein domains, but disorder can also play a role in -function. The {\sl Web Services $\Rightarrow$ Disorder} menu in the alignment window -allows access to protein disorder prediction services provided by the configured -JABAWS servers. +\subsubsection{Drag-and-Drop Association of PDB Files with Sequences by Filename +Match} +\label{multipdbfileassoc} +If one or more PDB files stored on your computer are dragged from their location +on the file browser onto an alignment window, Jalview will search the alignment +for sequences with IDs that match any of the files dropped onto the alignment. +If it discovers matches, a dialog like the one in Figure +\ref{multipdbfileassocfig} is shown, giving the option of creating associations +for the matches. -\subsection{Disorder Prediction Results} -Each service operates on sequences in the alignment to identify regions likely -to be unstructured or flexible, or alternately, fold to form globular domains. -As a consequence, disorder predictor results include both sequence features and -sequence associated alignment annotation rows. Section \ref{featannot} describes -the manipulation and display of these data in detail, and {\bf Figure -\ref{alignmentdisorder}} demonstrates how sequence feature shading and -thresholding (described in Section \ref{featureschemes}) can be used to -highlight differences in disorder prediction across aligned sequences. +If no associations are made, then sequences extracted +from the structure will be simply added to the alignment. However, if only +some of the PDB files are associated, Jalview will raise another dialog box +giving you the option to add any remaining sequences from the PDB structure files not present in +the alignment. This allows you to easily decorate sequences in a newly imported +alignment with any corresponding structures you've already collected in a directory +accessible from your computer.\footnote{We plan to extend this facility in +future so Jalview will automatically search for PDB files matching your +sequence within a local directory. Check out +\href{http://issues.jalview.org/browse/JAL-801}{Jalview issue 801}} +% there is no mention of the other footnote (#3) that appears saying: Tip: The sequence ID tooltip can often become large for heavily cross-referenced sequence IDs. Use the ... +% JBP: yes there is - under 'Discovery of ' subsection. \begin{figure}[htbp] \begin{center} -\includegraphics[width=5in]{images/disorderpred.pdf} -\caption{{\bf Shading alignment by sequence disorder}. Alignment of Interleukin IV homologs coloured with Blosum62 with protein disorder prediction sequence features overlaid, shaded according to their score. Borderline disordered regions appear white, reliable predictions are either Green or Brown depending on the type of disorder prediction. } -\label{alignmentdisorder} +\includegraphics[]{images/pdbdragdropassoc.pdf} + +\caption{{\bf Associating PDB files with sequences by drag-and-drop.} Dragging +PDB files onto an alignment of sequences with names matching the dragged files +names (A), results in a dialog box (B) that gives the option to associate each +file with any sequences with matching IDs. } +\label{multipdbfileassocfig} \end{center} \end{figure} -\subsubsection{Navigating Large Sets of Disorder Predictions} -{\bf Figure \ref{alignmentdisorderannot}} shows a single sequence annotated with -a range of disorder predictions. Disorder prediction annotation rows are -associated with a sequence in the same way as secondary structure prediction -results. When browsing an alignment containing large numbers of disorder -prediction annotation rows, clicking on the annotation row label will highlight -the associated sequence in the alignment display, and double clicking will -select that sequence. +\subsection{Viewing Structures} +\label{viewAllStructures} +The structure viewer can be launched in two ways from the sequence ID context +menu. To view a particular structure associated with a sequence in the +alignment, simply select it from popup menu's associated structures submenu in +{\sl Structure $\Rightarrow$ View Structure $\Rightarrow$ $<$PDB ID$>$}. The +second way is most useful if you want to view all structural data available for +a set of sequences in an alignment. If any of the {\bf currently selected} +sequences have structures associated, the {\sl Structure } submenu of the +sequence ID popup menu will include an option to {\sl View {\bf N} +structures}. Selecting this option will open a new structure view containing +the associated structures superposed according to the alignment. + +In both cases, each structure to be displayed will be downloaded or loaded from +the local file system, and shown as a ribbon diagram coloured according to the +associated sequence in the current alignment view (Figure \ref{structure} +(right)). The structure can be rotated by clicking and dragging in the structure +window. The structure can be zoomed using the mouse scroll wheel or by +[SHIFT]-dragging the structure. +Moving the mouse cursor over a sequence to which the structure is linked in the +alignment view highlights the respective residue's sidechain atoms. The +sidechain highlight may be obscured by other parts of the molecule. Similarly, +moving the cursor over the structure shows a tooltip and highlights the +corresponding residue in the alignment. Clicking the alpha carbon or phosphorous +backbone atom will toggle the highlight and residue label on and off. Often, the +position highlighted in the sequence may not be in the visible portion of the +current alignment view and the sliders will scroll automatically to show the +position. If the alignment window's {\sl View $\Rightarrow$ Automatic Scrolling +} option is not selected, however, then the automatic adjustment will be +disabled for the current view. \begin{figure}[htbp] \begin{center} -\includegraphics[width=5in]{images/disorderpredannot.pdf} -\caption{{\bf Annotation rows for several disorder predictions on a sequence}. A -zoomed out view of a prediction for a single sequence. The sequence is shaded to highlight disordered regions (brown and grey), and the line plots below the Sequence show the raw scores for various disorder predictors. Horizontal lines on each graph mark the level at which disorder predictions become significant. } -\label{alignmentdisorderannot} +\parbox{3in}{ +{\centering +\begin{center} +\includegraphics[scale=0.5]{images/structure1.pdf} +\end{center} +} +} +\parbox{3.2in}{ +{\centering +\begin{center} +\includegraphics[width=3in]{images/structure2.pdf} +\end{center} +} +} +\caption{{\bf Structure visualization} The structure viewer is launched from the sequence ID context menu (left) and allows the structure to be visualized using the embedded Jmol molecular viewer (right). } +\label{structure} \end{center} \end{figure} +\subsection{Customising Structure Display} -\subsection{Disorder Predictors provided by JABAWS 2.0} -For full details of each predictor and the results that Jalview can display, -please consult -\href{http://www.jalview.org/help/html/webServices/proteinDisorder.html}{Jalview's -protein disorder service documentation}. Short descriptions of the methods provided in JABAWS 2.0 are given below: - -\subsubsection{DisEMBL} -\href{http://dis.embl.de/}{DisEMBL (Linding et al., 2003)} is a set of machine-learning based predictors trained to -recognise disorder-related annotation found on PDB structures. - -\textbf{COILS} Predicts -loops/coils according to DSSP -definitions\footnote{DSSP Classifications of secondary structure are: $\alpha$-helix (H), 310-helix (G), $\beta$-strand (E) -are ordered, and all other states ($\beta$-bridge (B), $\beta$-turn (T), bend (S), -$\pi$-helix (I), and coil (C)) considered loops or coils.}. Features mark range(s) of -residues predicted as loops/coils, and annotation row gives raw value -for each residue. Value over 0.516 indicates loop/coil. - -\textbf{HOTLOOPS} constitute a refined subset of \textbf{COILS}, namely those loops with -a high degree of mobility as determined from C$\alpha$ temperature factors (B -factors). It follows that highly dynamic loops should be considered -protein disorder. Features mark range(s) of residues predicted to -be hot loops and annotation row gives raw value for each -residue. Values over 0.6 indicates hot loop. - -\textbf{REMARK465} ``Missing -coordinates in X-ray structure as defined by remark465 entries in PDB. -Nonassigned electron densities most often reflect intrinsic disorder, -and have been used early on in disorder prediction.'' Features give -range(s) of residues predicted as disordered, and annotation rows gives -raw value for each residue. Values over 0.1204 indicates disorder. - -\subsubsection{RONN {\sl a.k.a.} Regional Order Neural Network} -\href{http://www.strubi.ox.ac.uk/RONN}{RONN} employs an approach -known as the `bio-basis' method to predict regions of disorder in -sequences based on their local similarity with a gold-standard set of -disordered protein sequences. It yields a set of disorder prediction -scores, which are shown as sequence annotation below the alignment. - -\textbf{JRonn}\footnote{JRonn denotes the score for this server because JABAWS -runs a Java port of RONN developed by Peter Troshin and distributed as -part of \href{http://www.biojava.org/}{Biojava 3}} Annotation Row gives RONN score for each residue in -the sequence. Scores above 0.5 identify regions of the protein likely -to be disordered. - -\subsubsection{IUPred} -\href{http://iupred.enzim.hu/Help.php}{IUPred} employs -an empirical model to estimate likely regions of disorder. There are -three different prediction types offered, each using different -parameters optimized for slightly different applications. It provides -raw scores based on two models for predicting regions of `long -disorder' and `short disorder'. A third predictor identifies regions -likely to form structured domains. - -\textbf{Long disorder} Annotation rows predict -context-independent global disorder that encompasses at least 30 -consecutive residues of predicted disorder. A 100 residue -window is used for calculation. Values above 0.5 indicates the residue is -intrinsically disordered. - -\textbf{Short disorder} Annotation rows predict for short, (and -probably) context-dependent, disordered regions, such as missing -residues in the X-ray structure of an otherwise globular protein. -Employs a 25 residue window for calculation, and includes adjustment -parameter for chain termini which favors disorder prediction at the -ends. Values above 0.5 indicate short-range disorder. - -\textbf{Structured domains} are marked with sequence Features. These highlight -likely globular domains useful for structure genomics investigation. Post-analysis of disordered region profile to find continuous regions -confidently predicted to be ordered. Neighbouring regions close to -each other are merged, while regions shorter than the minimal domain -size of at least 30 residues are ignored. - -\subsubsection{GLOBPLOT} -\href{http://globplot.embl.de/}{GLOBPLOT} defines regions of -globularity or natively unstructured regions based on a running sum of -the propensity of residues to be structured or unstructured. The -propensity is calculated based on the probability of each amino acid -being observed within well defined regions of secondary structure or -within regions of random coil. The initial signal is smoothed with a -Savitzky-Golay filter, and its first order derivative -computed. Residues for which the first order derivative is positive -are designated as natively unstructured, whereas those with negative -values are structured. +Structure display can be modified using the {\sl Colour} and {\sl View} menus +in the structure viewer. The background colour can be modified by selecting the +{\sl Colours $\Rightarrow$ Background Colour\ldots} option. -{\bf Disordered region} sequence features are created marking mark range(s) of residues with positive first order derivatives, and -\textbf{Globular Domain} features mark long stretches of order. \textbf{Dydx} annotation rows gives the first order derivative of smoothed score. Values above 0 indicates -residue is disordered. +By default, the structure will be coloured in the same way as the associated +sequence(s) in the alignment view from which it was launched. The structure can +be coloured independently of the sequence by selecting an appropriate colour +scheme from the {\sl Colours} menu. It can be coloured according to the +alignment using the {\sl Colours $\Rightarrow$ By Sequence } option. The image +in the structure viewer can be saved as an EPS or PNG with the {\sl File +$\Rightarrow$ Save As $\Rightarrow$ \ldots} submenu, which also allows the raw +data to be saved as PDB format. The mapping between the structure and the +sequence (How well and which parts of the structure relate to the sequence) can +be viewed with the {\sl File $\Rightarrow$ View Mapping} menu option. -\textbf{Smoothed Score and Raw Score} annotation rows give the smoothed and raw scores used to create the differential signal that -indicates the presence of unstructured regions. These are hidden -by default, but can be shown by right-clicking on the alignment -annotation panel and selecting \textbf{Show hidden annotation}. +\subsubsection{Using the Jmol Visualization Interface } -\exercise{Protein Disorder Prediction}{ -\label{protdispredex} +Jmol has a comprehensive set of selection and visualization functions that are +accessed from the Jmol popup menu (by right-clicking in the Jmol window or by +clicking the Jmol logo). Molecule colour and rendering style can be manipulated, +and distance measurements and molecular surfaces can be added to the view. It +also has its own ``Rasmol\footnote{See \url{http://www.rasmol.org}}-like'' scripting +language, which is described elsewhere\footnote{Jmol Wiki: +\url{http://wiki.jmol.org/index.php/Scripting} -\exstep{Open the alignment at -\url{http://www.jalview.org/tutorial/interleukin7.fa}. } also available at +Jmol Scripting reference: +\url{http://www.stolaf.edu/academics/chemapps/jmol/docs/}}. Jalview utilises the +scripting language to interact with Jmol and to store the state of a Jmol +visualization within Jalview archives, in addition to the PDB data file +originally loaded or retrieved by Jalview. To access the Jmol scripting +environment directly, use the {\sl Jmol $\Rightarrow$ Console} menu option. +If you would prefer to use Jmol to manage structure colours, then select the +{\sl Colours $\Rightarrow$ Colour with Jmol} option. This will disable any +automatic application of colour schemes when new structure data is added, or +when associated alignment views are modified. -\url{http://www.jalview.org/tutorial/training-materials/2014/Dundee/Oct/interleukin7.fa} -\exstep{Run the DisEMBL disorder predictor {\slvia} the {\slWeb Services -$\Rightarrow$ Disorder Prediction } submenu.} +\exercise{Viewing Structures}{\label{viewingstructex} +\exstep{Load the alignment at +\textsf{http://www.jalview.org/examples/exampleFile.jar}. Right-click on the +sequence ID label of {\sl FER1\_SPIOL}, this brings up +the context menu. Select {\sl FER1\_SPIOL $\Rightarrow$ Structure $\Rightarrow$ +Associate Structure with Sequence $\Rightarrow$ Discover +PDB IDs}. Jalview will now attempt to find PDB structures for the sequences in +the alignment. +% JBP Note: Bug JAL-1238 needs to be fixed ASAP -\exstep{Use {\sl Sequence ID $\Rightarrow$ Structure $\Rightarrow$ Discover PDB -IDs} to retrieve all the PDB structures for the sequences.} +{\bf Note:} If you are using Jalview v2.8 - use the {\sl Uniprot } source from the {\sl Web services $\Rightarrow$ Fetch DB References $\Rightarrow$ ..} submenu of the Alignment Window to retrieve the PDB IDs. } +\exstep{ Right-click on the sequence ID for {\sl FER1\_SPIOL}. +Select { \sl FER1\_SPIOL $\Rightarrow$ Structure $\Rightarrow$ View Structure +$\Rightarrow$ 1A70}. A structure viewing window appears. Rotate the molecule by clicking and dragging in the structure viewing box. Zoom with the mouse scroll wheel. } \exstep{Roll the mouse cursor along the {\sl FER1\_SPIOL} sequence in the alignment. Note that if a residue in the sequence maps to one in the structure, a label will appear next to that residue in the structure viewer. Move the mouse over the structure. Placing the mouse over a part of the structure will bring up a tool tip indicating the name and number of that residue. The corresponding residue in the sequence is highlighted in black. Clicking the alpha carbon toggles the highlight and residue label on and off. Try this by clicking on a set of three or four adjacent residues so that the labels are persistent, then finding where they are in the sequence. } +\exstep{Select {\sl Colours $\Rightarrow$ Background Colour\ldots} from the structure viewer menu and choose a suitable colour. Press OK to apply this. Select {\sl File $\Rightarrow$ Save As $\Rightarrow$ PNG} and save the image. View this with a suitable program. } +\exstep{Select {\sl File $\Rightarrow$ View Mapping} from the structure viewer menu. A new window opens showing the residue by residue alignment between the sequence and the structure.} +\exstep{Select {\sl File $\Rightarrow$ Save $\Rightarrow$ PDB file} and choose a new filename to save the PDB file. Once the file is saved, open the location in your file browser (or explorer window) and drag the PDB file that you just saved on to the Jalview desktop (or load it from the {\sl Jalview Desktop $\Rightarrow$ Input Alignment $\Rightarrow$ From File } menu). Verify that you can open and view the associated structure from the sequence ID pop-up menu's {\sl Structure } submenu in the new alignment window.} -\exstep{Open and align -the structures for all sequences. +\exstep{Right click on the structure in the submenu and bring up the Jmol +window. +Explore the menu options. Try to change the style of molecular display - by first using the {\sl Jmol $\Rightarrow$ Select (n) $\Rightarrow$ All} command (where {\sl n} is the number of residues selected), and then the {\sl Jmol $\Rightarrow$ Style $\Rightarrow$ Scheme $\Rightarrow$ Ball and Stick} command.} \exstep{Use the {\sl File $\Rightarrow$ Save As .. } function to save the alignment as a Jalview Project. Now close the alignment and the structure view, and load the project file you just saved. -{\sl Hint: see \ref{viewAllStructures} to see how to do this.}} +Verify that the Jmol display is as it was when you just saved the file.} +} -\exstep{Compare the disorder predictions to the structure data by mapping any -available temperature factors to the alignment {\sl via} the {\sl Sequence ID -Popup $\Rightarrow$ Selection $\Rightarrow$ Add reference annotation} option.} +\subsection{Superimposing Structures} +\label{superposestructs} +Many comparative biomolecular analysis investigations aim to determine if the +biochemical properties of a given molecule are significantly different to its +homologues. When structure data is available, comparing the shapes of molecules +by superimposing them enables substructure that may impart different behaviour +to be quickly identified. The identification of optimal 3D superpositions +involves aligning 3D data rather than sequence symbols, but the result can +still be represented as a sequence alignment, where columns indicate positions +in each molecule that should be superposed to recreate the optimal 3D alignment. -\exstep{Apply the IUPred disorder prediction method} -\exstep{Use the {\sl Per -sequence option} in the {\sl Colour $\Rightarrow$ By annotation \ldots} dialog to shade -the sequences by the long and short disorder predictors. -Do the two methods agree with the structure ?}} +Jalview can employ Jmol's 3D fitting routines\footnote{See +\href{http://chemapps.stolaf.edu/jmol/docs/?ver=12.2$\#$compare}{http://chemapps.stolaf.edu/jmol/docs/?ver=12.2$\#$compare} +for more information.} to recreate 3D structure superpositions based on the +correspondences defined by one or more sequence alignments involving structures shown in the Jmol display. Superposition based on the currently displayed alignment view happens automatically if a +structure is added to an existing Jmol display using the {\sl Structure +$\Rightarrow$ View PDB Structure $\Rightarrow$ ..}. A new Jmol view containing +superposed structures can also be created using the {\sl Structure +$\Rightarrow$ View all {\bf N} PDB Structures} option (when {\bf {\sl N}} +$>$ 1) if the current selection contains two or more sequences with associated +structures. -\section{Features and Annotation} -\label{featannot} -Features and annotations are additional information that is overlaid on the sequences and the alignment. Generally speaking, annotations are associated with columns in the alignment. Features are associated with specific residues in the sequence. +\subsubsection{Obtaining the RMSD for a Superposition} +The RMSD (Root Mean Square Deviation) is a measure of how similar the structures +are when they are superimposed. Figure \ref{mstrucsuperposition} shows a +superposition created during the course of Exercise \ref{superpositionex}. The +parts of each molecule used to construct the superposition are rendered using +the cartoon style, with other parts of the molecule drawn in wireframe. The Jmol +console, which has been opened after the superposition was performed, shows the +RMSD report for the superposition. +Full information about the superposition is also outputed to the Jalview +console.\footnote{The Jalview Java Console is opened from {\sl Tools +$\Rightarrow$ Java Console} option in the Desktop's menu bar} This output also +includes the precise atom pairs used to superpose structures. -Annotations are shown 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, so as the alignment changes, they change along with it. Conversely, sequence features are properties of the individual sequences, so they do not change with the alignment, but are shown mapped on to specific residues within the alignment. +\subsubsection{Choosing which part of the Alignment is used for Structural +Superposition} Jalview uses the visible part of each alignment view to define +which parts of each molecule are to be superimposed. Hiding a column in a view +used for superposition will remove that correspondence from the set, and will +exclude it from the superposition and RMSD calculation. +This allows the selection of specific parts of the alignment to be used for +superposition. Only columns that define a complete set of correspondences for +all structures will be used for structural superposition, and as a consequence, +the RMSD values generated for each pair of structures superimposed can be +directly compared. -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 JNet (see \ref{jpred} above) can be used to analyse a given sequence or alignment and generate annotation for it. +In order to recompute a superposition after changing a view or editing the +alignment, select the {\sl Jmol $\Rightarrow$ Align sequences } menu option. The {\sl +Jmol $\Rightarrow$ Superpose with ..} submenu allows you to choose which of the +associated alignments and views are to be used to create the set of +correspondences. This menu is useful when composing complex superpositions +involving multi-domain and multi-chain complexes, when correspondences may be +defined by more than one alignment. + +Note that these menu options appear when you have two or more structures in one Jmol viewer. -\subsection{Creating Sequence Features} -Sequence features can be created simply by selecting the area in a sequence (or sequences) to form the feature and selecting {\sl Selection $\Rightarrow$ Create Sequence Feature } from the right-click context menu (Figure \ref{features}). A dialogue box allows the user to customise the feature with respect to name, group, and colour. The feature is then associated with the sequence. Moving the mouse over a residue associated with a feature brings up a tool tip listing all features associated with the residue. \begin{figure}[htbp] \begin{center} -\includegraphics[width=2in]{images/feature1.pdf} -\includegraphics[width=2.5in]{images/feature2.pdf} -\includegraphics[width=1.5in]{images/feature3.pdf} -\caption{{\bf Creating sequence features.} Features can readily be created from selections via the context menu and are then displayed on the sequence. } -\label{features} +\includegraphics[width=5.5in]{images/fdxsuperposition.pdf} +\caption{{\bf Superposition of two ferredoxin structures.} The alignment on the +left was used by Jalview to superpose structures associated with the +FER1\_SPIOL and FER1\_MAIZE sequences in the alignment. Parts of each structure +used for superposition are rendered as a cartoon, the remainder rendered in +wireframe. The RMSD between corresponding positions in the structures before and +after the superposition is shown in the Jmol console.} +\label{mstrucsuperposition} \end{center} \end{figure} -Creation of features from a selection spanning multiple sequences results in the creation of one feature per sequence. -Each feature remains associated with its own sequence. +\exercise{Aligning Structures using the Ferredoxin +Sequence Alignment}{\label{superpositionex} -\subsection{Customising Feature Display} +\exstep{Continue with the Jalview project created in exercise +\ref{viewingstructex}. Use the {\sl Discover PDB IDs} function to retrieve PDB +IDs associated with the FER1\_MAIZE sequence.} +\exstep{Once discovery has completed, use the {\sl +View PDB Structure} submenu to view one of the PDB file associated with +FER1\_MAIZE (eg. 3B2F) +Jalview will give you the option of aligning the structure to the one already +open. To superimpose the structure associated with FER1\_MAIZE with the one +associated with FER1\_SPIOL, press the {\bf Yes} button. -Feature display can be toggled on or off by selecting the {\sl View -$\Rightarrow$ Show Sequence Features} menu option. When multiple features are -present it is usually necessary to customise the display. Jalview allows the -display, colour, rendering order and transparency of features to be modified -{\sl via} the {\sl View $\Rightarrow$ Feature Settings\ldots} menu option. This -brings up a 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}. +{\sl The Jmol view will update to show both structures, and one will be +moved on to the other. If this doesn't happen, use the Align function in the Jmol submenu}} +\exstep{Create a new view on the alignment, and hide all but columns 121 +through to 132.} +\exstep{Use the {\sl Jmol} submenu to +recompute the superposition using just columns 121-132 of the alignment +(The easiest way to achieve this is to select column 121-132 and in the View +menu selected ``All but selected region'' from the Hide options). + +{\sl Note how the molecules shift position when superposed using a short part of +the two structures.}} +\exstep{Compare the initial and final RMSDs for superimposing molecules with +the small section and with the whole alignment. (The RMSD report can be +viewed by right clicking the mouse on Jmol window, and select ``Show" and ``Measurements") Which view do you think give the best 3D +superposition, and why ?} } + +\subsection{Colouring Structure Data Associated with Multiple Alignments and +Views} Normally, the original view from which a particular structure view was +opened will be the one used to colour structure data. If alignments involving +sequences associated with structure data shown in a Jmol have multiple views, Jalview gives you full control +over which alignment, or alignment view, is used to colour the structure +display. Sequence-structure colouring associations are +changed {\sl via} the {\sl View $\Rightarrow$ Colour by ..} menu, which lists all +views associated with data shown in the embedded Jmol view. A tick is shown beside +views currently used as colouring source, and moving the +mouse over each view will bring it to the front of the alignment display, +allowing you to browse available colour sources prior to selecting one. If the +{\sl Select many views} option is selected, then multiple views can be selected as sources for colouring the +structure data. {\sl Invert selection} and {\sl Select all views} options are also provided to quickly change between multi-view selections. + +Note that the {\sl Select many views} option is useful if you have different +views that colour different areas or domains of the alignment. This option is +further explored in Section \ref{complexstructurecolours}. \begin{figure}[htbp] \begin{center} -\includegraphics[width=4in]{images/features4.pdf} -\caption{{\bf Multiple sequence features.} An alignment with JPred secondary structure prediction annotation below it, and many sequence features overlaid onto the aligned sequences. The tooltip lists the features annotating the residue below the mouse-pointer.} +\includegraphics[width=5.5in]{images/mviewstructurecol.pdf} +\caption{{\bf Choosing a different view for colouring a structure display} +Browsing the {\sl View $\Rightarrow$ Colour by ..} menu provides full control +of which alignment view is used to colour structures when the {\sl Colours +$\Rightarrow$ By Sequence} option is selected.} +\label{mviewstructurecol} \end{center} \end{figure} +\subsubsection{Colouring Complexes} +\label{complexstructurecolours} +The ability to control which multiple alignment view is used to colour +structural data is essential when working with data relating to +multidomain biomolecules and complexes. + +In these situations, each chain identified in the structure may have a different +evolutionary history, and a complete picture of functional variation can +only be gained by integrating data from different alignments on the same +structure view. An example of this is shown in Figure +\ref{mviewalcomplex}, based on data from Song et. al.\footnote{Structure of +DNMT1-DNA Complex Reveals a Role for Autoinhibition in Maintenance DNA Methylation. Jikui Song, Olga Rechkoblit, Timothy H. Bestor, and Dinshaw J. Patel. +{\sl Science} 2011 {\bf 331} 1036-1040 +\href{http://www.sciencemag.org/content/331/6020/1036}{DOI:10.1126/science.1195380}} + \begin{figure}[htbp] \begin{center} -\includegraphics[width=4in]{images/features5.pdf} -\caption{{\bf Customising sequence features.} Features can be recoloured, switched on or off and have the rendering order changed. } -\label{custfeat} +\includegraphics[]{images/mchainstructureview.pdf} +\caption{{\bf The biological assembly of Mouse DNA Methyltransferase-1 coloured +by Pfam alignments for its major domains} Alignments for each domain within the +Uniprot sequence DNMT1\_MOUSE have been used to visualise sequence conservation +in each component of this protein-DNA complex. Instructions for recreating this figure are given in exercise \ref{dnmtcomplexex}. } +\label{mviewalcomplex} \end{center} \end{figure} -\subsection{Sequence Feature File Formats} +\exercise{Colouring a Protein Complex to Explore Domain-Domain +Interfaces}{\label{dnmtcomplexex} + +\exstep{Download the PDB file at +\textsf{\url{http://www.jalview.org/tutorial/DNMT1\_MOUSE.pdb}} to your desktop. + +This is the biological unit for PDB ID 3pt6, as identified by the PDBe's PISA +server.} + +\exstep{Launch the Jalview desktop and ensure you have at least 256MB of +free memory available. + +{\sl Use the following webstart link: + +\href{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}{http://www.jalview.org/services/launchApp?jvm-max-heap=1G}.} + +{\sl Alternatively in the Development section of the Jalview web site +(\href{http://www.jalview.org/development/development-builds}{http://www.jalview.org/development/development-builds}) +in the ``latest official build'' row in the table, go to the +``Webstart'' column, click on ``G2''.}} +\exstep{Retrieve the following {\bf full} PFAM alignments: PF02008, PF01426 +(make sure you select the {\sl PFAM {\bf (Full)}} source). These will each be retrieved into their own alignment window.} \exstep{Drag the URL or file of the structure you downloaded in +step 1 onto one of the alignments to associate it with the mouse sequence in +that Pfam domain family.} +\exstep{For every DNMT1\_MOUSE sequence in the alignment, use the sequence +ID popup menu's {\sl Structure} submenu to view the DNMT1\_MOUSE structure for the associated mouse sequence. When given the option, {\bf view all of the structures in the same Jmol viewer}. Check the contents of the {\sl View $\Rightarrow$ Colour by ..} submenu to see what alignments can be used to +colour the sequence.} +\exstep{Repeat the previous two steps for each of +the other alignments. In each case, when performing the `View DNMT1\_MOUSE.pdb' +step, Jalview will ask if you wish to create a new Jmol view. You should +respond `No', {\bf ensuring that each sequence fragment is associated with the same Jmol view}.} +\exstep{Pick a different colourscheme for each alignment, and use the {\sl +Colour by ..} submenu to ensure they are all used to colour the complex shown +in the Jmol window.} +\exstep{The final step needed to reproduce the shading in Figure +\ref{mviewalcomplex} is to use the {\sl Colour $\Rightarrow$ By +Annotation } option in each alignment window to shade the alignment by the +{\bf Conservation} annotation row. This function was described in section +\ref{colourbyannotation}. + +Ensure that you first disable the {\sl View $\Rightarrow$ Show Features} menu option, or you may not see any colour changes in the associated structure. -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. +{\sl Note: Choose a different shading scheme for each +alignment so that the regions of strong physicochemical conservation are highlighted. This +kind of shading will reveal conserved regions of interaction between domains +in the structure.}} +\exstep{Save your work as a Jalview project and verify that it can be opened again by starting another Jalview Desktop instance, and dragging the saved project into the desktop window.} -\exercise{Creating Features}{ -\exstep{Open the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. -We know that the Cysteine residues at columns 97, 102, 105 and 135 are involved in -iron binding so we will create them as features. Navigate to column 97, sequence 1. -Select the entire column by clicking in the ruler bar. Then right-click on the selection -to bring up the context menu and select {\sl Selection $\Rightarrow$ Create Sequence Feature}. -A dialogue box will appear. -} -\exstep{ -Enter a suitable Sequence Feature Name (e.g. ``Iron binding site") in the -appropriate box. Click on the Feature Colour bar to change the colour if -desired, add a short description (``One of four Iron binding Cysteines") and press OK. The features will then appear on the sequences. } \exstep{Roll the mouse cursor over the new features. Note that the position given in the tool tip is the residue number, not the column number. To demonstrate that there is one feature per sequence, clear all selections by pressing [ESC] then insert a gap in sequence 3 at column 95. Roll the mouse over the features and you will see that the feature has moved with the sequence. Delete the gap you created. +% {\sl Note: This exercise relies on new features introduced in Jalview 2.7. If +% you notice any strange behaviour when trying out this exercise, it may be a +% bug (see +% \href{http://issues.jalview.org/browse/JAL-1008}{http://issues.jalview.org/browse/JAL-1008} +% for one relating to highlighting of positions in the alignment window).} } -\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 OK or -Cancel.} } -\subsection{Creating User Defined Annotation} +% TODO +\chapter{Protein Prediction Analysis} +\label{proteinprediction} +\section{Protein Secondary Structure Prediction} +\label{protsspredservices} +Protein secondary structure prediction is performed using the +Jpred\footnote{{\sl ``The Jpred 3 Secondary Structure Prediction Server''} Cole, C., Barber, J. D. and Barton, G. J. (2008) {\sl Nucleic Acids Research} {\bf 36}, (Web Server Issue) W197-W201 -Annotations are properties that apply to the alignment as a whole and are visualized on rows in the annotation panel. -To create a new annotation row, right click on the annotation label panel and select the {\sl Add New Row} menu option (Figure \ref{newannotrow}). A dialogue box appears. Enter the label to use for this row and a new row will appear. +{\sl ``Jpred: A Consensus Secondary Structure Prediction Server''} Cuff, J. A., +Clamp, M. E., Siddiqui, A. S., Finlay, M. and Barton, G. J. (1998) {\sl +Bioinformatics} {\bf 14}, 892-893} server at the University of +Dundee\footnote{http://www.compbio.dundee.ac.uk/www-jpred/}. The behaviour of +this calculation depends on the current selection: +\begin{list}{$\circ$}{} +\item If nothing is selected, Jalview will check the length of each alignment row to determine if the visible sequences in the view are aligned. +\begin{list}{-}{} + \item If all rows are the same length (often due to the + application of the {\sl Edit $\Rightarrow$ Pad Gaps} option), then + a JPred prediction will be run for the first sequence in the + alignment, using the current alignment as the profile to use for prediction. + \item Otherwise, just the first sequence will be submitted for a + full JPred prediction. +\end{list} +\item If just one sequence (or a region in one sequence) has been selected, it +will be submitted to the automatic JPred prediction server for homolog detection +and prediction. +\item If a set of sequences are selected, and they appear to be aligned using +the same criteria as above, then the alignment will be used for a JPred +prediction on the first sequence in the set (that is, the one that appears first in the alignment window). +\end{list} +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}\footnote{JNet is the Neural Network based +secondary structure prediction method that the JPred server uses.} from the +alignment window menu (Figure \ref{jpred}). +A status window opens to inform you of the progress of the job. Upon completion, a new alignment window opens and the Jpred +predictions are included as annotations. Consult the Jpred documentation for +information on interpreting these results. \begin{figure}[htbp] \begin{center} -\includegraphics[width=1.3in]{images/annots1.pdf} -\includegraphics[width=2in]{images/annots2.pdf} -\caption{{\bf Creating a new annotation row.} Annotation rows can be reordered by dragging them to the desired place.} -\label{newannotrow} +\includegraphics[width=2.25in]{images/jpred1.pdf} +\includegraphics[width=3in]{images/jpred2.pdf} +\caption{{\bf Secondary Structure Prediction} Status (left) and results (right) windows for JNet predictions. } +\label{jpred} \end{center} \end{figure} -To create a new annotation, first select all the positions to be annotated on the appropriate row. Right-clicking on this selection brings up the context menu which allows the insertion of graphics for secondary structure ({\sl Helix} or {\sl Sheet}), text {\sl Label} and the colour in which to present the annotation (Figure \ref{newannot}). On selecting {\sl Label} a dialogue box will appear, requesting the text to place at that position. After the text is entered, the selection can be removed and the annotation becomes clearly visible\footnote{When annotating a block of positions, the text can be partly obscured by the selection highlight. Pressing the [ESC] key clears the selection and the label is then visible.}. Annotations can be coloured or deleted as desired. +\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 can produce different results. In some cases, these secondary structure predictions can be more reliable for sequence on either side of the insertion\footnote{This, of course, cannot be guaranteed.}. Prediction results returned from the service will +be mapped back onto the visible parts of the sequence, to ensure a single frame +of reference is maintained in your analysis. -\begin{figure}[htbp] -\begin{center} -\includegraphics[width=2in]{images/annots3.pdf} -\includegraphics[width=2in]{images/annots4.pdf} -\includegraphics[width=2in]{images/annots5.pdf} -\caption{{\bf Creating a new annotation.} Annotations are created from a selection on the annotation row and can be coloured as desired.} -\label{newannot} -\end{center} -\end{figure} +\section{Protein Disorder Prediction} +\label{protdisorderpred} -\exercise{Annotating Alignments}{ -\exstep{Load the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}. -Right-click on the {\sl Conservation} annotation row to -bring up the context menu and select {\sl Add New Row}. A dialogue box will appear asking for {\sl Label for annotation}. -Enter ``Iron binding site" and click OK. A new, empty, row appears. +Disordered regions in proteins were classically thought to correspond to +``linkers'' between distinct protein domains, but disorder can also play a role in +function. The {\sl Web Services $\Rightarrow$ Disorder} menu in the alignment window +allows access to protein disorder prediction services provided by the configured +JABAWS servers. + +\subsection{Disorder Prediction Results} +Each service operates on sequences in the alignment to identify regions likely +to be unstructured or flexible, or alternately, fold to form globular domains. +As a consequence, disorder predictor results include both sequence features and +sequence associated alignment annotation rows. Section \ref{featannot} describes +the manipulation and display of these data in detail, and {\bf Figure +\ref{alignmentdisorder}} demonstrates how sequence feature shading and +thresholding (described in Section \ref{featureschemes}) can be used to +highlight differences in disorder prediction across aligned sequences. + +\exercise{Secondary Structure Prediction}{ +\label{secstrpredex} +\exstep{ Open the alignment at \url{http://www.jalview.org/tutorial/alignment.fa}. Select the sequence {\sl FER\_MESCR} by clicking on the sequence ID. Then select {\sl Web Services $\Rightarrow$ Secondary Structure Prediction $\Rightarrow$ JNet Secondary Structure Prediction} from the alignment window menu. A status window will appear and after some time (about 2-4 min) a new window with the JPred prediction will appear. Note that the number of sequences in the results window is many more than in the original alignment as JNet performs a PSI-BLAST search to expand the prediction dataset. } +% TODO: check how long this takes - about 2 mins once it gets on the cluster. \exstep{ -Navigate to column 97. Move down and on the new annotation row called -``Iron binding site, select column 97. -Right click at this selection and select {\sl Label} from the context menu. -Enter ``Fe" in the box and click OK. Right-click on the selection again and select {\sl Colour}. -Choose a colour from the colour chooser dialogue -and click OK. Press [ESC] to remove the selection. +Select a different sequence and perform a JNet prediction in the same way. There will probably be minor differences in the predictions. } -\exstep{ Select columns 70-77 on the annotation row. Right-click and choose {\sl Sheet} from the - context menu. You will be prompted for a label. Enter ``B" and press OK. A new line showing the - sheet as an arrow appears. The colour of the label can be changed but not the colour of the sheet - arrow. +\exstep{ +Select the second sequence prediction, and copy and paste it into the first +prediction window. You can now compare the two predictions. Jnet secondary structure prediction annotations are examples of {\bf sequence-associated alignment annotation}. +% which is described in Section \ref{seqassocannot} below. } -\exstep{Right click on the title text of annotation row that you just created. -Select {\sl Export Annotation} and, in the {\bf Export Annotation} dialog box that will open, select the Jalview format and click -the [To Textbox] button. - -The format for this file is given in the Jalview help. Press [F1] to open it, and find -the ``Annotations File Format'' entry in the ``Alignment Annotations'' section of the contents -pane. } - -\exstep{Export the file to a text editor and edit the file to change the name of the annotation -row. Save the file and drag it onto the alignment view.} -\exstep{Try to add an additional helix somewhere along the row by editing the file and -re-importing it. -{\sl Hint: Use the {\bf Export Annotation} function to view what helix annotation looks like in -a Jalview annotation file.}} -\exstep{Use the {\sl Alignment Window $\Rightarrow$ File $\Rightarrow$ Export Annotations...} -function to export all the alignment's annotation to a file.} -\exstep{Open the exported annotation in a text editor, and use the {\bf Annotation File Format} -documentation to modify the style of the Conservation, Consensus and Quality annotation rows so -they appear as several lines on a single line graph. -{\sl Hint: You need to change the style of annotation row in the first field of the annotation -row entry in the file, and create an annotation row grouping to overlay the three quantitative -annotation rows.} +\exstep{ +Select and hide some columns in one of the profiles that were returned from the JNet service, and then submit the profile for prediction again. } -\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} -Jalview supports feature retrieval from public databases either directly or {\sl -via} the Distributed Annotation System (DAS\footnote{http://www.biodas.org/}). -It includes built in parsers for Uniprot and ENA (or EMBL) records retrieved -from the EBI. Sequences retrieved from these sources using the sequence fetcher (see -Section \ref{fetchseq}) will already possess features. - -\subsection{Sequence Database Reference Retrieval} -\label{fetchdbrefs} -Jalview maintains a list of external database references for each sequence in -an alignment. These are listed in a tooltip when the mouse is moved over the -sequence ID when the {\sl View $\Rightarrow$ Sequence ID Tooltip $\Rightarrow$ -Show Database Refs } option is enabled. Sequences retrieved using the sequence -fetcher will always have at least one database reference, but alignments -imported from an alignment file generally have no database references. - -\subsubsection{Database References and Sequence Coordinate Systems} - -Jalview displays features in the local sequence's coordinate system which is -given by its `start' and `end'. Any sequence features on the sequence will be -rendered relative to the sequence's start position. If the start/end positions -do not match the coordinate system from which the features were defined, then -the features will be displayed incorrectly. - -\subsubsection{Viewing and Exporting a Sequence's Database Annotation} - -You can export all the database cross references and annotation terms shown in -the sequence ID tooltip for a sequence by right-clicking and selecting the {\sl -[Sequence ID] $\Rightarrow$ Sequence details \ldots} option from the popup menu. -A similar option is provided in the {\sl Selection} sub-menu allowing you to -obtain annotation for the sequences currently selected. - -\parbox[l]{3.4in}{ -The {\sl Sequence Details -\ldots} option will open a window containing the same text as would be shown in -the tooltip window, including any web links associated with the sequence. The -text is HTML, and options on the window allow the raw code to be copied and -pasted into a web page.} -\parbox[c]{3in}{ -\centerline{\includegraphics[width=2.2in]{images/seqdetailsreport.pdf}}} - -\subsubsection{Automatically Discovering a Sequence's Database References} -Jalview includes a function to automatically verify and update each sequence's -start and end numbering against any of the sequence databases that the {\sl -Sequence Fetcher} has access to. This function is accessed from the {\sl -Webservice $\Rightarrow$ Fetch DB References} sub-menu in the Alignment -window. This menu allows you to query either the set of {\sl Standard -Databases}, which includes EMBL, Uniprot, the PDB, 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. +\exstep{ +When you get the result, verify that the prediction has not been made for the +hidden parts of the profile, and that the JPred reliability scores differ from the prediction made on the full profile. -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}). +{\sl Note: you may want to keep this data for use in exercise \ref{viewannotfileex}.} +} +\exstep{ +In the original alignment that you loaded in step 1, {\bf select all} sequences, +then open the {\bf Sequence ID $\Rightarrow$ Selection } submenu and select the +{\bf Add Reference Annotation} option. -\exercise{Retrieving Database References}{ -\exstep{Load the example alignment at http://www.jalview.org/tutorial/alignment.fa} -\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 Refs} option is selected, and then mousing over each sequence's ID.} -\exstep{Use the {\sl Webservice $\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.} -\exstep{Now close all the windows and open the project again, and verify that the database references and sequence features are still present on the alignment} +The JNet predictions for the sequences should now be visible in the original +alignment.} } -\exstep{View the {\sl Sequence details \ldots} report for the FER1\_SPIOL sequence and for the whole alignment. Which sequences have web links associated with them ?} +\begin{figure}[htbp] +\begin{center} +\includegraphics[width=5in]{images/disorderpred.pdf} +\caption{{\bf Shading alignment by sequence disorder}. Alignment of Interleukin IV homologs coloured with Blosum62 with protein disorder prediction sequence features overlaid, shaded according to their score. Borderline disordered regions appear white, reliable predictions are either Green or Brown depending on the type of disorder prediction. } +\label{alignmentdisorder} +\end{center} +\end{figure} -} +\subsubsection{Navigating Large Sets of Disorder Predictions} -\subsection{Retrieving Features {\sl via} DAS} -\label{dasfretrieval} -Jalview includes a client to retrieve features from DAS annotation servers. To -retrieve features, select {\sl View $\Rightarrow$ Feature Settings\ldots} from the alignment window menu. Select the {\sl DAS Settings} tab in the Sequence 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. +{\bf Figure \ref{alignmentdisorderannot}} shows a single sequence annotated with +a range of disorder predictions. Disorder prediction annotation rows are +associated with a sequence in the same way as secondary structure prediction +results. When browsing an alignment containing large numbers of disorder +prediction annotation rows, clicking on the annotation row label will highlight +the associated sequence in the alignment display, and double clicking will +select that sequence. \begin{figure}[htbp] \begin{center} -\includegraphics[width=2.5in]{images/das1.pdf} -\includegraphics[width=2.5in]{images/das2.pdf} -\caption{{\bf Retrieving DAS annotations.} DAS features are retrieved using the {\sl DAS Settings} tab (left) and their display customised using the {\sl Feature Settings} tab (right).} -\label{das} +\includegraphics[width=5in]{images/disorderpredannot.pdf} +\caption{{\bf Annotation rows for several disorder predictions on a sequence}. A +zoomed out view of a prediction for a single sequence. The sequence is shaded to highlight disordered regions (brown and grey), and the line plots below the Sequence show the raw scores for various disorder predictors. Horizontal lines on each graph mark the level at which disorder predictions become significant. } +\label{alignmentdisorderannot} \end{center} \end{figure} -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 labelled box at the top of the panel. +\subsection{Disorder Predictors provided by JABAWS 2.0} +For full details of each predictor and the results that Jalview can display, +please consult +\href{http://www.jalview.org/help/html/webServices/proteinDisorder.html}{Jalview's +protein disorder service documentation}. Short descriptions of the methods provided in JABAWS 2.0 are given below: +\subsubsection{DisEMBL} +\href{http://dis.embl.de/}{DisEMBL (Linding et al., 2003)} is a set of machine-learning based predictors trained to +recognise disorder-related annotation found on PDB structures. -\subsubsection{The Fetch Uniprot IDs Dialog Box} -\label{discoveruniprotids} -If any sources are selected which refer to Uniprot coordinates as their reference system, then you may be asked if you wish to retrieve Uniprot IDs for your sequence. Pressing OK instructs Jalview to verify the sequences against Uniprot records retrieved using the sequence's ID string. This operates in much the same way as the {\sl Web Service $\Rightarrow$ Fetch Database References } function described in Section \ref{fetchdbrefs}. If a sequence is verified, then the start/end numbering will be adjusted to match the Uniprot record to ensure that features retrieved from the DAS source are rendered at the correct position. +\textbf{COILS} Predicts +loops/coils according to DSSP +definitions\footnote{DSSP Classifications of secondary structure are: $\alpha$-helix (H), 310-helix (G), $\beta$-strand (E) +are ordered, and all other states ($\beta$-bridge (B), $\beta$-turn (T), bend (S), +$\pi$-helix (I), and coil (C)) considered loops or coils.}. Features mark range(s) of +residues predicted as loops/coils, and annotation row gives raw value +for each residue. Value over 0.516 indicates loop/coil. -\subsubsection{Rate of Feature Retrieval} -Feature retrieval can take some time if a large number of sources is selected and if the alignment contains a large number of sequences. This is because Jalview only queries a particular DAS source with one sequence at a time, to avoid overloading it. As features are retrieved, they are immediately added to the current alignment view. The retrieved features are shown on the sequence and can be customised as described previously. +\textbf{HOTLOOPS} constitute a refined subset of \textbf{COILS}, namely those loops with +a high degree of mobility as determined from C$\alpha$ temperature factors (B +factors). It follows that highly dynamic loops should be considered +protein disorder. Features mark range(s) of residues predicted to +be hot loops and annotation row gives raw value for each +residue. Values over 0.6 indicates hot loop. +\textbf{REMARK465} ``Missing +coordinates in X-ray structure as defined by remark465 entries in PDB. +Nonassigned electron densities most often reflect intrinsic disorder, +and have been used early on in disorder prediction.'' Features give +range(s) of residues predicted as disordered, and annotation rows gives +raw value for each residue. Values over 0.1204 indicates disorder. -\exercise{Retrieving Features with DAS}{ -\label{dasfeatretrexcercise} -\exstep{Load the alignment at -\textsf{http://www.jalview.org/tutorial/alignment.fa}. Select {\sl View -$\Rightarrow$ Feature Settings \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 netnglyc. Click. -A window may prompt whether you wish Jalview to fetch DAS features. 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 Sequence Feature Settings window. } -\exstep{Move the mouse over the sequence ID panel. -Non-positional features such as literature references and protein localisation predictions are given in the tooltip, below any database cross references associated with the sequence.} -\exstep{Search through the alignment to find a feature with a link symbol next to it. -Right click to bring up the alignment view popup menu, and find a corresponding entry in the {\sl Link } sub menu. } -% TODO this doesn't work ! \includegraphics[width=.3in]{images/link.pdf} +\subsubsection{RONN {\sl a.k.a.} Regional Order Neural Network} +\href{http://www.strubi.ox.ac.uk/RONN}{RONN} employs an approach +known as the `bio-basis' method to predict regions of disorder in +sequences based on their local similarity with a gold-standard set of +disordered protein sequences. It yields a set of disorder prediction +scores, which are shown as sequence annotation below the alignment. -\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 are drawn on top of those below, obscuring them in the alignment view where they overlap. 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. -} +\textbf{JRonn}\footnote{JRonn denotes the score for this server because JABAWS +runs a Java port of RONN developed by Peter Troshin and distributed as +part of \href{http://www.biojava.org/}{Biojava 3}} Annotation Row gives RONN score for each residue in +the sequence. Scores above 0.5 identify regions of the protein likely +to be disordered. -\exstep{Press the {\sl Optimise Order} button. The features will be ordered according to increasing length, placing features that annotate shorter regions of sequence higher on the display stack.} +\subsubsection{IUPred} +\href{http://iupred.enzim.hu/Help.php}{IUPred} employs +an empirical model to estimate likely regions of disorder. There are +three different prediction types offered, each using different +parameters optimized for slightly different applications. It provides +raw scores based on two models for predicting regions of `long +disorder' and `short disorder'. A third predictor identifies regions +likely to form structured domains. -\exstep{Select {\sl File $\Rightarrow$ Export Features\ldots} from the Alignment window. You can choose to export the retrieved features as a GFF file, or Jalview's own Features format. -% TODO: describe working with features files and GFF -} -} +\textbf{Long disorder} Annotation rows predict +context-independent global disorder that encompasses at least 30 +consecutive residues of predicted disorder. A 100 residue +window is used for calculation. Values above 0.5 indicates the residue is +intrinsically disordered. -\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 {\sl Feature Type}'s popup menu, which is opened by -right-clicking the {\sl Feature Type} or {\sl Color} in the {\sl Sequence Feature Settings} dialog box. Two types -of colouring styles are currently supported: the default is quantitative -colouring, which shades each feature based on its score, with the highest -scores receiving the `Max' colour, and the lowest scoring features coloured -with the `Min' colour. Alternately, you can select the `Colour by label' -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. +\textbf{Short disorder} Annotation rows predict for short, (and +probably) context-dependent, disordered regions, such as missing +residues in the X-ray structure of an otherwise globular protein. +Employs a 25 residue window for calculation, and includes adjustment +parameter for chain termini which favors disorder prediction at the +ends. Values above 0.5 indicate short-range disorder. -Graduated feature colourschemes 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. +\textbf{Structured domains} are marked with sequence Features. These highlight +likely globular domains useful for structure genomics investigation. Post-analysis of disordered region profile to find continuous regions +confidently predicted to be ordered. Neighbouring regions close to +each other are merged, while regions shorter than the minimal domain +size of at least 30 residues are ignored. -The feature settings dialog box allows you to toggle between a graduated and -simple feature colourscheme using the pop-up menu for the feature type. When a -graduated scheme is applied, it will be indicated in the colour column for -that feature type - with coloured blocks or text to indicate the colouring -style and a greater than ($>$) or less than ($<$) symbol to indicate when a -threshold has been defined. +\subsubsection{GLOBPLOT} +\href{http://globplot.embl.de/}{GLOBPLOT} defines regions of +globularity or natively unstructured regions based on a running sum of +the propensity of residues to be structured or unstructured. The +propensity is calculated based on the probability of each amino acid +being observed within well defined regions of secondary structure or +within regions of random coil. The initial signal is smoothed with a +Savitzky-Golay filter, and its first order derivative +computed. Residues for which the first order derivative is positive +are designated as natively unstructured, whereas those with negative +values are structured. -\subsection{Using Features to Re-order the Alignment} -\label{featureordering} -The presence of sequence features on certain sequences or in a particular -region of an alignment can quantitatively identify important trends in -the aligned sequences. In this case, it is more useful to -re-order the alignment based on the number of features or their associated scores, rather than simply re-colour the aligned sequences. The sequence feature settings -dialog box provides two buttons: `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 {\sl Feature Type}'s -popup menu. Simply right-click the type's style in the Sequence Feature Settings dialog -box, and select one of the {\sl Sort by Score} and {\sl Sort by Density} -options to re-order the alignment. Finally, if a specific region is selected, -then only features found in that region of the alignment will be used to -create the new alignment ordering. +{\bf Disordered region} sequence features are created marking mark range(s) of residues with positive first order derivatives, and +\textbf{Globular Domain} features mark long stretches of order. \textbf{Dydx} annotation rows gives the first order derivative of smoothed score. Values above 0 indicates +residue is disordered. -% \exercise{Shading and Sorting Alignments using Sequence Features}{ -% \label{shadingorderingfeatsex} -% -% This exercise is currently not included in the tutorial because no DAS servers -% currently exist that yield per-residue features for any Uniprot sequence. -% -% \exstep{Re-load the alignment from \ref{dasfeatretrexcercise}. -% } -% \exstep{Open the -% feature settings panel, and, after first clearing the current -% selection, press the {\em Seq Sort by Density} button a few times.} -% \exstep{Use the DAS fetcher to retrieve the Kyte and Doolittle Hydrophobicity -% scores for the protein sequences in the alignment. -% {\sl Hint: the nickname for the das source is `KD$\_$hydrophobicity'.}} -% \exstep{Change the feature settings so only the hydrophobicity features are -% displayed. Mouse over the annotation and also export and examine the GFF and -% Jalview features file to better understand how the hydrophobicity measurements -% are recorded.} -% \exstep{Apply a {\sl Graduated Colour} to the hydrophobicity annotation to -% reveal the variation in average hydrophobicity across the alignment.} -% \exstep{Select a range of alignment columns, and use one of the sort by feature buttons to order the alignment according to that region's average -% hydrophobicity.} -% \exstep{Save the alignment as a project, for use in exercise -% \ref{threshgradfeaturesex}.} } -% -% \exercise{Shading alignments with combinations of graduated feature -% colourschemes}{ -% \label{threshgradfeaturesex} -% \exstep{Reusing the annotated alignment from exercise -% \ref{shadingorderingfeatsex}, experiment with the colourscheme threshold to -% highlight the most, or least hydrophobic regions. Note how the {\sl Colour} icon for the {\sl Feature Type} changes when you change the threshold type and press OK.} -% \exstep{Change the colourscheme so -% that features at the threshold are always coloured grey, and the most -% hydrophobic residues are coloured red, regardless of the threshold value -% ({\em hint - there is a switch on the dialog to do this for you}).} -% \exstep{Enable the Uniprot {\em chain} annotation in the feature settings -% display and re-order the features so it is visible under the hydrophobicity -% annotation.} -% \exstep{Apply a {\sl Graduated Colour} to the {\em chain} -% annotation so that it distinguishes the different canonical names associated -% with the mature polypeptide chains.} -% \exstep{Export the alignment's sequence features using the Jalview and GFF file formats, to see how the different types of graduated feature -% colour styles are encoded. } -% } +\textbf{Smoothed Score and Raw Score} annotation rows give the smoothed and raw scores used to create the differential signal that +indicates the presence of unstructured regions. These are hidden +by default, but can be shown by right-clicking on the alignment +annotation panel and selecting \textbf{Show hidden annotation}. + +\exercise{Protein Disorder Prediction}{ +%\label{protdispredex} + +\exstep{Open the alignment at +\url{http://www.jalview.org/tutorial/interleukin7.fa}. } also available at + + +\url{http://www.jalview.org/tutorial/training-materials/2014/Dundee/Oct/interleukin7.fa} + +\exstep{Run the DisEMBL disorder predictor {\slvia} the {\slWeb Services +$\Rightarrow$ Disorder Prediction } submenu.} + +\exstep{Use {\sl Sequence ID $\Rightarrow$ Structure $\Rightarrow$ Discover PDB +IDs} to retrieve all the PDB structures for the sequences.} + +\exstep{Open and align +the structures for all sequences. + +{\sl Hint: see \ref{viewAllStructures} to see how to do this.}} + +\exstep{Compare the disorder predictions to the structure data by mapping any +available temperature factors to the alignment {\sl via} the {\sl Sequence ID +Popup $\Rightarrow$ Selection $\Rightarrow$ Add reference annotation} option.} + +\exstep{Apply the IUPred disorder prediction method} +\exstep{Use the {\sl Per +sequence option} in the {\sl Colour $\Rightarrow$ By annotation \ldots} dialog to shade +the sequences by the long and short disorder predictors. +Do the two methods agree with the structure ?}} + +\chapter{DNA and RNA Sequences} +\label{dnarna} \section{Working with DNA} \label{workingwithnuc} Jalview was originally developed for the analysis of protein sequences, but @@ -3814,8 +3581,10 @@ window {\sl View $\Rightarrow$ Features setting} and fetch features for D49489 from the Uniprot reference server, and any additional servers that work with the Uniprot coordinate system.} \exstep{Mouse over the features retrieved, note that they have been mapped onto the coding regions, and in some cases broken into several parts to cover the distinct exons.} -\exstep{Open a new alignment view containing the Uniprot protein product with {\sl Calculate $\Rightarrow$ Get Cross References $\Rightarrow$ Uniprot } and examine the database references and sequence features. Experiment with the interactive highlighting of codon position for each residue. -} +\exstep{Open a new alignment view containing the Uniprot protein product +with {\sl Calculate $\Rightarrow$ Get Cross References $\Rightarrow$ Uniprot } +and examine the database references and sequence features. Experiment with the +interactive highlighting of codon position for each residue.} } % \section{Working with RNA} % \label{workingwithrna} @@ -3858,7 +3627,8 @@ and any additional servers that work with the Uniprot coordinate system.} % \subsection{Working with Modeller files} % \subsection{Using local PDB files} % \section{Pairwise alignments} -\subsection{Working with RNA} + +\section{Working with RNA} Jalview allows the creation of RNA secondary structure annotation, and includes the VARNA secondary structure viewer for the display of RNA base pair diagrams. It also allows the extraction of RNA secondary structure from 3D data when @@ -3939,5 +3709,234 @@ window. Click on different residues and located them in the sequence alignment w } +\chapter{Webservices} +\label{jvwebservices} +The term ``Webservices'' refers to a variety of data exchange +mechanisms based on HTTP.\footnote{HTTP: Hyper-Text Transfer Protocol.} + +\parbox[c]{4.5in}{Jalview can exploit public webservices to access databases +remotely, and also submit data to public services by opening pages with your web browser. These types of +services are `one-way', {\sl i.e.} data is either sent to the webservice or +retrieved from it by Jalview. The desktop application can also interact +with `two-way' remote analysis services in order to offload computationally +intensive tasks to High Performance Computing facilities. Most of these two-way +services are provided by {\bf Ja}va {\bf B}ioinformatics {\bf A}nalysis {\bf +W}eb {\bf S}ervice (JABAWS) servers\footnote{See +http://www.compbio.dundee.ac.uk/jabaws for more information and to download +your own server.}, which provides an easily installable system for performing +a range of bioinformatics analysis tasks. } +\parbox[c]{1.75in}{\includegraphics[width=1.65in]{images/wsmenu.pdf}} + +\subsection{One-Way Web Services} + +There are two types of one way service in Jalview. Database services, +which were introduced in in Section \ref{fetchseq}, provide sequence and +alignment data. They can also be used to add sequence IDs to an alignment +imported from a local file, prior to further annotation retrieval, as described +in Section \ref{featuresfromdb}. A second type of one way service is provided +by Jalview's DAS sequence feature retrieval system, which is described +in Section \ref{dasfretrieval}. +% The final type of one way service are sequence +% and ID submission services. +% exemplified by the `Envision2 Services' provided +% by the ENFIN Consortium\footnote{ENFIN is the European Network for Functional +% INtegration. Please see http://www.enfin.org for more information. }. + +% \subsubsection{One-way submission services} +% Jalview can use the system's web browser to submit sets of sequences and +% sequence IDs to web based applications. Single sequence IDs can be passed to +% a web site using the user definable URL links listed under the {\sl +% Links} submenu of the sequence ID popup menu. These are configured +% in the {\sl Connections} tab of the {\sl Preferences} dialog box. +% +% The Envision 2 services presented in the webservice menu provides are the first +% example of one-way services where multiple sequences or sequence IDs can be +% sent. The {\sl Web service $\Rightarrow$ Envision 2 Services} menu entry +% provides two sub-menus that enable you to submit the sequences or IDs +% associated with the alignment or just the currently selected sequences to one +% of the Envision2 workflows. Selecting any one will open a new browser window on +% the Envision2 web application. The menu entries and their tooltips provide +% details of the Envision2 workflow and the dataset set that will be submitted +% ({\sl i.e.} the database reference type, or associated sequence subset). Please +% note, due to technical limitations, Jalview can currently only submit small +% numbers of sequences to the workflows - if no sequence or ID submissions are +% presented in the submenus, then try to select a smaller number of sequences to +% submit. + +\subsection{Remote Analysis Web Services} +Remote analysis services enable Jalview to use external computational +facilities. There are currently three types of service - multiple sequence +alignment, protein secondary structure prediction, and alignment analysis. +Many of these are provided by JABA servers, which are described at the end of +this section. In all cases, Jalview will construct a job based on the alignment +or currently selected sequences, ask the remote server to run the job, monitor +status of the job and, finally, retrieve the results of the job and display +them. The Jalview user is kept informed of the progress of the job through a +status window. + +Currently, web service jobs and their status windows are not stored in Jalview +Project Files\footnote{This may be rectified in future versions.}, so it is +important that you do not close Jalview whilst a job is running. It is also +essential that you have a continuous network connection in order to +successfully use web services from Jalview, since it periodically checks the +progress of running jobs. + + +\subsection{JABA Web Services for Sequence Alignment and Analysis} +\label{jabaservices} +JABA stands for ``JAva Bioinformatics Analysis'', which is a system developed +by Peter Troshin and Geoff Barton at the University of Dundee for running +computationally intensive bioinformatics analysis programs. A JABA installation +typically provides a range of JABA web services (JABAWS) for use by other +programs, such as Jalview. + +Exercises in the remainder of this section will demonstrate the simplest way of +installing JABA on your computer, and configuring Jalview so it can access the JABA services. If you +need any further help or more information about the services, please go to the +\href{http://www.compbio.dundee.ac.uk/jabaws}{JABAWS home page}. +%% \subsubsection{Aims} +%% \begin{list}{$\bullet$}{} +%% \item Gain experience using the different alignment services provided by +% JABA +%%\item Learn about the way that Jalview stores user presets for JABA services +%%\item Learn how to install JABA services and configure Jalview to access them +%%\end{list} + +\subsection{Changing the Web Services Menu Layout} +\label{changewsmenulayout} +If you are working with a lot of different JABA services, you may wish to change +the way Jalview lays out the web services menu. You can do this from the Web +Services tab of the {\sl Preferences} dialog box. + +\exercise{Changing the Layout of the Web Services Menu}{ +\label{changewsmenulayoutex} +\exstep{Make sure you have loaded an alignment into Jalview, and examine the +current layout of the alignment window's {\sl Web Service} menu.} +\exstep{Open the preferences dialog box and select the web services tab.} +\exstep{Ensure the {\sl Enable JABAWS services} checkbox is selected, and unselect +the {\sl Enable Enfin Services} checkboxes.} +\exstep{Hit {\sl Refresh Services} to update the web services menu -- once the +progress bar has completed, open the {\sl Web Service} menu to view the changes.} +\exstep{Select the {\sl Index by host} checkbox and refresh the services once again. + +{\sl Observe the way the layout of the JABAWS Alignment submenu changes.} +} +\exstep{Do the same with the {\sl Index by type} checkbox.} +} + +Jalview provides these options for configuring the layout of the {\sl Web Service} +menu because different Jalview users may have access to a different number of +JABA services, and each will have their own preference regarding the layout of +the menu. + +\begin{figure}[htbc] +\begin{center} +\includegraphics[width=3in]{images/jvjabawsconfig.pdf} +\caption{{\bf The Jalview Web Services preferences panel.} Options are provided +for configuring the list of JABA servers that Jalview will use, enabling and +disabling Enfin services, and configuring the layout of the web services +menu.} +\label{jvjabawsconfig} +\end{center} +\end{figure} + + +\subsubsection{Testing JABA services} +The JABAWS configuration dialog shown in Figure \ref{jvjabawsconfig} has colour +codes to indicate whether the Desktop can access the server, and whether all +services advertised by the server are functional. The colour codes are: + +\begin{list}{$\bullet$}{} + \item Red - Server cannot be contacted or reports a connection error. + \item Amber - Jalview can connect, but one or more services are non-functional. + \item Green - Server is functioning normally. +\end{list} + %TODO green and a tick, red and a cros, amber and a value indicating whether its all going + +Test results from JABAWS are reported on Jalview's console output (opened from +the Tools menu). Tests are re-run every time Jalview starts, and when the +[Refresh Services] button is pressed on the Jalview JABAWS configuration panel. + +\subsubsection{Resetting the JABA Services Setting to their Defaults} +Once you have configured a JABAWS server and selected the OK button of the +preferences menu, the settings will be stored in your Jalview preferences file, +along with any preferences regarding the layout of the web services menu. If +you should ever need to reset the JABAWS server list to its defaults, use the +`Reset Services' button on the Web Services preferences panel. + +\subsection{Running your own JABA Server} +You can download and run JABA on your own machine using the `VMWare' or +VirtualBox virtual machine environments. If you would like to learn how to do +this, there are full instructions at the +\href{http://www.compbio.dundee.ac.uk/jabaws/}{JABA web site}. + +\exercise{Installing a JABA Virtual Machine on your Computer}{ +\label{jabawsvmex}{\sl This tutorial will demonstrate the simplest way of +installing JABA on your computer, and configuring Jalview so it can access the JABA services. + +{\bf Prerequisites} + +You will need a copy of VMWare Player/Workstation/Fusion on your machine. +} + +\exstep{If you do not have VMWare player installed, download it from +www.vmware.com (this takes a few minutes -- you will need to register and wait +for an email with a download link).} +\exstep{Download the JABA virtual appliance archive called `jaba-vm.zip' from +\textsf{http://www.compbio.dundee.ac.uk/jabaws/archive/jabaws-vm.zip} + +WARNING: This is large (about 300MB) and will take some time to download. +} +\exstep{Unpack the archive's contents to a place on your machine with at least +2GB of free space. + +(On Windows, right click on the archive, and use the 'Extract archive..' option). +} +\exstep{Open the newly extracted directory and double click the VMWare virtual +machine configuration file (jabaws.vcf). This will launch the VMWare player. +} +\exstep{Once VMWare player has started up, it may ask the question ``Did you move or copy +this virtual appliance?'' -- select `Copy'.} +\exstep{You may be prompted to download the VMWare linux tools. These are not +necessary, so close the window or click on `Later'.} +\exstep{You may also be prompted to install support for one or more devices (USB +or otherwise). Say `No' to these options.} +\exstep{Once the machine has loaded, it will display a series of IP addresses +for the different services provided by the VM. Make a note of the JABAWS URL -- +this will begin with `http:' and end with `/jabaws''.} +} + +\exercise{Configuring Jalview to Access your new JABAWS Virtual Appliance}{ +\label{confnewjabawsappl} +\exstep{Start Jalview (If you have not done so already).} +\exstep{Enable the Jalview Java Console by selecting its option from the Tools +menu. + +{\sl Alternately, use the System Java console if you have +configured it to open when Jalview is launched, {\sl via} your system's Java +preferences (under the `Advanced' tab on Windows).}} +\exstep{Open the {\sl Preferences} dialog and locate the Web Services tab.} +\exstep{Add the URL for the new JABAWS server you started in Exercise +\ref{jabawsvmex} to the list of JABAWS urls using the `New Service +URL' button.} +\exstep{You will be asked if you want to test the service. Hit `Yes' to do this +-- you should then see some output in the console window. + +{\sl Take a close look at the output in the console. What do you think is +happening?} +} +\exstep{Hit OK to save your preferences -- you have now added a new JABA +service to Jalview!} +\exstep{Try out your new JABA services by loading the ferredoxin sequences from +http://www.jalview.org/tutorial/alignment.fa} +\exstep{Launch an alignment using one +of the JABA methods provided by your server. It will be listed under the JABAWS Alignment submenu of the {\sl Web Service} menu on the alignment window. + +{\sl Note: You can watch the JABA VM appliance's process working by opening the +process monitor on your system. (On Windows XP, this involves right-clicking the +system clock and opening the task manager -- then selecting the 'Processes' tab +and sort by CPU).} +} +} \end{document}