+
+\section{Conservation, Quality and Conservation Annotation}
+\label{annotationintro}
+Jalview automatically calculates several quantitative alignment annotations
+which are displayed as histograms below the multiple sequence alignment columns.
+Conservation, quality and conservation 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{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}
+
+Annotations are properties that apply to the alignment as a whole and are visualized on rows in the annotation panel.
+To create a new annotation row, right click on the annotation label panel and select the {\sl Add New Row} menu option (Figure \ref{newannotrow}).
+A dialogue box appears. Enter the label to use for this row and a new row will appear.
+
+To create a new annotation, first select all the positions to be annotated on the appropriate row.
+Right-clicking on this selection brings up the context menu which allows the insertion of graphics for secondary structure ({\sl Helix} or {\sl Sheet}),
+text {\sl Label} and the colour in which to present the annotation (Figure \ref{newannot}). On selecting {\sl Label} a dialogue box will appear,
+requesting the text to place at that position. After the text is entered, the selection can be removed and the annotation becomes clearly
+visible\footnote{When annotating a block of positions, the text can be partly obscured by the selection highlight. Pressing the [ESC] key clears
+the selection and the label is then visible.}. Annotations can be coloured or deleted as desired.
+
+\begin{figure}[htbp]
+\begin{center}
+\includegraphics[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}
+
+\exercise{Annotating Alignments}{
+\exstep{Load the alignment at \textsf{http://www.jalview.org/tutorial/alignment.fa}.
+Right-click on the {\sl Conservation} annotation row to
+bring up the context menu and select {\sl Add New Row}. A dialogue box will appear asking for {\sl Label for annotation}.
+Enter ``Iron binding site" and click OK. A new, empty, row appears.
+}
+\exstep{
+Navigate to column 97. Move down and on the new annotation row called
+``Iron binding site, select column 97.
+Right click at this selection and select {\sl Label} from the context menu.
+Enter ``Fe" in the box and click OK. Right-click on the selection again and select {\sl Colour}.
+Choose a colour from the colour chooser dialogue
+and click OK. Press [ESC] to remove the selection.
+}
+\exstep{ Select columns 70-77 on the annotation row. Right-click and choose {\sl Sheet} from the
+ context menu. You will be prompted for a label. Enter ``B" and press OK. A new line showing the
+ sheet as an arrow appears. The colour of the label can be changed but not the colour of the sheet
+ arrow.
+}
+\exstep{Right click on the title text of annotation row that you just created.
+Select {\sl Export Annotation} and, in the {\bf Export Annotation} dialog box that will open, select the Jalview format and click
+the [To Textbox] button.
+
+The format for this file is given in the Jalview help. Press [F1] to open it, and find
+the ``Annotations File Format'' entry in the ``Alignment Annotations'' section of the contents
+pane. }
+
+\exstep{Export the file to a text editor and edit the file to change the name of the annotation
+row. Save the file and drag it onto the alignment view.}
+\exstep{Try to add an additional helix somewhere along the row by editing the file and
+re-importing it.
+{\sl Hint: Use the {\bf Export Annotation} function to view what helix annotation looks like in
+a Jalview annotation file.}}
+\exstep{Use the {\sl Alignment Window $\Rightarrow$ File $\Rightarrow$ Export Annotations...}
+function to export all the alignment's annotation to a file.}
+\exstep{Open the exported annotation in a text editor, and use the {\bf Annotation File Format}
+documentation to modify the style of the Conservation, Consensus and Quality annotation rows so
+they appear as several lines on a single line graph.
+{\sl Hint: You need to change the style of annotation row in the first field of the annotation
+row entry in the file, and create an annotation row grouping to overlay the three quantitative
+annotation rows.}
+}
+\label{viewannotfileex}\exstep{Recover or recreate the secondary structure
+prediction that you made in exercise \ref{secstrpredex}. Use the {\sl File $\Rightarrow$ Export
+Annotation} function to view the Jnet secondary structure prediction annotation row. Note the
+{\bf SEQUENCE\_REF} statements surrounding the row specifying the sequence association for the
+annotation. } }
+