doco writing.
[jalview.git] / help / html / features / annotationsFormat.html
index d890321..18d773c 100755 (executable)
@@ -1,47 +1,82 @@
 <html>\r
 \r
-<head><title>Annotations File Format</title></head>\r
+<head><title>The Alignment Annotations File</title></head>\r
 \r
 <body>\r
-<p><strong>Alignment Annotations File Format</strong><strong><br>\r
-  </strong><br>\r
-  Note: This format is primarily intended to be used for the applet, which does \r
-  not have an XML parser and where file size must be kept to a minimum to reduce \r
-  download time.</p>\r
-<p>A precalculated annotations fiile can read onto an alignment from the command \r
-  line (&quot;-annotations&quot;), by drag and dropping the the annotations file \r
-  onto an alignment or by selecting from the File menu &quot;Load Features / Annotations&quot;.</p>\r
-<p>The File is in tab delimited format. The file must have the line JALVIEW_ANNOTATION \r
-  as an identifier. Then a block of annotations are added in the form GRAPH_TYPE \r
-  Label Values</p>\r
-<p>GRAPH_TYPE can be either BAR_GRAPH, LINE_GRAPH or NO_GRAPH. The values are \r
-  per alignment column, separated by &quot;|&quot;. Multiple content per column \r
-  can be separated with commas, Jalview will display the content if it interprates \r
-  the content as a text label, or secondary structure character (H or E)</p>\r
-<p>You can optionally associate an annotation with a sequence by adding a line \r
-  SEQUENCE_REFseq_namestartIndex All Annotations after a SEQUENCE_REF will be \r
-  associated with that sequence. Use SEQUENCE_REF ALIGNMENT to cancel the associtations.</p>\r
-<p>The visual graphs can be coloured or combined with other graphs, or have an \r
-  arbitrary line drawn at a certain value using the following lines.</p>\r
-<p><font size="3" face="Courier New, Courier, mono">COLOUR&lt;tab&gt;graph name&lt;tab&gt;colour<br>\r
-  COMBINE&lt;tab&gt;graph 1 name&lt;tab&gt;graph 2 name<br>\r
-  GRAPHLINE&lt;tab&gt;graph name&lt;tab&gt;value&lt;tab&gt;label&lt;tab&gt;colour</font></p>\r
-<p>An example Annotation file may look like this:</p>\r
+<p><strong>The Alignment Annotations File</strong></p>\r
+<p>Alignment annotations can be imported onto an alignment since\r
+  version 2.08 of Jalview, via an annotations file. It is a simple\r
+  ASCII text file consisting of tab\r
+  delimited records similar to the <a\r
+  href="featuresFormat.html">Sequence Features File</a>, and\r
+  introduced primarily for use with the Jalview applet.</p>\r
+<p>Alignment annotations files are imported into Jalview in the\r
+following ways:<br>\r
+<ul>\r
+<li>from the command line<strong><pre>\r
+ -annotations &lt;<em>Annotations filename</em>&gt;</pre></strong></li>\r
+<li>Dragging an annotations file onto an alignment window</li>\r
+<li>Via the &quot;Load Features / Annotations&quot; entry in the\r
+<strong>File</strong> menu of an alignment window.</li>\r
+</ul>\r
+</p>\r
+<p><strong>Annotations File Format</strong></p>\r
+<p>The File consists of lines containing an instruction followed by\r
+  tab delimited fields, and any lines starting with &quot;#&quot; are\r
+  ignored. The first non-commented out line of a valid Annotations file must begin with :<strong><pre>JALVIEW_ANNOTATION</pre></strong></p>\r
+<p>A row of annotation is added with a line like\r
+<strong><pre><em>GRAPH_TYPE</em>&#9;<em>Label</em>&#9;<em>Values</em></pre></strong>\r
+<ul>\r
+<li><em>GRAPH_TYPE</em><br>This is can be either of &quot;BAR_GRAPH&quot;,\r
+  &quot;LINE_GRAPH&quot; or &quot;NO_GRAPH&quot;, defining the type of\r
+  annotation row that is being described.\r
+  </li>\r
+  <li><em>Values</em><br>This field is a series\r
+  of symbols and/or quantities separated by the pipe symbol &quot;|&quot;,\r
+  mapped onto the columns of the alignment.<br>Some types of annotation\r
+  can display both text, symbols and quantities at each column, and these are\r
+  separated with commas within the pipe-delimited Value field. Jalview\r
+  will display the content if it's values are appropriate for the type\r
+  of the annotation being defined:<ul>\r
+<li>BAR_GRAPH<br><em>text\r
+  character</em>,<em>number</em></li>\r
+<li>LINE_GRAPH<br><em>number</em></li>\r
+<li>NO_GRAPH<br><em>text label</em>,<em>H or E for helix or strand\r
+  symbol</em></li></ul>\r
+</li></ul></p>\r
+<p>You can associate an annotation with a sequence by preceding its\r
+  definition with the line:\r
+<strong><pre>SEQUENCE_REF&#9;<em>seq_name</em>&#9;<em>[startIndex]</em></pre></strong>\r
+All Annotations defined after a SEQUENCE_REF command will then be \r
+  associated with that sequence, and the first field in the Value\r
+  field list will (optionally) be\r
+  placed at the <em>startIndex</em>'th column.</p><p>Sequence associations\r
+  are turned off for subsequent annotation definitions by:\r
+<strong><pre>SEQUENCE_REF&#9;ALIGNMENT</pre></strong></p>\r
+<p><em>LINE_GRAPH</em> type annotations can be given a colour,\r
+  combined onto the same vertical axis, and have abscissa (lines of\r
+  constant value - <em>so they are horizontal</em>) at particular\r
+  values using the following lines (respectively):<!--</p>\r
+<p><font size="3" face="Courier New, Courier, mono">-->\r
+<strong><pre>COLOUR&#9;graph name&#9;colour\r
+COMBINE&#9;graph 1 name&#9;graph 2 name\r
+GRAPHLINE&#9;graph name&#9;value&#9;label&#9;colour</pre></strong></p>\r
+<p>An example Annotation file is given below:</p>\r
 <p><font size="3" face="Courier New, Courier, mono">#Comment lines follow the hash symbol<br>\r
   JALVIEW_ANNOTATION<br>\r
   SEQUENCE_REF FER1_MESCR 5<br>\r
