18d773c84e91dd5442bab0018804b0d523f9b283
[jalview.git] / help / html / features / annotationsFormat.html
1 <html>\r
2 \r
3 <head><title>The Alignment Annotations File</title></head>\r
4 \r
5 <body>\r
6 <p><strong>The Alignment Annotations File</strong></p>\r
7 <p>Alignment annotations can be imported onto an alignment since\r
8   version 2.08 of Jalview, via an annotations file. It is a simple\r
9   ASCII text file consisting of tab\r
10   delimited records similar to the <a\r
11   href="featuresFormat.html">Sequence Features File</a>, and\r
12   introduced primarily for use with the Jalview applet.</p>\r
13 <p>Alignment annotations files are imported into Jalview in the\r
14 following ways:<br>\r
15 <ul>\r
16 <li>from the command line<strong><pre>\r
17  -annotations &lt;<em>Annotations filename</em>&gt;</pre></strong></li>\r
18 <li>Dragging an annotations file onto an alignment window</li>\r
19 <li>Via the &quot;Load Features / Annotations&quot; entry in the\r
20 <strong>File</strong> menu of an alignment window.</li>\r
21 </ul>\r
22 </p>\r
23 <p><strong>Annotations File Format</strong></p>\r
24 <p>The File consists of lines containing an instruction followed by\r
25   tab delimited fields, and any lines starting with &quot;#&quot; are\r
26   ignored. The first non-commented out line of a valid Annotations file must begin with :<strong><pre>JALVIEW_ANNOTATION</pre></strong></p>\r
27 <p>A row of annotation is added with a line like\r
28 <strong><pre><em>GRAPH_TYPE</em>&#9;<em>Label</em>&#9;<em>Values</em></pre></strong>\r
29 <ul>\r
30 <li><em>GRAPH_TYPE</em><br>This is can be either of &quot;BAR_GRAPH&quot;,\r
31   &quot;LINE_GRAPH&quot; or &quot;NO_GRAPH&quot;, defining the type of\r
32   annotation row that is being described.\r
33   </li>\r
34   <li><em>Values</em><br>This field is a series\r
35   of symbols and/or quantities separated by the pipe symbol &quot;|&quot;,\r
36   mapped onto the columns of the alignment.<br>Some types of annotation\r
37   can display both text, symbols and quantities at each column, and these are\r
38   separated with commas within the pipe-delimited Value field. Jalview\r
39   will display the content if it's values are appropriate for the type\r
40   of the annotation being defined:<ul>\r
41 <li>BAR_GRAPH<br><em>text\r
42   character</em>,<em>number</em></li>\r
43 <li>LINE_GRAPH<br><em>number</em></li>\r
44 <li>NO_GRAPH<br><em>text label</em>,<em>H or E for helix or strand\r
45   symbol</em></li></ul>\r
46 </li></ul></p>\r
47 <p>You can associate an annotation with a sequence by preceding its\r
48   definition with the line:\r
49 <strong><pre>SEQUENCE_REF&#9;<em>seq_name</em>&#9;<em>[startIndex]</em></pre></strong>\r
50 All Annotations defined after a SEQUENCE_REF command will then be \r
51   associated with that sequence, and the first field in the Value\r
52   field list will (optionally) be\r
53   placed at the <em>startIndex</em>'th column.</p><p>Sequence associations\r
54   are turned off for subsequent annotation definitions by:\r
55 <strong><pre>SEQUENCE_REF&#9;ALIGNMENT</pre></strong></p>\r
56 <p><em>LINE_GRAPH</em> type annotations can be given a colour,\r
57   combined onto the same vertical axis, and have abscissa (lines of\r
58   constant value - <em>so they are horizontal</em>) at particular\r
59   values using the following lines (respectively):<!--</p>\r
60 <p><font size="3" face="Courier New, Courier, mono">-->\r
61 <strong><pre>COLOUR&#9;graph name&#9;colour\r
62 COMBINE&#9;graph 1 name&#9;graph 2 name\r
63 GRAPHLINE&#9;graph name&#9;value&#9;label&#9;colour</pre></strong></p>\r
64 <p>An example Annotation file is given below:</p>\r
65 <p><font size="3" face="Courier New, Courier, mono">#Comment lines follow the hash symbol<br>\r
66   JALVIEW_ANNOTATION<br>\r
67   SEQUENCE_REF FER1_MESCR 5<br>\r
68   BAR_GRAPH&#9;Bar Graph 1&#9;||-100,-|-200,-|-300,-|-400,-|200,+|300,+|150,+<br>\r
69   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
70   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
71   BAR_GRAPH&#9;Bar Graph&#9;2 1,.|2,*|3,:|4,.|5,*|4,:|3,.|2|1|1|2|3|4|5|4<br>\r
72   NO_GRAPH&#9;Icons &#9;||||E,Sheet1|E|E||||H,Sheet 2|H|H|H||||||<br>\r
73   NO_GRAPH&#9;Purple Letters&#9;m|y|p|r|o|t|e|i|n</font></p>\r
74 <p><font size="3" face="Courier New, Courier, mono">COLOUR&#9;Bar Graph 2&#9;blue<br>\r
75   COLOUR&#9;Red Values&#9;255,0,0<br>\r
76   COLOUR&#9;Green Values&#9;green<br>\r
77   COLOUR&#9;Purple Letters&#9;151,52,228<br>\r
78   COMBINE&#9;Green Values&#9;Red Values</font></p>\r
79 <p><font size="3" face="Courier New, Courier, mono">GRAPHLINE&#9;Red Values&#9;2.6&#9;threshold&#9;black \r
80   </font><br>\r
81 </p>\r
82 <p><br>\r
83 </p>\r
84 </body>\r
85 </html>\r