+\parbox[c]{4in}{
+PNG is Portable Network Graphics. This output option produces an image that can be easily included in web pages and incorporated in
+presentations using e.g. Powerpoint or Open Office. It is a bitmap image so does not scale and is unsuitable for use on posters,
+or in publications.
+
+For submission of alignment figures to journals, please use EPS\footnote{If the journal complains, {\em insist}.}.
+}
+\parbox[c]{4in}{\centerline{\includegraphics[width=2in]{images/image_png.pdf}}
+\par \centerline{Zoom Detail of PNG image.}}
+
+ \exercise{Graphical Output}{
+ \label{graphicex}
+\exstep{Load the example Jalview Jar file in Exercise \ref{exscreen}.
+Customise it how you wish but leave it unwrapped.
+Select {\sl File $\Rightarrow$ Export Image $\Rightarrow$ HTML} from the alignment menu.
+Save the file and open it in your favoured web browser. }
+\exstep{Wrap the alignment and export the image to HTML again. Compare the two
+images. (Note that the exported image matches the format displayed in the
+alignment window but {\bf annotations are not exported}).}
+\exstep{Export the alignment using the {\sl File $\Rightarrow$ Export Image $\Rightarrow$ PNG} menu option.
+Open the file in an image viewer that allows zooming such as Paint or Photoshop (Windows), or Preview (Mac OS X) and zoom in.
+Notice that the image is a bitmap and it becomes pixelated when zoomed.
+(Note that the {\bf annotation lines are included} in the image.)}
+\exstep{Export the alignment using the {\sl File $\Rightarrow$ Export Image
+$\Rightarrow$ EPS} menu option. Open the file in a suitable program such as
+Photoshop, Illustrator, Inkscape, Ghostview, Powerpoint (Windows), or
+Preview (Mac OS X). Zoom in and note that the image has near-infinite
+resolution.}
+\exstep{Experiment with Jalview's other output options: try exporting an alignment view as 'BioJS', which employs the BioJS Multiple Sequence Alignment viewer. When would you use this type of export option ?}
+\exstep{Working with embedded BioJSON data. Drag and drop (or load via the file browser) the 'BioJS' HTML file in the previous step. Compare the original and imported alignment views - are there differences ?}
+\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.
+}
+
+% left out for Glasgow 2016
+% \newpage
+%
+% \section{Summary - the rest of the manual}
+%
+% The first few chapters have covered the basics of Jalview operation: from
+% starting the program, importing, exporting, selecting, editing and colouring
+% aligments, to the generation of figures for publication, presentation and web
+% pages.
+%
+% The remaining chapters in the manual cover:
+%
+% \begin{list}{$\circ$}{}
+% \item{Chapter \ref{featannot} covers the creation, manipulation and visualisation
+% of sequence and alignment annotation, and retrieval of sequence and feature data
+% from databases.}
+% \item {Chapter \ref{msaservices} explores the range of multiple alignment
+% programs offered via Jalview's web services, and introduces the use of
+% AACon for protein multiple alignment conservation analysis.}
+% \item {Chapter \ref{alignanalysis} introduces Jalview's built in tools for
+% multiple sequence alignment analysis, including trees, PCA, and alignment
+% conservation analysis. }
+% \item {Chapter \ref{3Dstructure} demonstrates the structure visualization
+% capabilities of Jalview.}
+% \item {Chapter \ref{proteinprediction} introduces protein sequence based
+% secondary structure and disorder prediction tools, including JPred.}
+% \item {Chapter \ref{dnarna} covers the special functions and
+% visualization techniques for working with RNA alignments and protein coding
+% sequences.}
+% \item {Chapter \ref{jvwebservices} provides instructions on the
+% installation of your own Jalview web services.}
+% \end{list}
+
+\chapter{Annotation and Features}
+\label{featannot}
+Annotations and features are additional information that is
+overlaid on the sequences and the alignment.
+Generally speaking, annotations reflect properties of the alignment as a
+whole, often associated
+with columns in the alignment. Features are often associated with specific
+residues in the sequence.
+
+Annotations are shown below the alignment in the annotation panel, the
+properties are often based on the alignment.
+Conversely, sequence features are properties of the individual sequences, so they do not change with the alignment,
+but are shown mapped on to specific residues within the alignment.
+
+Features and annotation can be interactively created, or retrieved from external
+data sources. Webservices like JPred (see \ref{jpred}) can be used to
+analyse a given sequence or alignment and generate annotation for it.
+
+
+\section{Conservation, Quality, Consensus and other Annotation}
+\label{annotationintro}
+Jalview automatically calculates several quantitative alignment annotations
+which are displayed as histograms below the multiple sequence alignment columns.
+Conservation, quality and consensus scores are examples of dynamic
+annotation, so as the alignment changes, they change along with it.
+The scores can be used in the hybrid colouring options to shade the alignments.
+Mousing over a conservation histogram reveals a tooltip with more information.
+
+These annotations can be hidden and deleted via the context menu linked to the
+annotation row; but they are only created on loading an alignment. If they are
+deleted then the alignment should be saved and then reloaded to restore them.
+Jalview provides a toggle to autocalculate a consensus sequence upon editing. This is normally selected by default, but can be turned off for
+large alignments {\sl via} the {\sl Calculate $\Rightarrow$ Autocalculate
+Consensus} menu option if the interface is too slow.
+
+\subsubsection{Conservation Annotation}
+
+Alignment conservation annotation is quantitative numerical index reflecting the
+conservation of the physico-chemical properties for each column of the alignment.
+The calculation is based on AMAS method of multiple sequence alignment analysis (Livingstone C.D. and Barton G.J. (1993) CABIOS Vol. 9 No. 6 p745-756),
+with identities scoring highest, and amino acids with substitutions in the same physico-chemical class have next highest score.
+The score for each column is shown below the histogram.
+The conserved columns with a score of 11 are indicated by '*'.
+Columns with a score of 10 have mutations but all properties are conserved are marked with a '+'.
+
+\subsubsection{Consensus Annotation}
+
+Alignment consensus annotation reflects the percentage of the different residue
+per column. By default this calculation includes gaps in columns, gaps can be ignored via the Consensus label context
+menu to the left of the consensus bar chart.
+The consensus histogram can be overlaid
+with a sequence logo that reflects the symbol distribution at each column of
+the alignment. Right click on the Consensus annotation row and select the {\sl Show
+Logo} option to display the Consensus profile for the group or alignment.
+Sequence logos can be enabled by default for all new alignments {\sl via} the
+Visual tab in the Jalview desktop's preferences dialog box.
+
+\subsubsection{Quality Annotation}
+
+Alignment quality annotation is an ad-hoc measure of the likelihood of observing
+the mutations (if any) in a particular column of the alignment. The quality score is calculated for each column in an alignment by summing,
+for all mutations, the ratio of the two BLOSUM 62 scores for a mutation pair and each residue's conserved BLOSUM62 score (which is higher).
+This value is normalised for each column, and then plotted on a scale from 0 to 1.
+
+\subsubsection{Occupancy Annotation}
+
+Alignment occupancy simply reflects the number of residues aligned at each column
+in the multiple sequence alignment. To see this annotation you may first need to enable it by ticking the {\sl Occupancy} check-box
+in the {\sl Visual} tab in Jalview's {\sl Preferences} before opening an alignment. Occupancy is particularly useful in conjunction with
+the {\sl Select/Hide by Annotations} dialog since it allows the view to be filtered to exclude regions of the alignment with a high proportion of gaps.
+
+\subsubsection{Group Associated Annotation}
+\label{groupassocannotation}
+Group associated consensus and conservation annotation rows reflect the
+sequence variation within a particular group. Their calculation is enabled
+by selecting the {\sl Group Conservation} or {\sl Group Consensus} options in
+the {\sl Annotation $\Rightarrow$ Autocalculated Annotation } submenu of the
+alignment window.
+
+\subsection{Creating User Defined Annotation}
+
+To create a new annotation row, right click on the annotation label panel and select the {\sl Add New Row} menu option (Figure \ref{newannotrow}).
+A dialog box appears. Enter the label to use for this row and a new row will appear.
+
+To create a new annotation, first select all the positions to be annotated on the appropriate row.
+Right-clicking on this selection brings up the context menu which allows the insertion of graphics for secondary structure ({\sl Helix} or {\sl Sheet}),
+text {\sl Label} and the colour in which to present the annotation (Figure \ref{newannot}). On selecting {\sl Label} a dialog box will appear,
+requesting the text to place at that position. After the text is entered, the selection can be removed and the annotation becomes clearly
+visible\footnote{When annotating a block of positions, the text can be partly obscured by the selection highlight. Pressing the [ESC] key clears
+the selection and the label is then visible.}. Annotations can be coloured or deleted as desired.
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=1.3in]{images/annots1.pdf}
+\includegraphics[width=2in]{images/annots2.pdf}
+\caption{{\bf Creating a new annotation row.} Annotation rows can be reordered by dragging them to the desired place.}
+\label{newannotrow}
+\end{center}
+\end{figure}
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=2in]{images/annots3.pdf}
+\includegraphics[width=2in]{images/annots4.pdf}
+\includegraphics[width=2in]{images/annots5.pdf}
+\caption{{\bf Creating a new annotation.} Annotations are created from a selection on the annotation row and can be coloured as desired.}
+\label{newannot}
+\end{center}
+\end{figure}
+
+\subsection{Automated Annotation of Alignments and Groups}
+
+On loading a sequence alignment, Jalview will normally\footnote{Automatic
+annotation can be turned off in the {\sl Visual } tab in the {\sl Tools
+$\Rightarrow$ Preferences } dialog box.} calculate a set of automatic annotation
+rows which are shown below the alignment. For nucleotide sequence alignments,
+only an alignment consensus row will be shown, but for amino acid sequences,
+alignment quality (based on BLOSUM 62) and physicochemical conservation will
+also be shown. Conservation is calculated according to Livingstone and
+Barton\footnote{{\sl ``Protein Sequence Alignments: A Strategy for the
+Hierarchical Analysis of Residue Conservation." } Livingstone C.D. and Barton
+G.J. (1993) {\sl CABIOS } {\bf 9}, 745-756}.
+Consensus is the modal residue (or {\tt +} where there is an equal top residue).
+The inclusion of gaps in the consensus calculation can be toggled by
+right-clicking on the Consensus label and selecting {\sl Ignore Gaps in
+Consensus} from the pop-up context menu located with consensus annotation row.
+Quality is a measure of the inverse likelihood of unfavourable mutations in the alignment. Further details on these
+calculations can be found in the on-line documentation.
+
+
+\exercise{Annotating Alignments}{
+ \label{annotatingalignex}
+\exstep{Load the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}.
+Right-click on the label name of the {\sl Conservation} annotation row to
+bring up the context menu and select {\sl Add New Row}. A dialog box will
+appear asking for {\sl Annotation Name} and {\sl Annotation Description}.
+Enter "Iron binding site" and click {\sl OK}. A new, empty, row appears.
+}
+\exstep{
+Navigate to column 97. Move down and on the new annotation row called
+"Iron binding site", select column 97.
+Right click at this selection and select {\sl Label} from the context menu.
+Enter "Fe" in the box and click {\sl OK}. Right-click on the selection again
+and select {\sl Colour}.
+Choose a colour from the colour chooser dialog
+and click {\sl OK}. Press [ESC] to remove the selection.
+
+{\sl Note: depending on your Annotation sort settings, your newly
+created annotation row might "jump" to the top or bottom of the annotation
+panel. Just scroll up or down to find it again - the column you marked will
+still be selected. }
+
+}
+\exstep{ Select columns 70-77 on the annotation row. Right-click and choose {\sl Sheet} from the
+ context menu. You will be prompted for a label. Enter "B" and press {\sl OK}. A new line showing the
+ sheet as an arrow appears. The colour of the label can be changed but not the colour of the sheet
+ arrow.
+}
+\exstep{Right click on the title text in the annotation row that you just
+created.
+Select {\sl Export Annotation} in context menu and, in the Export Annotation
+dialog box that will open, select the Jalview format and click the {\sl [To Textbox]} button.
+(The format for this file is given in the Jalview help. Press [F1] to open it ([F1]-[Fn] (Mac)),
+and find the "Annotations File Format" entry in the "Alignment Annotations" section of the contents
+pane.) }
+
+\exstep{Open a text editor and copy the annotation text into the editor.
+Edit the text by changing the name of the annotation row and save the file.}
+\exstep{Drag the file onto the alignment in Jalview and check the annotation
+panel.} \exstep{Return to the text editor, add an additional helix somewhere
+along the row, save the file and re-importing it into Jalview as previously.
+{\sl Hint: Use the Export Annotation function to view what helix annotation looks like in
+a Jalview annotation file.}}
+\exstep{In the alignment window menu, select {\sl File $\Rightarrow$ Export Annotations...}
+to export all the alignment's annotation to a file. Save the file.}
+\exstep{Open the exported annotation in a text editor, and use the Annotation File Format
+documentation to modify the style of the Conservation, Consensus and Quality annotation rows so
+they appear as several lines on a single line graph.
+{\sl Hint: You need to change the style of annotation row in the first field of the annotation
+row entry in the file. Create an annotation row grouping to overlay the
+three quantitative annotation rows.}
+}
+\exstep{{\bf Homework once you have completed exercise
+\ref{secstrpredex}:}
+\label{viewannotfileex}
+
+Recover or recreate the secondary structure predictions that you made from
+JPred. Use the {\sl File $\Rightarrow$ Export Annotation} function to view the Jnet secondary structure prediction annotation row.
+Note: the
+SEQUENCE\_REF statements surrounding the row specifying the sequence association for the
+annotation.
+}
+\bf See the video at:
+\url{http://www.jalview.org/training/Training-Videos}.}
+
+
+\section{Sequence Features}
+Sequence features are annotation associated with a specific sequence - often marking a specific region, such as a domain or binding site. Jalview allows features to be created simply by selecting the area in a sequence (or sequences) to form the feature and selecting {\sl Selection $\Rightarrow$ Create Sequence Feature } from the right-click context menu (Figure \ref{features}). A dialog box allows the user to customise the feature with respect to name, group, and colour. The feature is then associated with the sequence. Moving the mouse over a residue associated with a feature brings up a tool tip listing all features associated with the residue.
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=2in]{images/feature1.pdf}
+\includegraphics[width=2.5in]{images/feature2.pdf}
+\includegraphics[width=1.5in]{images/feature3.pdf}
+\caption{{\bf Creating sequence features.} Features can readily be created from selections via the context menu and are then displayed on the sequence. }
+\label{features}
+\end{center}
+\end{figure}
+
+Creation of features from a selection spanning multiple sequences results in the creation of one feature per sequence.
+Each feature remains associated with its own sequence.
+
+%%TODO: change EMBL to ENA in Jalview and the Manual !
+
+\section{Importing Features from Databases}
+\label{featuresfromdb}
+Jalview supports feature retrieval from public databases.
+It includes built in parsers for Uniprot, Ensembl and ENA (or EMBL) records retrieved
+from the EBI. Sequences retrieved from these sources using the sequence fetcher (see
+Section \ref{fetchseq}) will already possess features.
+
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[width=4in]{images/features4.pdf}
+\caption{{\bf Multiple sequence features.} An alignment with JPred secondary structure prediction annotation below it, and many sequence features overlaid onto the aligned sequences. The tooltip lists the features annotating the residue below the mouse-pointer.}
+\end{center}
+\end{figure}
+
+
+\subsection{Sequence Database Reference Retrieval}
+\label{fetchdbrefs}
+Jalview maintains a list of external database references for each sequence in
+an alignment. These are listed in a tooltip when the mouse is moved over the
+sequence ID when the {\sl View $\Rightarrow$ Sequence ID Tooltip $\Rightarrow$
+Show Database Refs } option is enabled. Sequences retrieved using the sequence
+fetcher will always have at least one database reference, but alignments
+imported from an alignment file generally have no database references.
+
+\subsubsection{Database References and Sequence Coordinate Systems}
+
+Jalview displays features in the local sequence's coordinate system which is
+given by its `start' and `end'. Any sequence features on the sequence will be
+rendered relative to the sequence's start position. If the start/end positions
+do not match the coordinate system from which the features were defined, then
+the features will be displayed incorrectly.
+
+\subsubsection{Viewing and Exporting a Sequence's Database Annotation}
+
+You can export all the database cross references and annotation terms shown in
+the sequence ID tooltip for a sequence by right-clicking and selecting the {\sl
+[Sequence ID] $\Rightarrow$ Sequence Details} option from the popup
+menu.
+A similar option is provided in the {\sl Selection} sub-menu allowing you to
+obtain annotation for the sequences currently selected.
+
+\parbox[l]{3.4in}{
+The {\sl Sequence Details
+\ldots} option will open a window containing the same text as would be shown in
+the tooltip window, including any web links associated with the sequence. The
+text is HTML, and options on the window allow the raw code to be copied and
+pasted into a web page.}