185b874c6df053deded155b34c9f6198a533159d
[jalview.git] / help / html / features / featuresFormat.html
1 #-------------------------------------------------------------------------------
2 # Jalview - A Sequence Alignment Editor and Viewer (Version 2.5.1)
3 # Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
4
5 # This file is part of Jalview.
6
7 # Jalview is free software: you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License 
9 # as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10
11 # Jalview is distributed in the hope that it will be useful, but 
12 # WITHOUT ANY WARRANTY; without even the implied warranty 
13 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14 # PURPOSE.  See the GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17 #-------------------------------------------------------------------------------
18 <html>
19 <!--
20  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
21  * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
22  * 
23  * This file is part of Jalview.
24  * 
25  * Jalview is free software: you can redistribute it and/or
26  * modify it under the terms of the GNU General Public License 
27  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
28  * 
29  * Jalview is distributed in the hope that it will be useful, but 
30  * WITHOUT ANY WARRANTY; without even the implied warranty 
31  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
32  * PURPOSE.  See the GNU General Public License for more details.
33  * 
34  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
35 -->
36 <head>
37 <title>Sequence Features File</title>
38 </head>
39
40 <body>
41 <p><strong>Sequence Features File</strong></p>
42 <p>The Sequence features file (which used to be known as the
43 &quot;Groups file&quot; prior to version 2.08) is a simple way of
44 getting your own sequence annotations into Jalview. It was introduced to
45 allow sequence features to be rendered in the Jalview applet, and so is
46 intentionally lightweight and minimal because the applet is often used
47 in situations where data file size must be kept to a minimum, and no XML
48 parser is available.</p>
49 <p>Features files are imported into Jalview in the following ways:<br>
50 <ul>
51         <li>from the command line<strong><pre>
52  -features &lt;<em>Features filename</em>&gt;</pre></strong></li>
53         <li>Dragging a features file onto an alignment window</li>
54         <li>Via the &quot;Load Features / Annotations&quot; entry in the <strong>File</strong>
55         menu of an alignment window.</li>
56 </ul>
57 </p>
58 <p><strong>Sequence Features File Format</strong></p>
59 <p>A features file is a simple ASCII text file, where each line
60 contains tab separated text fields. <strong>No comments are
61 allowed</strong>.</p>
62 <p>The first set of lines contain type definitions:<strong>
63 <pre><em>Feature label</em>&#9;<em>Feature Colour</em><!-- &#9<em>Feature links</em>  --></pre> </strong>A feature
64 type has a text label, and a colour specification. This can be either:
65 <ul>
66         <li>A single colour specified as either a red,green,blue 24 bit
67         triplet in hexadecimal (eg. 00ff00) or as comma separated numbers
68         (ranging from 0 to 255))</li>
69         <li>A <a href="featureschemes.html">graduated colourscheme</a> specified as a &quot;|&quot; separated list
70         of fields:<pre>
71 &lt;mincolor&gt;|&lt;maxcolor&gt;|[absolute|]&lt;minvalue&gt;|&lt;maxvalue&gt;[|&lt;thresholdtype&gt;|[&lt;threshold value&gt;]]
72 </pre>The fields are as follows
73         <ul>
74                 <li><em>mincolor</em> and <em>maxcolor</em><br>
75                 Colour triplets specified as hexadecimal or comma separated values</li>
76                 <li><em>absolute</em><br>
77                 An optional switch indicating that the <em>minvalue</em> and <em>maxvalue</em>
78                 parameters should be left as is, rather than rescaled according to the
79                 range of scores for this feature type.
80                 <li><em>minvalue</em> and <em>maxvalue</em><br>
81                 Minimum and maximum values defining the range of scores for which the colour range will be defined over. If minvalue is greater than maxvalue then the linear mapping will have negative gradient.
82                 </li>
83                 <li><em>thresholdtype</em> <br>
84                 Either &quot;none&quot;, &quot;below&quot;, or &quot;above&quot;. <em>below</em>
85                 and <em>above</em> require an additional <em>threshold value</em>
86                 which is used to control the display of features with a score either
87                 below or above the value.</li>
88         </ul>
89         </li>
90 </ul>
91 </p>
92 <p>The remaining lines in the file are the sequence annotation
93 definitions, where the now defined features are attached to regions on
94 particular sequences, optionally with some descriptive text (displayed
95 in a tooltip when the mouse is near the feature on that sequence). There
96 are two alternate ways of referring to a sequence, either by its text
97 ID, or its index in an associated alignment.
98 <pre>
99 <em>description</em>&#9;<em>sequenceId</em>&#9;<em>sequenceIndex</em>&#9;<em>start</em>&#9;<em>end</em>&#9;<em>featureType</em>&#9;<em>score (optional)</em></pre>
100 Normally, sequence features are associated with sequences rather than
101 alignments, and the sequenceIndex field is given as &quot;-1&quot;. In
102 order to specify a sequence by its index in a particular alignment, the
103 sequenceId should be given as &quot;ID_NOT_SPECIFIED&quot;, otherwise
104 the sequenceId field will be used in preference to the sequenceIndex
105 field.
106 </p>
107 <p>The description may contain simple HTML document body tags if
108 enclosed by &quot;&lt;html&gt;&lt;/html&gt;&quot; and these will be
109 rendered as formatted tooltips in the Jalview Application (the Jalview
110 applet is not capable of rendering HTML tooltips, so all formatting tags
111 will be removed).<br>
112 <em>Attaching Links to Sequence Features</em> <br>
113 Any anchor tags in an html formatted description line will be translated
114 into URL links. A link symbol will be displayed adjacent to any feature
115 which includes links, and these are made available from the <a
116         href="../menus/popupMenu.html#sqid.popup">links submenu</a> of the
117 popup menu which is obtained by right-clicking when a link symbol is
118 displayed in the tooltip.<br>
119 <em>Non-positional features</em><br>
120 Specify the <em>start</em> and <em>end</em> for a feature to be <strong>0</strong>
121 in order to attach it to the whole sequence. Non-positional features are
122 shown in a tooltip when the mouse hovers over the sequence ID panel, and
123 any embedded links can be accessed from the popup menu.
124 <em>Scores</em><br>
125 Scores can be associated with sequence features, and used to sort sequences or shade the alignment (this was added in jalview 2.5). The score field is optional, and malformed scores will be ignored.
126 </p>
127 <p>Feature annotations can be collected into named groups by
128 prefixing definitions with lines of the form:<strong><pre>startgroup&#9;groupname</pre></strong>..
129 and subsequently post-fixing the group with:<strong><pre>endgroup&#9;groupname</pre></strong>Feature
130 grouping was introduced in version 2.08, and used to control whether a
131 set of features are either hidden or shown together in the <a
132         href="seqfeatures.html">sequence Feature settings dialog box</a>.</p>
133 <p>A complete example is shown below :
134 <pre>
135 domain&#9;red
136 metal ion-binding site&#9;00ff00
137 transit peptide&#9;0,105,215
138 chain&#9;225,105,0
139 modified residue&#9;105,225,35
140 signal peptide&#9;0,155,165
141 helix&#9;ff0000
142 strand&#9;00ff00
143 coil&#9;cccccc
144 Your Own description here&#9;FER_CAPAA&#9;-1&#9;3&#9;93&#9;domain
145 Your Own description here&#9;FER_CAPAN&#9;-1&#9;48&#9;144&#9;chain
146 Your Own description here&#9;FER_CAPAN&#9;-1&#9;50&#9;140&#9;domain
147 Your Own description here&#9;FER_CAPAN&#9;-1&#9;136&#9;136&#9;modified residue
148 Your Own description here&#9;FER1_LYCES&#9;-1&#9;1&#9;47&#9;transit peptide
149 Your Own description here&#9;Q93XJ9_SOLTU&#9;-1&#9;1&#9;48&#9;signal peptide
150 Your Own description here&#9;Q93XJ9_SOLTU&#9;-1&#9;49&#9;144&#9;chain
151 startgroup&#9;secondarystucture
152 PDB secondary structure annotation&#9;FER1_SPIOL&#9;-1&#9;52&#9;59&#9;strand
153 PDB secondary structure annotation&#9;FER1_SPIOL&#9;-1&#9;74&#9;80&#9;helix
154 endgroup&#9;secondarystructure
155 </pre>
156 </li>
157 </p>
158 </body>
159 </html>