-  BAR_GRAPH&lt;tab&gt;Bar Graph 1&lt;tab&gt;||-100,-|-200,-|-300,-|-400,-|200,+|300,+|150,+<br>\r
-  LINE_GRAPH&lt;tab&gt;Green Values&lt;tab&gt;1.1|2.2|1.3|3.4|0.7|1.4|3.3|2.2|2.1|-1.1|3.2<br>\r
-  LINE_GRAPH&lt;tab&gt;Red Values&lt;tab&gt;2.1|3.2|1.3|-1.4|5.5|1.4|1.3|4.2|-1.1|1.1|3.2<br>\r
-  BAR_GRAPH&lt;tab&gt;Bar Graph&lt;tab&gt;2 1,.|2,*|3,:|4,.|5,*|4,:|3,.|2|1|1|2|3|4|5|4<br>\r
-  NO_GRAPH&lt;tab&gt;Icons &lt;tab&gt;||||E,Sheet1|E|E||||H,Sheet 2|H|H|H||||||<br>\r
-  NO_GRAPH&lt;tab&gt;Purple Letters&lt;tab&gt;m|y|p|r|o|t|e|i|n</font></p>\r
-<p><font size="3" face="Courier New, Courier, mono">COLOUR&lt;tab&gt;Bar Graph 2&lt;tab&gt;blue<br>\r
-  COLOUR&lt;tab&gt;Red Values&lt;tab&gt;255,0,0<br>\r
-  COLOUR&lt;tab&gt;Green Values&lt;tab&gt;green<br>\r
-  COLOUR&lt;tab&gt;Purple Letters&lt;tab&gt;151,52,228<br>\r
-  COMBINE&lt;tab&gt;Green Values&lt;tab&gt;Red Values</font></p>\r
-<p><font size="3" face="Courier New, Courier, mono">GRAPHLINE&lt;tab&gt;Red Values&lt;tab&gt;2.6&lt;tab&gt;threshold&lt;tab&gt;black \r
+  BAR_GRAPH&#9;Bar Graph 1&#9;||-100,-|-200,-|-300,-|-400,-|200,+|300,+|150,+<br>\r
+  LINE_GRAPH&#9;Green Values&#9;1.1|2.2|1.3|3.4|0.7|1.4|3.3|2.2|2.1|-1.1|3.2<br>\r
+  LINE_GRAPH&#9;Red Values&#9;2.1|3.2|1.3|-1.4|5.5|1.4|1.3|4.2|-1.1|1.1|3.2<br>\r
+  BAR_GRAPH&#9;Bar Graph&#9;2 1,.|2,*|3,:|4,.|5,*|4,:|3,.|2|1|1|2|3|4|5|4<br>\r
+  NO_GRAPH&#9;Icons &#9;||||E,Sheet1|E|E||||H,Sheet 2|H|H|H||||||<br>\r
+  NO_GRAPH&#9;Purple Letters&#9;m|y|p|r|o|t|e|i|n</font></p>\r
+<p><font size="3" face="Courier New, Courier, mono">COLOUR&#9;Bar Graph 2&#9;blue<br>\r
+  COLOUR&#9;Red Values&#9;255,0,0<br>\r
+  COLOUR&#9;Green Values&#9;green<br>\r
+  COLOUR&#9;Purple Letters&#9;151,52,228<br>\r
+  COMBINE&#9;Green Values&#9;Red Values</font></p>\r
+<p><font size="3" face="Courier New, Courier, mono">GRAPHLINE&#9;Red Values&#9;2.6&#9;threshold&#9;black \r
   </font><br>\r
 </p>\r
 <p><br>\r