Jalview Tutorial
Jalview Tutorial
11
1 Basics 1
1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1.1 Jalview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
i
ii CONTENTS
6 Analysis of Alignments 59
6.1 PCA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
6.2 Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
7.3.3 Colouring Structure Data Associated with Multiple Alignments and Views . . . 73
10 Webservices 89
Basics
1.1 Introduction
1.1.1 Jalview
Jalview is a multiple sequence alignment viewer, editor and analysis tool. It is designed to be plat-
form independent (running on Mac, MS Windows, Linux and any other platforms that support Java).
Jalview is capable of editing and analysing large alignments (thousands of sequences) with mini-
mal degradation in performance. It is able to show multiple integrated views of the alignment and
other data. Jalview can read and write many common sequence formats including FASTA, Clustal,
MSF(GCG) and PIR.
There are two types of Jalview program. The Jalview Desktop is a standalone application that
provides powerful editing, visualization, annotation and analysis capabilities. The JalviewLite
applet has the same core visualization, editing and analysis capabilities as the desktop, without
the desktop’s webservice and figure generation capabilities. It is designed to be embedded in a web
page,1 and includes a javascript API to allow customisable display of alignments for web sites such
as Pfam.2
The Jalview Desktop provides access to protein and nucleic acid sequence, alignment and structure
databases, and includes the Jmol3 and Chimera viewer for molecular structures, and the VARNA4
program for the visualization of RNA secondary structure. It also provides a graphical user interface
for the multiple sequence alignment, conservation analysis and protein disorder prediction methods
provided as Java Bioinformatics Analysis Web Services (JABAWS). JABAWS5 is a system for run-
ning bioinformatics programs that you can download and run on your own machine or cluster, or
install on compute clouds.
1 A demonstration version of Jalview (Jalview Micro Edition) also runs on a mobile phone but the functionality is limited
to sequence colouring.
2 http://pfam.xfam.org
3 Provided under the LGPL licence at http://www.jmol.org
4 Provided under GPL licence at http://varna.lri.fr
5 released under GPL at http://www.compbio.dundee.ac.uk/jabaws
1
2 CHAPTER 1. BASICS
Figure 1.1 gives an overview of the main features of the Jalview desktop application. Its primary
function is the editing and visualization of sequence alignments, and their interactive analysis. Tree
building, principal components analysis, physico-chemical property conservation and sequence con-
sensus analyses are built into the program. Web services enable Jalview to access online alignment
and secondary structure prediction programs, as well as to retrieve protein and nucleic acid se-
quences, alignments, protein structures and sequence annotation. Sequences, alignments, trees,
structures, features and alignment annotation may also be exchanged with the local filesystem.
Multiple visualizations of an alignment may be worked on simultaneously, and the user interface
provides a comprehensive set of controls for colouring and layout. Alignment views are dynamically
linked with Jmol and UCSF Chimera6 structure displays, a tree viewer and spatial cluster display,
facilitating interactive exploration of the alignment’s structure. The application provides its own
Jalview project file format in order to store the current state of an alignment and analysis windows.
Jalview also provides WYSIWIG7 style figure generation capabilities for the preparation of align-
ments for publication.
Figure 1.1: Capabilities of the Jalview Desktop. The Jalview Desktop Application provides
a stable environment for the creation, editing and analysis of alignments and the
generation of figures.
6 UCSF Chimera needs to be installed separately. It is available free for academic use from https://www.cgl.ucsf.
edu/chimera/download.html.
7 WYSIWIG: What You See Is What You Get.
1.1. INTRODUCTION 3
Jalview History
Jalview was initially developed in 1996 by Michele Clamp, James Cuff, Steve Searle and Geoff Barton
at the University of Oxford and then the European Bioinformatics Institute. Development of Jalview
2 was made possible with eScience funding from the BBSRC8 in 2004, enabling Andrew Waterhouse
and Jim Procter to re-engineer the original program to introduce contemporary developments in
bioinformatics and take advantage of the latest web and Java technology. Jalview’s development
has been supported from 2009 onwards by BBSRC funding, and since 2014 by a Wellcome Trust
Biomedical Resource grant9 . In 2010, 2011, and 2012, Jalview benefitted from the Google Summer
of Code, when Lauren Lui and Jan Engelhardt introduced new features for handling RNA alignments
and secondary structure annotation, in collaboration with Yann Ponty.10
Citing Jalview
This tutorial is written in a manual format with short exercises where appropriate, typically at
the end of each section. The first few sections concerns the basic operation of Jalview and should
be sufficient for those who want to launch Jalview (Section 1.2), open an alignment (Section 1.4),
perform basic editing (Section 2), colouring (Section 3.1), and produce publication and presentation
quality graphical output (Section 3.2).
The remaining sections of the manual cover the visualization and analysis techniques available
in Jalview. These include working with the embedded Jmol molecular structure viewer (or UCSF
Chimera), building and viewing trees and Principal Components Analysis (PCA) plots, and using
trees for sequence conservation analysis. An overview of the Jalview Desktop’s webservices is given
in Section 10.1, and the alignment and secondary structure prediction services are described in de-
tail in Sections 5 and 8.1 respectively. Section 4 details the creation and visualization of sequence,
features and alignment annotation. Section 9.1 discusses specific features of use when working with
nucleic acid sequences, such as translation and linking to protein coding regions, and the display and
analysis of RNA secondary structure.
8 Biotechnology and Biological Sciences Research Council grant “VAMSAS: Visualization and Analysis of Molecules,
Sequence Alignments and Structures", a joint project to enable interoperability between Jalview, TOPALi and AstexViewer.
9 Wellcome grant number 101651/Z/13/Z
10 http://www.lix.polytechnique.fr/~ponty/
4 CHAPTER 1. BASICS
Typographic Conventions
Keystrokes using the special non-symbol keys are represented in the tutorial by enclosing the pressed
keys with square brackets (e.g. [RETURN] or [CTRL]).
Keystroke combinations are denoted with a ‘-’ symbol (e.g. [CTRL]-C means press [CTRL] and the ‘C’
key simultaneously).
Menu options are given as a path from the menu that contains them. For example File ⇒ Input
Alignment ⇒ From URL means to select the ‘From URL’ option from the ‘Input Alignment’ submenu
of a window’s ‘File’ dropdown menu.
This tutorial is based on the Jalview Desktop application. Much of the information will also be
useful for users of the JalviewLite applet, which has the same core editing, analysis and visualization
1.2. LAUNCHING THE JALVIEW DESKTOP APPLICATION 5
capabilities. The Jalview Desktop, however, is much more powerful, and includes additional support
for interaction with external web services, and production of publication quality graphics.
The Jalview Desktop can be run in two ways; as an application launched from the web via Java
webstart, or as an application loaded onto your hard drive. The webstart version is launched
from the pink ‘Launch Jalview Desktop button’ at the top right hand side of pages of the website
(www.jalview.org). To download the locally installable version, follow the links on the download page
(www.jalview.org/download) (Figure 1.2). These links will launch the latest stable release of Jalview.
When the application is launched with webstart, two dialogs may appear before the application
starts. If your browser is not set up to handle webstart, then clicking the launch link may download
a file that needs to be opened manually, or prompt you to select the program to handle the webstart
file. If that is the case, you will need to locate the javaws program on your system11 . Once java
webstart has been launched, you may also be prompted to accept a security certificate signed by the
Barton Group.12 You can always trust us, so click trust or accept as appropriate. The splash screen
(Figure 1.3) gives information about the version and build date that you are running, information
about later versions (if available), and the paper to cite in your publications. This information is also
available on the Jalview web site at http://www.jalview.org.
When Jalview starts it will automatically load an example alignment from the Jalview site. This
behaviour can be switched off in the Jalview Desktop preferences dialog by unchecking the open file
option. This alignment will look like the one in Figure 1.4 (taken from Jalview version 2.10.1).
Announcements are made available to users of the Jalview Desktop via the Jalview Newsreader.
This window will open automatically when new news is available, and can also be accessed via the
Desktop’s Tools ⇒ Show Jalview News menu entry.
11 The file that is downloaded will have a type of application/x-java-jnlp-file or .jnlp. The javaws program that can
run this file is usually found in the bin directory of your Java installation
12 On some systems, the certificate may be signed by ’UNKNOWN’. In this case, clicking through the dialogs to look at
the detailed information about the certificate should reveal it to be a Barton group certificate.
6 CHAPTER 1. BASICS
Figure 1.5: The Jalview News Reader. The newsreader opens automatically when new arti-
cles are available from the Jalview Desktop’s news channel.
1.2. LAUNCHING THE JALVIEW DESKTOP APPLICATION 7
◦ You may want to move the jalview.jnlp file from your downloads to another folder.
◦ Opening Jalview via the jnlp file will also allow Jalview to be launched offline.
Built in Documentation
Jalview has comprehensive on-line help documentation. Select Help ⇒ Documentation from the
main desktop window menu and a new window will open (Figure 1.6). The appropriate topic can
then be selected from the navigation panel on the left hand side. To search for a specific topic, click
the ‘search’ tab and enter keywords in the box which appears.
Email Lists
The Jalview Discussion list ([email protected]) provides a forum for Jalview users and
developers to raise problems and exchange ideas - any problems, bugs, and requests for help should
be raised here. The [email protected] list can also be subscribed to if you wish to be
kept informed of new releases and developments.
8 CHAPTER 1. BASICS
Archives and mailing list subscription details can be found in the Jalview web site’s community
section.
1.3 Navigation
The major features of the Jalview Desktop are illustrated in Figure 1.7. The alignment window is
the primary window for editing and visualization, and can contain several independent views of the
alignment being worked with. The other windows (Trees, Structures, PCA plots, etc) are linked to a
specific alignment view. Each area of the alignment window has a separate context menu accessed
by clicking the right mouse button.
Jalview has two navigation and editing modes: normal mode, where editing and navigation is
performed using the mouse, and cursor mode where editing and navigation are performed using
the keyboard. The F2 key is used to switch between these two modes.
Note: On MacBooks and other laptops with compact keyboards, you may need to press the function
key [Fn] when pressing any of the numbered function keys. So to toggle between keyboard and
normal mode, press [Fn]-[F2].
Jalview always starts up in Normal mode, where the mouse is used to interact with the displayed
alignment view. You can move about the alignment by clicking and dragging the ruler scroll bar to
1.3. NAVIGATION 9
Desktop Window
Alignment Ruler
Alignment View Tabs
Sequence Alignment
Sequence ID Panel
Alignment Scrollbar
Structure Window
Annotation Label Panel
Alignment Annotation
Status bar
Ruler Scrollbar
Figure 1.7: The anatomy of Jalview. The major features of the Jalview Desktop Application
are labeled.
move horizontally, or by clicking and dragging the alignment scroll bar to the right of the alignment
to move vertically. If all the rows or columns in the alignment are displayed, the scroll bars will not
be visible.
Each alignment view shown in the alignment window presents a window onto the visible regions of
the alignment. This means that with anything more than a few residues or sequences, alignments
can become difficult to visualize on the screen because only a small area can be shown at a time.
Here, it helps, to have an overview of the whole alignment, especially when it is large. Select View
⇒ Overview Window from the Alignment window menu bar (Figure 1.8).
The red box in the overview window shows the current view in the alignment window. A percent
identity histogram is plotted below the alignment overview. Shaded parts indicate rows and columns
of the alignment that are hidden (in this case, a single row at the bottom of the alignment - see
Section 2.5). You can navigate around the alignment by dragging the red box.
Figure 1.8: Alignment Overview Window. The overview window for a view is opened from
the View menu.
Cursor mode navigation enables the user to quickly and precisely navigate,
select and edit parts of an alignment. On pressing F2 to enter cursor mode
the position of the cursor is indicated by a black background and white text.
The cursor can be placed using the mouse or moved by pressing the arrow
keys (↑, ↓, ←, →).
◦ Jump to Sequence n: Type a number n then press [S] to move to sequence (row) n.
◦ Jump to Column n: Type a number n then press [C] to move to column n in the alignment.
◦ Jump to Residue n: Type a number n then press [P] to move to residue number n in the
current sequence.
◦ Jump to column m row n: Type the column number m, a comma, the row number n and
press [RETURN].
A further option for navigation is to use the Select ⇒ Find. . . 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.
1.4. LOADING SEQUENCES AND ALIGNMENTS 11
Exercise 2: Navigation
Jalview has two navigation and editing modes: normal mode (where editing and navigation
are via the mouse) and the cursor mode (where editing and navigation are via the keyboard).
The F2 key is used to switch between these two modes. With a Mac, the key combination
Fn key and F2 is needed, as button is often assigned to screen brightness. Jalview always
starts up in normal mode.
2.a. Load an example alignment from its URL (http://www.jalview.org/examples/
exampleFile_2_7.jar) via the Desktop using File ⇒ Input Alignment ⇒ From URL
dialog box. (The URL should be stored in its history and clicking on the down arrow
on the dialog box is an easy way to access it.)
2.b. Scroll around the alignment using the alignment (vertical) and ruler (horizontal)
scroll bars.
2.c. Find the Overview Window, Views ⇒ Overview Window and open it. Move around
the alignment by clicking and dragging the red box in the overview window.
2.d. Return to the alignment window, look at the status bar (lower left hand corner of the
alignment window) as you move the mouse over the alignment. It indicates informa-
tion about the sequence and residue under the cursor.
2.e. Press [F2] key, or [Fn]-[F2] on Mac, to enter Cursor mode. Use the direction keys to
move the cursor around the alignment.
2.f. Move to sequence 7 by pressing 7 S. Move to column 18 by pressing 1 8 C. Move to
residue 18 by pressing 1 8 P. Note that these can be two different positions if gaps
are inserted into the sequence. Move to sequence 5, column 13 by typing 1 3 , 5
[RETURN].
Note: To view Jalview’s comprehensive on-line help documentations select Help in desktop
menu, clicking on Documentation will open a Documentation window. Select topics from the
navigation panel on the left hand side and use the Search tab to locate specific key words.
See the video at: http://www.jalview.org/Help/Getting-Started.
In most operating systems you can drag a file icon from a file browser window and drop it on an open
Jalview application window. The file will then be opened as a new alignment window. Drag and drop
also works when loading data from a URL - simply drag the link or url from the address panel of
your browser onto an alignment or the Jalview desktop background and Jalview will load data from
the URL directly.
Jalview can read sequence alignments from a sequence alignment file. This is a text file, not a word
processor document. For entering sequences from a wordprocessor document see Cut and Paste
(Section 1.4.4) below. Select File ⇒ Input Alignment ⇒ From File from the main menu (Figure 1.9).
You will then get a file selection window where you can choose the file to open. Remember to select
the appropriate file type. Jalview can automatically identify some sequence file formats.
12 CHAPTER 1. BASICS
Jalview can read sequence alignments directly from a URL. Please note that the files must be in a
sequence alignment format - an HTML alignment or graphics file cannot be read by Jalview. Select
File ⇒ Input Alignment ⇒ From URL from the main menu and a window will appear asking you to
enter the URL (Figure 1.10). Jalview will attempt to automatically discover the file format.
Documents such as those produced by Microsoft Word cannot be readily understood by Jalview. The
way to read sequences from these documents is to select the data from the document and copy it to
the clipboard. There are two ways to do this. One is to right-click on the desktop background, and
select the ‘Paste to new window’ option in the menu that appears. The other is to select File ⇒ Input
Alignment ⇒ From Textbox from the main menu, paste the sequences into the text window that will
appear, and select New Window (Figure 1.11). In both cases, presuming that they are in the right
format, Jalview will happily read them into a new alignment window.
Jalview can retrieve sequences and sequence alignments from the public databases housed at the
European Bioinformatics Institute, including Uniprot, Pfam, Rfam and the PDB. Jalview’s sequence
1.4. LOADING SEQUENCES AND ALIGNMENTS 13
fetching capabilities allow you to avoid having to manually locate and save sequences from a web
page before loading them into Jalview. It also allows Jalview to gather additional metadata provided
by the source, such as annotation and database cross-references.
To begin retrieving data, select File ⇒ Fetch Sequence(s) . . . from the main menu. A window will
then appear (Figure 1.12) showing all the database sources Jalview can access (grouped by the type
of database). Once you’ve selected the appropriate database by double clicking it or hitting OK, the
database selection window will close and the sequence fetcher for that database will appear. You can
then enter one or several database IDs or accession numbers separated by a semicolon and press OK.
Jalview will then attempt to retrieve them from the chosen database. Example queries are provided
for some databases to test that a source is operational, and can also be used as a guide for the type
of accession numbers understood by the source.
Jalview 2.11 and later will automatically maximise the amount of memory available, but if you are
using an earlier version or launching Jalview in a specialised way you may need ensure that you
have allocated enough memory to work with your data. On most occasions, Jalview will warn you
when you have tried to load an alignment that is too big to fit in to memory (for instance, some of
the PFAM alignments are very large). You can find out how much memory is available to Jalview
14 CHAPTER 1. BASICS
with the desktop window’s ⇒ Tools ⇒ 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 Help ⇒ Documentation) and on the JVM memory
parameters page (http://www.jalview.org/jvmmemoryparams.html).
Jalview allows alignments to be saved to file in a variety of formats so they can be restored at a
later date, passed to colleagues or analysed in other programs. From the alignment window menu
select File ⇒ Save As and a dialog box will appear (Figure 1.13). You can navigate to an appropriate
directory in which to save the alignment. Jalview will remember the last filename and format used
to save (or load) the alignment, enabling you to quickly save the file during or after editing by using
the File ⇒ Save entry. The File ⇒ Output To Textbox menu option allows the alignment to be copied
and pasted into other documents or web servers.
Jalview offers several different formats in which an alignment can be saved. Of these, only the
jalview project format (.jar or .jvp) will preserve the colours, groupings and other additional infor-
mation in the alignment. The other formats produce text files containing just the sequences with
no visualization information, although some allow limited annotation and sequence features to be
stored (e.g. AMSA). Unfortunately, as far as we are aware only Jalview can read Jalview project files.
Jalview makes extensive use of selections - most of the commands available from its menus operate
on the currently selected region of the alignment, either to change their appearance or perform some
kind of analysis. This section illustrates how to make and use selections and groups.
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 Edit
⇒ Copy and Edit ⇒ Paste ⇒ To New Alignment in the alignment window menu options. To clear
(unselect) the selection press the [ESC] key.
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 2.1).
To select the same residues in all sequences, click and drag along the alignment ruler. This selects the
entire column of the alignment. Ranges of positions from the alignment ruler can also be selected
by clicking on the first position and then holding down the [SHIFT] key whilst clicking the other
end of the selection. Discontinuous regions can be selected by holding down [CTRL] and clicking
on positions to add to the column selection. Note that each [CTRL]-Click (PC) or [CMD]-Click (Mac)
changes the current selected sequence region to that column, it adds to the column selection. Selected
columns are indicated by red highlighting in the ruler bar (Figure 2.2).
17
18 CHAPTER 2. SELECTING AND EDITING SEQUENCES
Figure 2.2: Selecting multiple columns in an alignment. The red highlighting on the align-
ment ruler marks the selected columns. Note that only the most recently selected
column has a dashed-box around it to indicate a region selection.
2.1. SELECTING PARTS OF AN ALIGNMENT 19
Figure 2.3: Selecting multiple sequences in an alignment. Use [CTRL] or [SHIFT] to select
many sequences at once.
To select multiple complete sequences, click and drag the mouse down the sequence ID panel. The
same techniques can be used as for columns above ([SHIFT]-Click for continuous and [CTRL]-Click
(Or [CMD]-Click for Mac)) to select discontinuous ranges of sequences (Figure 2.3).
To define a selection in cursor mode (which is enabled by pressing [F2] when the alignment window
is selected), navigate to the top left corner of the proposed selection (using the mouse, the arrow
keys, or the keystroke commands described in Section 1.3.2). Pressing the [Q] key marks this as the
corner. A red outline appears around the cursor (Figure 2.4).
Navigate to the bottom right corner of the proposed selection and press the [M] key. This marks the
bottom right corner of the selection. The selection can then be treated in the same way as if it had
been created in normal mode.
Figure 2.4: Making a selection in cursor mode. Navigate to the top left corner (left), press
[Q], navigate to the bottom right corner and press [M] (right).
20 CHAPTER 2. SELECTING AND EDITING SEQUENCES
The current sequence or column selection can be inverted, using Select ⇒ 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 2.5 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 View ⇒ Hide ⇒ Selected Region.
Selections are lost as soon as a different region is selected. Groups can be created which are labeled
regions of the alignment. To create a group, first select the region which is to comprise the group.
Then click the right mouse button on the selection to bring up a context menu. Select Selection ⇒
Group ⇒ Edit name and description of current group1 then enter a name for the group in the dialog
box which appears.
By default the new group will have a box drawn around it. The appearance of the group can be
changed (see Section 3.1 below). This group will stay defined even when the selection is removed.
1 In earlier versions of Jalview, this entry was variously ‘Group’, ‘Edit Group Name’, or ‘JGroupXXXXX’ (Where XXXXX
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 selec-
tion. 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 File ⇒ Save As pulldown menu
option from the text box.
22 CHAPTER 2. SELECTING AND EDITING SEQUENCES
Sequence reordering is simple. Highlight the sequences to be moved then press the up or down arrow
keys as appropriate (Figure 2.6). 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.
Figure 2.6: Reordering the alignment. The selected sequence moves up one position on press-
ing the ↑ key.
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 1.4).
To hide a set of sequences, select them and right-click the mouse on the selected sequence IDs to
bring up the context pop-up menu. Select Hide Sequences and the sequences will be concealed, with
a small blue triangle indicating their position (Figure 2.7). To unhide (reveal) the sequences, right
click on the triangle and select Reveal Sequences from the context menu.
A similar mechanism applies to columns (Figure 2.8). Selected columns (indicated by a red marker)
can be hidden and revealed in the same way via the context pop-up menu by right clicking on the
ruler bar. The hidden column selection is indicated by a small blue triangle in the ruler bar.
2.5. HIDING REGIONS 23
Figure 2.7: Hiding Sequences Hidden sequences are represented by a small blue triangle in
the sequence ID panel.
Figure 2.8: Hiding Columns Hidden columns are represented by a small blue triangle in the
ruler bar.
It is often easier to select the region that you intend to work with, rather than the regions that you
want to hide. In this case, select the required region and use the View ⇒ Hide ⇒ All but Selected
Region menu entry, or press [Shift]+[Ctrl]+H to hide the unselected region.
Instead of hiding a group completely, it is sometimes useful to work with just one representative
sequence. The <Sequence ID> ⇒ Represent group with <Sequence ID> option from the sequence
ID pop-up menu enables this variant of the hidden groups function. The remaining representative
sequence can be visualized and manipulated like any other. Note, any alignment edits that affect the
sequence will also affect the whole sequence group.
24 CHAPTER 2. SELECTING AND EDITING SEQUENCES
Figure 2.9: Introducing gaps in a single sequence. Gaps are introduced as the selected
sequence is dragged to the right while pressing and holding [SHIFT].
Figure 2.10: Introducing gaps in a group. Gaps are introduced as the selected group is
dragged to the right with [CTRL] pressed.
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).
2.6. INTRODUCING AND REMOVING GAPS 25
Alignment edits can be undone via the Edit ⇒ Undo Edit alignment window menu option, or CTRL-
Z. An edit, if undone, may be re-applied with Edit ⇒ Redo Edit, or CTRL-Y. Note, however, that the
Undo function only works for edits to the alignment or sequence ordering. Colouring of the align-
ment, showing and hiding of sequences or modification of annotation that only affect the alignment’s
display cannot be undone.
The Jalview alignment editing model is different to that used in other alignment editors. Because
edits are restricted to the insertion and deletion of gaps to the left of a particular sequence position,
editing has the effect of shifting the rest of the sequence(s) being edited down or up-stream with re-
spect to the rest of alignment. The Edit ⇒ Pad Gaps option can be enabled to eliminate ‘ragged edges’
at the end of the alignment, but does not avoid the ‘knock-on’ effect which is sometimes undesirable.
However, its effect can be limited by performing the edit within a selected region. In this case, gaps
will only be removed or inserted within the selected region. Edits are similarly constrained when
they occur adjacent to a hidden column.
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.
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).
26 CHAPTER 2. SELECTING AND EDITING SEQUENCES
Pressing the [←] or [→] 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.
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 n gaps
type n and then press [SPACE]. To insert gaps into all sequences of a group, use [CTRL]-[SPACE] or
[SHIFT]-[SPACE] (both keys held down together).
Gaps can be removed in cursor mode by pressing [BACKSPACE]. First make sure you have every-
thing unselected by pressing ESC. The gap under the cursor will be removed. To remove n gaps, type
n and then press [BACKSPACE]. Gaps will be deleted up to the number specified. To delete gaps
from all sequences of a group, press [CTRL]-[BACKSPACE] or [SHIFT]-[BACKSPACE] (both keys
held down together). Note that the deletion will only occur if the gaps are in the same columns in all
sequences in the selected group, and those columns are to the right of the selected residue.
Colouring sequences is a key aspect of alignment presentation. Jalview allows you to colour the
whole alignment, or just specific groups. Alignment and group colours are rendered below any other
colours, such as those arising from sequence features (these are described in Section 4). This means
that if you try to apply one of the colourschemes described in this section, and nothing appears to
happen, it may be that you have sequence feature annotation displayed, and you may have to disable
it using the View ⇒ Show Features option before you can see your colourscheme.
There are two main types of colouring styles: simple static residue colourschemes and dynamic
schemes which use conservation and consensus analysis to control colouring. Hybrid colouring
is also possible, where static residue schemes are modified using a dynamic scheme. The individual
schemes are described in Section 3.1.6 below.
29
30 CHAPTER 3. COLOURING SEQUENCES AND FIGURE GENERATION
Selections or groups can be coloured in two ways. The first is via the Alignment Window’s Colour
menu as stated above, after first ensuring that the Apply Colour To All Groups flag is not selected.
This must be turned off specifically as it is on by default. When unticked, selections from the Colours
menu will only change the colour for residues in the current selection, or the alignment view’s “back-
ground colourscheme” when no selection exists.
The second method is to select sequences and right click mouse to open pop-up menu and select
Selection ⇒ Edit New Group ⇒ Group Colour from context menu options (Figure 3.1). This only
changes the colour of the current selection or group.
For many colour schemes, the intensity of the colour in a column can be scaled by the degree of amino
acid property conservation. Selecting Colour ⇒ By Conservation enables this mode, and Modify
Conservation Threshold... brings up a selection box (the Conservation Colour Increment dialog box)
allowing the alignment colouring to be modified. Selecting a higher value limits colouring to more
highly conserved columns (Figure 3.2).
Figure 3.2: Conservation Shading The density of the ClustalX style residue colouring is con-
trolled by the conservation threshold. The effect of 0% (left), 50% (center) and 100%
(right) thresholds are shown.
3.1. COLOURING SEQUENCES 31
‘Thresholding’ is another hybrid colour model where a residue is only coloured if it is not excluded by
an applied threshold. Selecting Colour ⇒ Above Identity Threshold brings up a selection box with
a slider controlling the minimum percentage identity threshold to be applied. Selecting a higher
threshold (by sliding to the right) limits the colouring to columns with a higher percentage identity
(as shown by the Consensus histogram in the annotation panel).
The per Sequence option in the Colour By Annotation dialog allows each sequence to be shaded
according to sequence associated annotation rows, such as protein disorder scores. This functionality
is described further in Section 8.2.
Full details on each colour scheme can be found in the Jalview on-line help. A brief description of
each one is provided below:
ClustalX
1 Please remember to turn off Sequence Feature display to see the shading
32 CHAPTER 3. COLOURING SEQUENCES AND FIGURE GENERATION
Blosum62
Percentage Identity
Zappo
Taylor
Hydrophobicity
Helix Propensity
Strand Propensity
Turn Propensity
Buried Index
Nucleotide
Purine Pyrimidine
User Defined
This dialog allows the user to create any number of named colour schemes at will. Any residue may
be assigned any colour. The colour scheme can then be named. If you save the colour scheme, this
name will appear on the Colour menu (Figure 3.3).
Figure 3.3: Creation of a user defined colour scheme. Residue types are assigned colours
(left). The profile is saved (center) and can then be accessed via the Colour menu
(right).
Jalview is a WYSIWIG alignment editor. This means that for most kinds of graphics output, the
layout that is seen on screen will be the same as what is outputted in an exported graphics file. It is
therefore important to pick the right kind of display layout prior to generating figures.
Jalview is able to create multiple independent visualizations of the same underlying alignment -
these are called Views. Because each view displays the same underlying data, any edits performed
in one view will update the alignment or annotation visible in all views.
Alignment views are created using the View ⇒ New View op-
tion of the alignment window or by pressing [CTRL]-T. This
will create a new view with the same groups, alignment lay-
out and display options as the current one. Pressing G will
gather together Views as named tabs on the alignment win-
dow, and pressing X will expand gathered Views so they can
be viewed simultaneously in their own separate windows. To
delete a group, press [CTRL]-W.
Jalview provides two screen layout modes, unwrapped (the default) where the alignment is in one
long line across the window, and wrapped, where the alignment is on multiple lines, each the width of
the window. Most layout options are controlled by the Format menu option in the alignment window,
and control the overall look of the alignment in the view (rather than just a selected region).
3.2. FORMATTING AND GRAPHICS OUTPUT 37
Wrapped Alignments
Wrapped alignments can be toggled on and off using the Format ⇒ Wrap menu option (Figure 3.4).
Note that the annotation tracks are also wrapped. Wrapped alignments are great for publications
and presentations but are of limited use when working with large numbers of sequences.
If annotations are not all visible in wrapped mode, expand the alignment window to view them. Note
that alignment annotation (see Section 4) cannot be interactively created or edited in wrapped mode,
and selection of large regions is difficult.
Fonts
Options in the Format menu are provided to control the alignment view, and provide a range of
options to control the display of sequence and alignment numbering, the justification of sequence
IDs and annotation row column labels on the annotation rows shown below the alignment.
The display of hidden row/column markers and gap characters can be turned off with Format ⇒ Hid-
den Markers and Format ⇒ Show Gaps, respectively. The Text and Colour Text option controls the
display of sequence text and the application of alignment and group colouring to it. Boxes controls
the display of the background area behind each residue that is coloured by the applied coloursheme.
The alignment layout and group sub-menu both contain an option to hide conserved symbols from the
alignment display (Format ⇒ Show nonconserved in the alignment window or Selection ⇒ Group ⇒
Show Nonconserved by right clicking on a group). This mode is useful when working with alignments
that exhibit a high degree of homology, because Jalview will only display gaps or sequence symbols
that differ from the consensus for each column, and render all others with a ‘.’.
The annotation lines which appear below the sequence alignment are described in detail in Section
4. They can be hidden by toggling the Annotations ⇒ Show Annotations menu option. Additionally,
each annotation line can be hidden and revealed in the same way as sequences via the pop-up context
menu on the annotation name panel (Figure 3.5). Annotations can be reordered by dragging the
annotation line label on the annotation label panel. Placing the mouse over the top annotation label
brings up a resize icon on the left. When this is displayed, Click-dragging up and down provides
more space in the alignment window for viewing the annotations, and less space for the sequence
alignment.
3.2. FORMATTING AND GRAPHICS OUTPUT 39
Figure 3.5: Hiding Annotations Annotations can either be hidden from the Annotations menu
(left) or individually from the context menu opened by right clicking their label
(right).
HTML
EPS
PNG
Annotations and features are additional information that is overlaid on the sequences and the align-
ment. Generally speaking, annotations reflect properties of the alignment as a whole, often asso-
ciated with columns in the alignment. Features are often associated with specific residues in the
sequence.
Annotations are shown below the alignment in the annotation panel, the properties are often based
on the alignment. Conversely, sequence features are properties of the individual sequences, so they
do not change with the alignment, but are shown mapped on to specific residues within the align-
ment.
Features and annotation can be interactively created, or retrieved from external data sources. Web-
services like JPred (see 8.1 above) can be used to analyse a given sequence or alignment and generate
annotation for it.
Jalview automatically calculates several quantitative alignment annotations which are displayed as
histograms below the multiple sequence alignment columns. Conservation, quality and consensus
scores are examples of dynamic annotation, so as the alignment changes, they change along with
it. The scores can be used in the hybrid colouring options to shade the alignments. Mousing over a
conservation histogram reveals a tooltip with more information.
These annotations can be hidden and deleted via the context menu linked to the annotation row; but
they are only created on loading an alignment. If they are deleted then the alignment should be saved
and then reloaded to restore them. Jalview provides a toggle to autocalculate a consensus sequence
upon editing. This is normally selected by default, but can be turned off for large alignments via the
Calculate ⇒ Autocalculate Consensus menu option if the interface is too slow.
43
44 CHAPTER 4. ANNOTATION AND FEATURES
Conservation Annotation
Consensus Annotation
Alignment consensus annotation reflects the percentage of the different residue per column. By de-
fault this calculation includes gaps in columns, gaps can be ignored via the Consensus label context
menu to the left of the consensus bar chart. The consensus histogram can be overlaid with a se-
quence logo that reflects the symbol distribution at each column of the alignment. Right click on the
Consensus annotation row and select the Show Logo option to display the Consensus profile for the
group or alignment. Sequence logos can be enabled by default for all new alignments via the Visual
tab in the Jalview desktop’s preferences dialog box.
Quality Annotation
Alignment quality annotation is an ad-hoc measure of the likelihood of observing the mutations (if
any) in a particular column of the alignment. The quality score is calculated for each column in an
alignment by summing, for all mutations, the ratio of the two BLOSUM 62 scores for a mutation pair
and each residue’s conserved BLOSUM62 score (which is higher). This value is normalised for each
column, and then plotted on a scale from 0 to 1.
Occupancy Annotation
Alignment occupancy simply reflects the number of residues aligned at each column in the multiple
sequence alignment. To see this annotation you may first need to enable it by ticking the Occupancy
check-box in the Visual tab in Jalview’s Preferences before opening an alignment. Occupancy is
particularly useful in conjunction with the Select/Hide by Annotations dialog since it allows the view
to be filtered to exclude regions of the alignment with a high proportion of gaps.
Group associated consensus and conservation annotation rows reflect the sequence variation within
a particular group. Their calculation is enabled by selecting the Group Conservation or Group Con-
sensus options in the Annotation ⇒ Autocalculated Annotation submenu of the alignment window.
4.1. CONSERVATION, QUALITY, CONSENSUS AND OTHER ANNOTATION 45
To create a new annotation row, right click on the annotation label panel and select the Add New
Row menu option (Figure 4.1). A dialog box appears. Enter the label to use for this row and a new
row will appear.
To create a new annotation, first select all the positions to be annotated on the appropriate row.
Right-clicking on this selection brings up the context menu which allows the insertion of graphics for
secondary structure (Helix or Sheet), text Label and the colour in which to present the annotation
(Figure 4.2). On selecting Label a dialog box will appear, requesting the text to place at that position.
After the text is entered, the selection can be removed and the annotation becomes clearly visible1 .
Annotations can be coloured or deleted as desired.
Figure 4.1: Creating a new annotation row. Annotation rows can be reordered by dragging
them to the desired place.
Figure 4.2: Creating a new annotation. Annotations are created from a selection on the an-
notation row and can be coloured as desired.
On loading a sequence alignment, Jalview will normally2 calculate a set of automatic annotation
rows which are shown below the alignment. For nucleotide sequence alignments, only an alignment
consensus row will be shown, but for amino acid sequences, alignment quality (based on BLOSUM
62) and physicochemical conservation will also be shown. Conservation is calculated according to
Livingstone and Barton3 . Consensus is the modal residue (or + where there is an equal top residue).
The inclusion of gaps in the consensus calculation can be toggled by right-clicking on the Consensus
label and selecting Ignore Gaps in Consensus from the pop-up context menu located with consensus
annotation row. Quality is a measure of the inverse likelihood of unfavourable mutations in the
alignment. Further details on these calculations can be found in the on-line documentation.
1 When annotating a block of positions, the text can be partly obscured by the selection highlight. Pressing the [ESC]
Sequence features are annotation associated with a specific sequence - often marking a specific re-
gion, such as a domain or binding site. Jalview allows features to be created simply by selecting
the area in a sequence (or sequences) to form the feature and selecting Selection ⇒ Create Sequence
Feature from the right-click context menu (Figure 4.3). A dialog box allows the user to customise the
feature with respect to name, group, and colour. The feature is then associated with the sequence.
Moving the mouse over a residue associated with a feature brings up a tool tip listing all features
associated with the residue.
Figure 4.3: Creating sequence features. Features can readily be created from selections via
the context menu and are then displayed on the sequence.
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.
Jalview supports feature retrieval from public databases. It includes built in parsers for Uniprot,
Ensembl and ENA (or EMBL) records retrieved from the EBI. Sequences retrieved from these sources
using the sequence fetcher (see Section 1.4.5) will already possess features.
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 View ⇒ Sequence ID
Tooltip ⇒ 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.
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 po-
sition. If the start/end positions do not match the coordinate system from which the features were
defined, then the features will be displayed incorrectly.
48 CHAPTER 4. ANNOTATION AND FEATURES
Figure 4.4: Multiple sequence features. An alignment with JPred secondary structure pre-
diction annotation below it, and many sequence features overlaid onto the aligned
sequences. The tooltip lists the features annotating the residue below the mouse-
pointer.
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 [Sequence ID] ⇒ Sequence details . . . option
from the popup menu. A similar option is provided in the Selection sub-menu allowing you to obtain
annotation for the sequences currently selected.
Jalview includes a function to automatically verify and update each sequence’s start and end num-
bering against any of the sequence databases that the Sequence Fetcher has access to. This function
is accessed from the Webservice ⇒ Fetch DB References sub-menu in the Alignment window. This
menu allows you to query either the set of Standard Databases, which includes EMBL, Ensembl,
Uniprot, the PDB, or just a specific datasource from one of the submenus. When one of the entries
from this menu is selected, Jalview will use the ID string from each sequence in the alignment or
in the currently selected set to retrieve records from the external source. Any sequences that are
retrieved are matched against the local sequence, and if the local sequence is found to be a sub-
sequence of the retrieved sequence then the local sequence’s start/end numbering is updated. A new
4.3. IMPORTING FEATURES FROM DATABASES 49
database reference mapping is created, mapping the local sequence to the external database, and the
local sequence inherits any additional annotation retrieved from the database sequence.
The database retrieval process terminates when a valid mapping is found for a sequence, or if all
database queries failed to retrieve a matching sequence. Termination is indicated by the disappear-
ance 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 “Sequence not 100%
match” dialog box).
Feature retrieval can take some time if a large number of sources are selected and if the alignment
contains a large number of sequences. As features are retrieved, they are immediately added to the
current alignment view. The retrieved features are shown on the sequence and can be customised as
described previously.
Figure 4.5: Customising sequence features. Features can be recoloured, switched on or off
and have the rendering order changed.
Feature display can be toggled on or off by selecting the View ⇒ Show Sequence Features menu
option. When multiple features are present it is usually necessary to customise the display. Jalview
allows the display, colour, rendering order and transparency of features to be modified via the View
⇒ Feature Settings. . . menu option. This brings up a dialog window (Figure 4.5) which allows the
visibility of individual feature types to be selected, assigned colours to be changed (by clicking on
the colour of each sequence feature type) and the rendering order modified by dragging feature types
to a new position in the list. Dragging the slider alters the transparency of the feature rendering.
Clicking in the Configuration column opens the Display Settings dialog which allows more complex
50 CHAPTER 4. ANNOTATION AND FEATURES
shading schemes and also the creation of filters, and right-clicking opens a context sensitive menu
that offers options for selecting and hiding columns or sorting the alignment according the the fea-
ture’s distribution or score attribute. These capabilities are described further in sections 4.3.3 and
4.3.4.
Sometimes, you may need to visualize the differences in information carried by sequence features
of the same type. This is most often the case when features of a particular type are the result
of a specific type of database query or calculation. Here, they may also carry information within
their textual description, or most commonly for calculations, a score related to the property being
investigated. Features imported from genomic databases and Variant Call Format files may also
have a number of additional attributes. Jalview allow filters and different types of colouring to be
applied to allow variations in these attributes to be highlighted. In order to create a filter or modify
the way a feature type is coloured, select the ‘Configuration’ column for that Feature Type in the
Sequence Feature Settings dialog box.
Instead of shading a feature with an assigned colour according to its type, you can select the ‘Colour
by text’ option to create feature colours according to the description text associated with each feature.
This is useful for general feature types - such as Uniprot’s ‘DOMAIN’ feature - where the actual type
of domain is given in the feature’s description. If other attributes are present you can choose one of
them from the drop-down menu.
If Scores or numeric attributes are present, the Graduated Colour section of the dialog allows a
quantitative shading scheme to be defined, with the highest scores receiving the ‘Max’ colour, and
the lowest scoring features coloured with the ‘Min’ colour. Alternately, you can define a threshold
to exclude low or high-scoring features from the alignment display. This is done by choosing your
desired threshold type (either above or below), using the drop-down menu in the dialog box. Then,
adjust the slider or enter a value in the text box to set the threshold for displaying this type of
feature.
When a filters and complex colourschemes are applied, the configuration column will show coloured
blocks or text to indicate the colouring style and any attribute filters.
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 Feature Type’s popup menu. Simply right-click the type’s style in the Sequence Feature Settings
dialog box, and select one of the Sort by Score and Sort by Density options to re-order the alignment.
4.3. IMPORTING FEATURES FROM DATABASES 51
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.
Jalview supports the widely used GFF tab delimited format4 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.
4 see http://www.sanger.ac.uk/resources/software/gff/spec.html
52 CHAPTER 4. ANNOTATION AND FEATURES
Chapter 5
Sequences can be aligned using a range of algorithms provided by JABA web services, including
ClustalW1 , Muscle2 , MAFFT3 , ProbCons,4 T-COFFEE5 and Clustal Omega.6 Of these, T-COFFEE
is slow but accurate. ClustalW is historically the most widely used. Muscle is fast and probably best
for smaller alignments. MAFFT is probably the best for large alignments, however Clustal Omega,
released in 2011, is arguably the fastest and most accurate tool for protein multiple alignment.
To run an alignment web service, select the appropriate method from the Web Service ⇒ Alignment
⇒ . . . submenu (Figure 5.1). For each service you may either perform an alignment with default
settings, use one of the available presets, or customise the parameters with the ‘Edit and Run ..’
dialog box. Once the job is submitted, a progress window will appear giving information about the
job and any errors that occur. After successful completion of the job, a new alignment window is
opened with the results, in this case an alignment. By default, the new alignment will be ordered
in the same way as the input sequences. Note: many alignment programs re-order the input during
their analysis and place homologous sequences close together, the MSA algorithm ordering can be
recovered using the ‘Algorithm ordering’ entry within the Calculate ⇒ Sort sub menu.
1 “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) Nucleic Acids
Research 22, 4673-80
2 “MUSCLE: a multiple sequence alignment method with reduced time and space complexity" Edgar, R.C. (2004) BMC
Bioinformatics 5, 113
3 “MAFFT: a novel method for rapid multiple sequence alignment based on fast Fourier transform" Katoh, K., Misawa,
K., Kuma, K. and Miyata, T. (2002) Nucleic Acids Research 30, 3059-3066. and “MAFFT version 5: improvement in
accuracy of multiple sequence alignment" Katoh, K., Kuma, K., Toh, H. and Miyata, T. (2005) Nucleic Acids Research 33,
511-518.
4 PROBCONS: Probabilistic Consistency-based Multiple Sequence Alignment. Do, C.B., Mahabhashyam, M.S.P.,
A, Dineen DG, Gibson TJ, Karplus K, Li W, Lopez R, McWilliam H, Remmert M, Soding J, Thompson JD, Higgins DG
(2011) Molecular Systems Biology 7 539 doi:10.1038/msb.2011.75
53
54 CHAPTER 5. MULTIPLE SEQUENCE ALIGNMENT
The re-alignment option is currently only supported by Clustal Omega and ClustalW. When perform-
ing a re-alignment, Jalview submits the current selection to the alignment service complete with any
existing gaps. Realignment with ClustalW is useful when one wishes to align additional sequences
to an existing alignment without any further optimisation to the existing alignment. ClustalO’s re-
alignment works by generating a probabilistic model (a.k.a HMM) from the original alignment, and
then realigns all sequences to this profile. For a well aligned MSA, this process will simply recon-
struct the original alignment (with additional sequences), but in the case of low quality MSAs, some
differences may be introduced.
Figure 5.1: 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).
If the view or selected region submitted for alignment contains hidden regions, then only the visible
sequences will be submitted to the service. Furthermore, each contiguous segment of sequences
will be aligned independently (resulting 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 2.6.2 and 2) hidden columns can be used to
preserve existing parts of an alignment whilst the visible parts are locally refined.
Multiple alignment is a computationally intensive calculation. Some JABA server services and ser-
vice 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
5.2. CUSTOMISING THE PARAMETERS USED FOR ALIGNMENT 55
JABA web services allow you to vary the parameters used when performing a bioinformatics analy-
sis. For JABA alignment services, this means you are usually able to modify the following types of
parameters:
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 5.3, 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.
Figure 5.3: ClustalW parameter slider detail. From the ClustalW Clustal ⇒ Edit settings
and run ... dialog box.
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:
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 ‘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.
5.3. PROTEIN ALIGNMENT CONSERVATION ANALYSIS 57
Jalview allows you to create your own presets for a particular service. To do this, select the ‘Edit
settings and run ...’ option for your service, which will open a parameter editing dialog box like the
one shown in Figure 5.2.
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.
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.
The Web Service ⇒ Conservation menu controls the computation of up to 17 different amino acid con-
servation 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 20027 as well as an efficient implementation of the SMERFs score developed
by Manning et al. in 2008.8
When the AACon Calculation entry in the Web Service ⇒ 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.
The Web Service ⇒ Conservation ⇒ 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
7 Scoring residue conservation. Valdar (2002) Proteins: Structure, Function, and Genetics 43 227-241.
8 SMERFS Score Manning et al. BMC Bioinformatics 2008, 9 51 doi:10.1186/1471-2105-9-51
58 CHAPTER 5. MULTIPLE SEQUENCE ALIGNMENT
that SMERFS calculations are performed. AACon settings for an alignment are saved in Jalview
projects along with the latest calculation results.
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 Web Service ⇒ Conservation ⇒ Switch
Server submenu.
Chapter 6
Analysis of Alignments
Jalview provides support for sequence analysis in two ways. A number of analytical methods are
‘built-in’, these are accessed from the Calculate alignment window menu. Computationally intensive
analyses are run outside Jalview via web services - and found under the Web Service menu. In this
section, we describe the built-in analysis capabilities common to both the Jalview Desktop and the
JalviewLite applet.
6.1 PCA
Principal components analysis calculations create a spatial representation of the similarities within
the current selection or the whole alignment if no selection has been made. After the calculation
finishes, a 3D viewer displays each sequence as a point in 3D ‘similarity space’. Sets of similar
sequences tend to lie near each other in this space. Note: The calculation is computationally expen-
sive, 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 1.4.6.
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 prin-
cipal component is the one with the greatest magnitude, or length. The sets of measurements that
differ the most should lie at either end of this principal axis, and the other axes correspond to less
extreme patterns of variation in the data set. In this case, the components are generated by an
eigenvector decomposition of the matrix formed from the sum of pairwise substitution scores at each
aligned position between each pair of sequences. The basic method is described in the 1995 paper by
G. Casari, C. Sander and A. Valencia 1 and implemented at the SeqSpace server at the EBI.2
59
60 CHAPTER 6. ANALYSIS OF ALIGNMENTS
PCA analysis can be launched from the Calculate ⇒ Principal Component Analysis menu option.
PCA requires a selection containing at least 4 sequences. A window opens containing the
PCA tool (Figure 6.1). 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 ↑ and ↓ keys or the scroll wheel of the mouse (if available). A tool
tip appears if the cursor is placed over a sequence. Sequences can be selected by clicking on them.
[CTRL]-Click can be used to select multiple sequences.
Labels will be shown for each sequence by toggling the View ⇒ Show Labels menu option, and
the plot background colour changed via the View ⇒ Background Colour.. dialog box. A graphical
representation of the PCA plot can be exported as an EPS or PNG image via the File ⇒ Save As ⇒
. . . submenu.
Although the PCA viewer supports export of the current view, the plots produced are rarely suit-
able for direct publication. The PCA viewer’s 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 R or gnuplot in order to graph the data.
6.2 Trees
Jalview can calculate and display trees, providing interactive tree-based grouping of sequences
though a tree viewer. All trees are calculated via the Calculate ⇒ Calculate Tree ⇒ . . . submenu.
6.2. TREES 61
Figure 6.2: Calculating Trees Jalview provides a range of options for calculating trees. Jalview
can also load precalculated trees in Newick format (right).
Trees can be calculated from distance matrices determined from % identity or aggregate BLOSUM
62 score using either Average Distance (UPGMA) or Neighbour Joining algorithms. The input data
for a tree is either the selected region or the whole alignment, excluding any hidden regions.
On calculating a tree, a new window opens (Figure 6.2) which contains the tree. Various display
settings can be found in the tree window View menu, including font, scaling and label display options.
The File ⇒ 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 via the File ⇒ 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 View ⇒ Mark Unlinked Leaves menu option.
Clicking on the tree brings up a cursor across the height of the tree. The sequences are automatically
partitioned and coloured (Figure 6.3). To group them together, select the Calculate ⇒ Sort ⇒ By Tree
Order ⇒ . . . 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 Select ⇒ Undefine Groups from the alignment window menu.
62 CHAPTER 6. ANALYSIS OF ALIGNMENTS
Figure 6.3: Interactive Trees The tree level cutoff can be used to designate groups in Jalview.
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.
◦ From the Development Builds in the Jalview web site, use the “2G” link in the“latest
official build” row and “Webstart” column.
The File ⇒ 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 sub-
sequently changed.
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 win-
dow. 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 asso-
ciated conservation and consensus annotation (enabled using the alignment window’s Annotations
⇒ Autocalculated Annotation ⇒ Group Conservation and Group Consensus options) can help when
working with larger alignments.
64 CHAPTER 6. ANALYSIS OF ALIGNMENTS
Figure 6.4: The Redundancy Removal dialog box opened from the edit menu. Sequences that ex-
ceed the current percentage identity threshold and are to be removed are highlighted
in black.
The redundancy removal dialog box is opened using the Edit ⇒ Remove Redundancy. . . option in
the alignment menu. As its menu option placement suggests, this is actually an alignment editing
function, but it is convenient to describe it here. The redundancy removal dialog box presents a
percentage identity slider which sets the redundancy threshold. Aligned sequences which exhibit
a percentage identity greater than the current threshold are highlighted in black. The [Remove]
button can then be used to delete these sequences from the alignment as an edit operation.
6.3. PAIRWISE ALIGNMENTS 65
It is often necessary to explore variations in an alignment that may correlate with mutations ob-
served in a particular region; for example, sites exhibiting single nucleotide polymorphism, or residues
involved in substrate recognition in an enzyme. One way to do this would be to calculate a tree using
the specific region, and subdivide it in order to partition the alignment. However, calculating a tree
can be slow for large alignments, and the tree may be difficult to partition when complex mutation
patterns are being analysed. The Select ⇒ Make groups for selection function was introduced to
make this kind of analysis easier. When selected, it will use the characters in the currently selected
region to subdivide the alignment. For example, if a single column is selected, then the alignment (or
each group defined on the alignment) will be divided into groups based on the residue or nucleotide
found at that position. These new groups are annotated with the characters in the selected region,
and Jalview’s group based conservation analysis annotation and colourschemes can then be used to
reveal any associated pattern of sequence variation across the whole alignment.
Jalview can calculate optimal pairwise alignments between arbitrary sequences via the Calculate ⇒
Pairwise Alignments. . . menu option. Global alignments of all pairwise combinations of the selected
sequences are performed and the results returned in a text box.
Figure 6.5: Pairwise alignment of sequences. Pairwise alignments of three selected se-
quences are shown in a textbox.
Jalview facilitates the use of 3D structure data for the analysis of alignments by providing a linked
view of structures associated with the aligned sequences. It also allows sequence, secondary struc-
ture and B-factor data to be imported from structure files, and supports the use of the EMBL-EBI’s
SIFTS database to construct accurate mappings between UniProt protein sequences and structures
retrieved from the PDB.
Jalview can interactively view 3D structure using Jmol, a Java based molecular viewing program1
integrated with Jalview.2 It also supports the use of UCSF Chimera, a powerful molecular graphics
system that needs separate installation. Jalview can also read PDB and mmCIF format files directly
to extract sequences and secondary structure information, and retrieve records from the European
Protein Databank (PDBe) using the Sequence Fetcher (see 1.4.5).
To configure which viewer is used when creating a new structure view, open the Structures prefer-
ences window via Tools ⇒ Preferences. . . and select either JMOL or CHIMERA as the default viewer.
If you select Chimera, Jalview will search for the installed program, and if it cannot be found, you
will be prompted to locate the Chimera binary, or alternately, open the UCSF Chimera download
page to obtain the software.
alpha carbon trace and can be viewed, rotated and coloured using the sequence alignment.
67
68 CHAPTER 7. WORKING WITH 3D STRUCTURES
Jalview will attempt to automatically determine which structures are associated with a sequence via
its ID, and any associated database references. To do this for a particular sequence or the current
selection, open the Sequence ID popup menu and select View 3D Structure, to open the 3D Structure
Chooser.
When the structure chooser is first opened, if no database identifiers are available, Jalview will auto-
matically perform a database reference retrieval (See 4.3.1) to discover identifiers for the sequences
to use to search the PDB. This can take a few seconds for each sequence and will be performed for all
selected sequences.3
Once the retrieval has finished, the structure chooser dialog will show any available PDB entries for
the selected sequences.
If you have PDB files stored on your computer named the same way as the sequences in the align-
ment, then you can drag them from their location on the file browser onto an alignment window.
Jalview will search the alignment for sequences with IDs that match any of the files, and offer a
dialog like the one in Figure 7.1.
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.4
After associating sequencesÂăwith PDB files, you can view the PDB structures by opening the Se-
quence ID popup menu and selecting View 3D Structure. The PDB files you loaded will be shown in
the Cached Structures view, after selecting it from the drop down menu in the dialog box.
The structure viewer is launched via the Sequence ID context menu. To view structures associated
with a sequence or a selected set of sequences in the alignment, simply right click the mouse to open
the context menu, and select 3D Structure data . . . to open the Structure Chooser dialog box.
If any of the currently selected sequences have structures in the PDB, they will appear in the
Structure Chooser dialog box. The structures can be ranked by different parameters, but are by
default ordered according to their PDB quality score.
3 After this is done, you can see the added database references in a tool tip by mousing over the sequence ID. You can
use the View ⇒ Sequence ID Tooltip ⇒ Show Db References submenu option to enable or disable these data in the tooltip.
4 We plan to extend this facility in future so Jalview will automatically search for PDB files matching your sequence
A.
B.
Figure 7.1: 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 se-
quences with matching IDs.
To view one or more structures, simply click View to open a structure viewer containing the struc-
tures selected in the dialog. If several structures were picked, these will be shown superposed ac-
cording to the alignment. You may find Jalview has already picked the best structure - using one of
the criteria shown in the dropdown menu (e.g. ’Best Quality’, which is picked by default). However,
you are free to select your own.
The structure(s) to be displayed will be downloaded or loaded from the local file system, and shown
as a ribbon diagram coloured according to the associated sequence in the current alignment view
(Figure 7.2 (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 View ⇒ Automatic Scrolling
option is not selected, however, then the automatic adjustment will be disabled for the current view.
Structure display can be modified using the Colour and View menus in the structure viewer. The
background colour can be modified by selecting the Colours ⇒ Background Colour. . . option.
By default, the structure will be coloured in the same way as the associated sequence(s) in the align-
ment view from which it was launched. The structure can be coloured independently of the sequence
by selecting an appropriate colour scheme from the Colours menu. It can be coloured according to
70 CHAPTER 7. WORKING WITH 3D STRUCTURES
Figure 7.2: Structure visualization Structure viewers are launched from the 3D Structure
chooser dialog (left). Jalview shows the displayed structures coloured according the
alignment view (right).
the alignment using the Colours ⇒ By Sequence option. The image in the structure viewer can be
saved as an EPS or PNG with the File ⇒ Save As ⇒ . . . 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 File ⇒ View Mapping menu
option.
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 “Rasmol5 -like” scripting language, which is described
elsewhere6 . 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 Jmol ⇒ Console
menu option.
If you would prefer to use Jmol to manage structure colours, then select the Colours ⇒ 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.
5 See
http://www.rasmol.org
6 Jmol Wiki:http://wiki.jmol.org/index.php/Scripting
Jmol Scripting reference: http://www.stolaf.edu/academics/chemapps/jmol/docs/
7.3. VIEWING STRUCTURES 71
Many comparative biomolecular analysis investigations aim to determine if the biochemical prop-
erties of a given molecule are significantly different to its homologues. When structure data is
available, comparing the shapes of molecules by superimposing them enables substructure that may
impart different behaviour to be quickly identified. The identification of optimal 3D superposition
involves aligning 3D data rather than sequence symbols, but the result can still be represented as a
sequence alignment, where columns indicate positions in each molecule that should be superposed
to recreate the optimal 3D alignment.
7.3. VIEWING STRUCTURES 73
Jalview can employ Jmol’s 3D fitting routines7 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 3D Structure option in the Sequence ID
popup menu to open the Structure Chooser dialog box. Select the structures required and select
View. A new Jmol view opens containing superposed structures if the current selection contains two
or more sequences with associated structures.
The RMSD (Root Mean Square Deviation) is a measure of how similar the structures are when they
are superimposed. Figure 7.3 shows a superposition created during the course of Exercise 23. The
parts of each molecule used to construct the superposition are rendered using the cartoon style, with
other parts of the molecule drawn in wireframe. The Jmol console, which has been opened after the
superposition was performed, shows the RMSD report for the superposition. Full information about
the superposition is also reported on the Jalview console.8 This output also includes the precise atom
pairs used to superpose structures.
Jalview uses the visible part of each alignment view to define which parts of each molecule are to
be superimposed. Hiding a column in a view used for superposition will remove that correspondence
from the set, and will exclude it from the superposition and RMSD calculation. This allows the
selection of specific parts of the alignment to be used for superposition. Only columns that define a
complete set of correspondences for all structures will be used for structural superposition, and as a
consequence, the RMSD values generated for each pair of structures superimposed can be directly
compared.
In order to recompute a superposition after changing a view or editing the alignment, select the
Jmol ⇒ Align Structures menu option. The Jmol ⇒ 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.
7.3.3 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 via the
7 See http://chemapps.stolaf.edu/jmol/docs/?ver=12.2#compare for more information.
8 The Jalview Java Console is opened from Tools ⇒ Java Console option in the Desktop’s menu bar
74 CHAPTER 7. WORKING WITH 3D STRUCTURES
View ⇒ 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 Select many views option is selected, then multiple views can be
selected as sources for colouring the structure data. Invert selection and Select all views options are
also provided to quickly change between multi-view selections.
Note that the Select many views option is useful if you have different views that colour different
areas or domains of the alignment. This option is further explored in exercise 7.3.3.
Figure 7.3: 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 superpo-
sition 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.
Colouring Complexes
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 7.5, based on data
from Song et. al.9
9 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. Science 2011 331 1036-1040 DOI:10.1126/science.1195380
7.3. VIEWING STRUCTURES 75
Figure 7.4: Choosing a different view for colouring a structure display Browsing the
View ⇒ Colour by .. menu provides full control of which alignment view is used
to colour structures when the Colours ⇒ By Sequence option is selected.
CXXC DNA
binding domain
DNA methylation
domain
Bromo-adjacent
homology domain
Many of Jalview’s sequence feature and annotation capabilities were developed to allow the results
of sequence based protein structure prediction methods to be visualised and explored. This chapter
introduces services integrated with the Jalview Desktop for predicting protein secondary structure
and protein disorder.
Protein secondary structure prediction is performed using the Jpred1 server at the University of
Dundee2 . The behaviour of this calculation depends on the current selection:
◦ If nothing is selected, Jalview will check the length of each alignment row to determine if the
visible sequences in the view are aligned.
- If all rows are the same length (often due to the application of the Edit ⇒ 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.
- Otherwise, just the first sequence will be submitted for a full JPred prediction.
◦ 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.
◦ 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).
1 “The Jpred 3 Secondary Structure Prediction Server” Cole, C., Barber, J. D. and Barton, G. J. (2008) Nucleic Acids
77
78 CHAPTER 8. PROTEIN SEQUENCE ANALYSIS AND STRUCTURE PREDICTION
Jpred is launched in the same way as the other web services. Select Web Service ⇒ Secondary
Structure Prediction ⇒ JPred Secondary Structure Prediction3 from the alignment window menu
(Figure 8.1). 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.
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
3 JNet is the Neural Network based secondary structure prediction method that the JPred server uses.
8.2. PROTEIN DISORDER PREDICTION 79
Figure 8.1: Secondary Structure Prediction Status (left) and results (right) windows for
JPred predictions.
structure predictions can be more reliable for sequence on either side of the insertion4 . 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.
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 Web Service ⇒ Disorder menu in
the alignment window allows access to protein disorder prediction services provided by the config-
ured JABAWS servers.
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 re-
sults include both sequence features and sequence associated alignment annotation rows. Section
4 describes the manipulation and display of these data in detail, and Figure 8.3 demonstrates how
sequence feature shading and thresholding (described in Section 4.3.3) can be used to highlight dif-
ferences in disorder prediction across aligned sequences.
Figure 8.2 shows a single sequence annotated with a range of disorder predictions. Disorder pre-
diction 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
4 This, of course, cannot be guaranteed.
80 CHAPTER 8. PROTEIN SEQUENCE ANALYSIS AND STRUCTURE PREDICTION
Figure 8.2: 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.
annotation rows, clicking on the annotation row label will highlight the associated sequence in the
alignment display, and double clicking will select that sequence.
For full details of each predictor and the results that Jalview can display, please consult Jalview’s
protein disorder service documentation. Short descriptions of the methods provided in JABAWS 2.0
are given below:
DisEMBL
DisEMBL (Linding et al., 2003) is a set of machine-learning based predictors trained to recognise
disorder-related annotation found on PDB structures.
COILS Predicts loops/coils according to DSSP definitions5 . Features mark range(s) of residues pre-
dicted as loops/coils, and annotation row gives raw value for each residue. Value over 0.516 indicates
loop/coil.
HOTLOOPS constitute a refined subset of COILS, namely those loops with a high degree of mobility
as determined from Cα 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.
states (β-bridge (B), β-turn (T), bend (S), π-helix (I), and coil (C)) considered loops or coils.
8.2. PROTEIN DISORDER PREDICTION 81
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.
RONN employs an approach known as the ‘bio-basis’ method to predict regions of disorder in se-
quences 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 align-
ment.
JRonn6 Annotation Row gives RONN score for each residue in the sequence. Scores above 0.5
identify regions of the protein likely to be disordered.
IUPred
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 applica-
tions. 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.
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.
6 JRonn denotes the score for this server because JABAWS runs a Java port of RONN developed by Peter Troshin and
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.
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 continu-
ous 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.
GLOBPLOT
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.
Disordered region sequence features are created marking mark range(s) of residues with positive
first order derivatives, and Globular Domain features mark long stretches of order. Dydx anno-
tation rows give the first order derivative of smoothed score. Values above 0 indicates residue is
disordered.
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 Show
hidden annotation.
Jalview was originally developed for the analysis of protein sequences, but now includes some spe-
cific features for working with nucleic acid sequences and alignments. Jalview recognises nucleotide
sequences and alignments based on the presence of nucleotide symbols [ACGT] in greater than 85%
of the sequences. Built in codon-translation tables can be used to translate ORFs into peptides for
further analysis. ENA nucleotide records retrieved via the sequence fetcher (see Section 1.4.5) are
also parsed in order to identify codon regions and extract peptide products. Furthermore, Jalview
records mappings between protein sequences that are derived from regions of a nucleotide sequence.
Mappings are used to transfer annotation between nucleic acid and protein sequences, and to dy-
namically highlight regions in one sequence that correspond to the position of the mouse pointer in
another.
Jalview provides a simple colourscheme for DNA bases, but does not apply any specific conservation
or substitution score model for the shading of nucleotide alignments. However, pairwise alignments
performed using the Calculate ⇒ Pairwise Alignment . . . option will utilise an identity score matrix
to calculate alignment score when aligning two nucleotide sequences.
Jalview has limited knowledge of the capabilities of the programs that are made available to it via
web services, so it is up to you, the user, to decide which service to use when working with nucleic
acid sequences. The table shows which alignment programs are most appropriate for nucleotide
alignment. Generally, all will work, but some may be more suited to your purposes than others.
We also note that none of these include support for taking RNA secondary structure prediction into
account when aligning sequences (but will be providing services for this in the future!)
83
84 CHAPTER 9. DNA AND RNA SEQUENCES
The Calculate ⇒ Translate cDNA function in the alignment window is only available when working
with a nucleic acid alignment. It uses the standard codon translation table given in the online help
documentation to translate a nucleotide alignment, or the currently selected region, into a set of
aligned peptide sequences. Any features or annotation present on the nucleotide alignment will also
be translated, allowing DNA alignment analysis results to be transferred on to peptide products for
further investigation.
Many ENA records that can be retrieved with the sequence fetcher contain exons. Coding regions will
be marked as features on the ENA nucleotide sequence, and Uniprot database cross references will be
listed in the tooltip displayed when the mouse hovers over the sequence ID. Uniprot database cross
references extracted from ENA records are sequence cross references, and associate a Uniprot se-
quence’s coordinate system with the coding regions annotated on the ENA sequence. Jalview utilises
cross-reference information in two ways.
The Calculate ⇒ Get Cross References function is only available when Jalview recognises that there
are protein/DNA cross-references present on sequences in the alignment. When selected, it retrieves
the cross references from the alignment’s dataset (a set of sequence and annotation metadata shared
between alignments) or using the sequence database fetcher. This function can be used for ENA
sequences containing coding regions to open the Uniprot protein products in a new alignment win-
dow. The new alignment window that is opened to show the protein products will also allow dynamic
highlighting of codon positions in the ENA record for each residue in the protein product(s).
The Uniprot cross-references derived from ENA records can be used by Jalview to visualize protein
sequence features directly on nucleotide alignments. This is because the database cross references
include the sequence coordinate mapping information to correspond regions on the protein sequence
with that of the nucleotide contig. Jalview will use the Uniprot accession numbers associated with
the sequence to retrieve features, and then map them onto the nucleotide sequence’s coordinate
system using the coding region location.
Figure 9.1: Uniprot and PDB sum features retrieved and mapped onto coding regions of ENA
record V00488 (an earlier version of Jalview is shown here).
9.2. WORKING WITH RNA 87
Jalview allows the creation of RNA secondary structure annotation, and includes the VARNA sec-
ondary structure viewer for the display of RNA base pair diagrams. It also allows the extraction of
RNA secondary structure from 3D data when available.
Secondary structure consensus calculations can be performed by enabling the VIENNA service via
the Web Service ⇒ Secondary Structure menu. These consensus structures are created by analysing
the covariation patterns in all visible sequences on the alignment. For more information see the
VIENNA documentation.
Figure 9.2: Secondary structure consensus calculations can be performed by enabling the VI-
ENNA service via the Web Service ⇒ Secondary Structure menu.
88 CHAPTER 9. DNA AND RNA SEQUENCES
Figure 9.3: VIENNA can calculate alternate RNA base pairing probabilities. These are shown
in Jalview as tool-tips on the RNA secondary structure probability score.
Webservices
The term “Webservices” refers to a variety of data exchange mechanisms based on HTTP.1
There are two types of one way service in Jalview. Database services, which were introduced in in
Section 1.4.5, 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
4.3.
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
1 HTTP: Hyper-Text Transfer Protocol.
2 See http://www.compbio.dundee.ac.uk/jabaws for more information and to download your own server.
89
90 CHAPTER 10. WEBSERVICES
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 Files3 , 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.
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 anal-
ysis 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 JABAWS home page.
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 Preferences dialog
box.
Jalview provides these options for configuring the layout of the 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.
3 This may be rectified in future versions.
10.2. JABA WEB SERVICES FOR SEQUENCE ALIGNMENT AND ANALYSIS 91
Figure 10.1: The Jalview Web Services preferences panel. Options are provided for config-
uring the list of JABA servers that Jalview will use, enabling and disabling Enfin
services, and configuring the layout of the web services menu.
The JABAWS configuration dialog shown in Figure 10.1 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:
• Amber - Jalview can connect, but one or more services are non-functional.
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.
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.
You can download and run JABA on your own machine using the ‘VMWare’ or VirtualBox virtual
machine environments. If you would like to do this, there are full instructions at the JABA web site.
92 CHAPTER 10. WEBSERVICES
Exercise 32: Configuring Jalview to Access your new JABAWS Virtual Appliance
32.a. Start Jalview (If you have not done so already).
32.b. Enable the Jalview Java Console by selecting its option from the Tools menu.
Alternately, use the System Java console if you have configured it to open when
Jalview is launched, via your system’s Java preferences (under the ‘Advanced’ tab
on Windows).
32.c. Open the Preferences dialog and locate the Web Services tab.
32.d. Add the URL for the new JABAWS server you started in Exercise 31 to the list of
JABAWS urls using the ‘New Service URL’ button.
32.e. 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.
Take a close look at the output in the console. What do you think is happening?
32.f. Hit OK to save your preferences – you have now added a new JABA service to Jalview!
32.g. Try out your new JABA services by loading the ferredoxin sequences from
http://www.jalview.org/tutorial/alignment.fa
32.h. Launch an alignment using one of the JABA methods provided by your server. It will
be listed under the JABAWS Alignment submenu of the Web Service menu on the
alignment window.
Note: You can watch the JABA VM appliance’s process working by opening the pro-
cess 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).