3 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 * Copyright (C) $$Year-Rel$$ The Jalview Authors
6 * This file is part of Jalview.
8 * Jalview is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation, either version 3
11 * of the License, or (at your option) any later version.
13 * Jalview is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 * PURPOSE. See the GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
20 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 <meta name="generator" content="HTML Tidy, see www.w3.org">
24 <title>Sequence Features File</title>
28 <strong>Sequence Features File</strong>
30 <p>The Sequence features file (which used to be known as the
31 "Groups file" prior to version 2.08) is a simple way of getting your
32 own sequence annotations into Jalview. It was introduced to allow
33 sequence features to be rendered in the Jalview applet, and so is
34 intentionally lightweight and minimal because the applet is often
35 used in situations where data file size must be kept to a minimum,
36 and no XML parser is available.</p>
39 Features files are imported into Jalview in the following ways:<br>
41 <li>from the command line <pre>
42 <strong> -features <<em>Features filename</em>></strong>
46 <li>Dragging a features file onto an alignment window</li>
48 <li>Via the "Load Features / Annotations" entry in
49 the <strong>File</strong> menu of an alignment window.
56 <strong>Sequence Features File Format</strong>
59 A features file is a simple ASCII text file, where each line
60 contains tab separated text fields. <strong>No comments are
63 <p>The first set of lines contain type definitions:
65 <strong><em>Feature label</em>	<em>Feature Colour</em>
66 <!-- 	<em>Feature links</em> --></strong>
69 A feature type has a text label, and a colour specification. This can
73 <li>A single colour specified as either a red,green,blue 24 bit
74 triplet in hexadecimal (eg. 00ff00) or as comma separated numbers
75 (ranging from 0 to 255))</li>
77 <li>A <a href="featureschemes.html">graduated colourscheme</a>
78 specified as a "|" separated list of fields: <pre>
79 [label|]<mincolor>|<maxcolor>|[absolute|]<minvalue>|<maxvalue>[|<thresholdtype>|[<threshold value>]]
80 </pre> The fields are as follows:
83 <li><em>label</em><br> Indicate that the feature
84 description should be used to create a colour for features of
85 this type.<br> <em>Note: if no threshold value is
86 needed then the final '|' may be omitted.<br> This
87 keyword was added in Jalview 2.6
90 <li><em>mincolor</em> and <em>maxcolor</em><br> Colour
91 triplets specified as hexadecimal or comma separated values
92 (may be left blank for a <em>label</em> style colourscheme,
93 but remember to specify the remaining fields)</li>
95 <li><em>absolute</em><br> An optional switch
96 indicating that the <em>minvalue</em> and <em>maxvalue</em>
97 parameters should be left as is, rather than rescaled
98 according to the range of scores for this feature type.</li>
100 <li><em>minvalue</em> and <em>maxvalue</em><br>
101 Minimum and maximum values defining the range of scores for
102 which the colour range will be defined over. If minvalue is
103 greater than maxvalue then the linear mapping will have
104 negative gradient.</li>
106 <li><em>thresholdtype</em><br> Either
107 "none", "below", or "above". <em>below</em>
108 and <em>above</em> require an additional <em>threshold
109 value</em> which is used to control the display of features with
110 a score either below or above the value.</li>
116 <p>The remaining lines in the file are the sequence annotation
117 definitions, where the now defined features are attached to regions
118 on particular sequences. Each feature can optionally include some
119 descriptive text which is displayed in a tooltip when the mouse is
120 near the feature on that sequence (and can also be used to generate
121 a colour the feature).</p>
124 If your sequence annotation is already available in <a href="http://gmod.org/wiki/GFF2">GFF2</a> (http://gmod.org/wiki/GFF2) or
125 <a href="https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md">GFF3</a>
126 (http://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md) format,
127 then you can leave it as is, after first adding a line containing only
128 'GFF' after any Jalview feature colour definitions (<em>this
129 mixed format capability was added in Jalview 2.6</em>). Alternately,
130 you can use Jalview's own sequence feature annotation format, which
131 additionally allows HTML and URLs to be directly attached to each
136 <strong>Jalview's sequence feature annotation format</strong>
138 <p>Each feature is specified as a tab-separated series of columns
141 <em>description</em>	<em>sequenceId</em>	<em>sequenceIndex</em>	<em>start</em>	<em>end</em>	<em>featureType</em>	<em>score (optional)</em>
144 This format allows two alternate ways of referring to a sequence,
145 either by its text ID, or its index (base 0) in an associated
146 alignment. Normally, sequence features are associated with sequences
147 rather than alignments, and the sequenceIndex field is given as
148 "-1". In order to specify a sequence by its index in a
149 particular alignment, the sequenceId should be given as
150 "ID_NOT_SPECIFIED", otherwise the sequenceId field will be
151 used in preference to the sequenceIndex field.
156 The description may contain simple HTML document body tags if
157 enclosed by "<html></html>" and these will be
158 rendered as formatted tooltips in the Jalview Application (the
159 Jalview applet is not capable of rendering HTML tooltips, so all
160 formatting tags will be removed).<br> <em>Attaching Links
161 to Sequence Features</em><br> Any anchor tags in an html formatted
162 description line will be translated into URL links. A link symbol
163 will be displayed adjacent to any feature which includes links, and
164 these are made available from the <a
165 href="../menus/popupMenu.html#sqid.popup">links submenu</a>
166 of the popup menu which is obtained by right-clicking when a link
167 symbol is displayed in the tooltip.<br> <em>Non-positional
168 features</em><br> Specify the <em>start</em> and <em>end</em> for
169 a feature to be <strong>0</strong> in order to attach it to the
170 whole sequence. Non-positional features are shown in a tooltip when
171 the mouse hovers over the sequence ID panel, and any embedded links
172 can be accessed from the popup menu.<br /> <em>Scores</em><br>
173 Scores can be associated with sequence features, and used to sort
174 sequences or shade the alignment (this was added in Jalview 2.5).
175 The score field is optional, and malformed scores will be ignored.
178 <p>Feature annotations can be collected into named groups by
179 prefixing definitions with lines of the form:
181 <strong>startgroup groupname</strong>
184 .. and subsequently post-fixing the group with:
187 <strong>endgroup groupname</strong>
190 Feature grouping was introduced in version 2.08, and used to control
191 whether a set of features are either hidden or shown together in the
192 <a href="seqfeatures.html">sequence Feature settings dialog box</a>.
196 <p>A complete example is shown below :
199 metal ion-binding site	00ff00
200 transit peptide	0,105,215
202 modified residue	105,225,35
203 signal peptide	0,155,165
207 Your Own description here	FER_CAPAA	-1	3	93	domain
208 Your Own description here	FER_CAPAN	-1	48	144	chain
209 Your Own description here	FER_CAPAN	-1	50	140	domain
210 Your Own description here	FER_CAPAN	-1	136	136	modified residue
211 Your Own description here	FER1_LYCES	-1	1	47	transit peptide
212 Your Own description here	Q93XJ9_SOLTU	-1	1	48	signal peptide
213 Your Own description here	Q93XJ9_SOLTU	-1	49	144	chain
214 startgroup	secondarystucture
215 PDB secondary structure annotation	FER1_SPIOL	-1	52	59	strand
216 PDB secondary structure annotation	FER1_SPIOL	-1	74	80	helix
217 endgroup	secondarystructure
219 FER_CAPAA	GffGroup	domain	3	93	.	.