4 <title>Sequence Features File</title>
8 <p><strong>Sequence Features File</strong></p>
9 <p>The Sequence features file (which used to be known as the
10 "Groups file" prior to version 2.08) is a simple way of
11 getting your own sequence annotations into Jalview. It was introduced to
12 allow sequence features to be rendered in the Jalview applet, and so is
13 intentionally lightweight and minimal because the applet is often used
14 in situations where data file size must be kept to a minimum, and no XML
15 parser is available.</p>
16 <p>Features files are imported into Jalview in the following ways:<br>
18 <li>from the command line<strong><pre>
19 -features <<em>Features filename</em>></pre></strong></li>
20 <li>Dragging a features file onto an alignment window</li>
21 <li>Via the "Load Features / Annotations" entry in the <strong>File</strong>
22 menu of an alignment window.</li>
25 <p><strong>Sequence Features File Format</strong></p>
26 <p>A features file is a simple ASCII text file, where each line
27 contains tab separated text fields. <strong>No comments are
29 <p>The first set of lines contain type definitions:<strong>
30 <pre><em>Feature label</em>	<em>Feature Colour</em><!-- 	<em>Feature links</em> --></pre> </strong>A feature
31 type has a text label, and a colour specification. This can be either:
33 <li>A single colour specified as either a red,green,blue 24 bit
34 triplet in hexadecimal (eg. 00ff00) or as comma separated numbers
35 (ranging from 0 to 255))</li>
36 <li>A graduated colour specified as a "|" separated list
38 <mincolor>|<maxcolor>|[absolute|]<minvalue>|<maxvalue>[|<thresholdtype>|[<threshold value>]]
39 </pre>The fields are as follows
41 <li><em>mincolor</em> and <em>maxcolor</em><br>
42 Colour triplets specified as hexadecimal or comma separated values</li>
43 <li><em>absolute</em><br>
44 An optional switch indicating that the <em>minvalue</em> and <em>maxvalue</em>
45 parameters should be left as is, rather than rescaled according to the
46 range of scores for this feature type.
47 <li><em>minvalue</em> and <em>maxvalue</em><br>
48 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.
50 <li><em>thresholdtype</em> <br>
51 Either "none", "below", or "above". <em>below</em>
52 and <em>above</em> require an additional <em>threshold value</em>
53 which is used to control the display of features with a score either
54 below or above the value.</li>
59 <p>The remaining lines in the file are the sequence annotation
60 definitions, where the now defined features are attached to regions on
61 particular sequences, optionally with some descriptive text (displayed
62 in a tooltip when the mouse is near the feature on that sequence). There
63 are two alternate ways of referring to a sequence, either by its text
64 ID, or its index in an associated alignment.
66 <em>description</em>	<em>sequenceId</em>	<em>sequenceIndex</em>	<em>start</em>	<em>end</em>	<em>featureType</em>	<em>score (optional)</em></pre>
67 Normally, sequence features are associated with sequences rather than
68 alignments, and the sequenceIndex field is given as "-1". In
69 order to specify a sequence by its index in a particular alignment, the
70 sequenceId should be given as "ID_NOT_SPECIFIED", otherwise
71 the sequenceId field will be used in preference to the sequenceIndex
74 <p>The description may contain simple HTML document body tags if
75 enclosed by "<html></html>" and these will be
76 rendered as formatted tooltips in the Jalview Application (the Jalview
77 applet is not capable of rendering HTML tooltips, so all formatting tags
79 <em>Attaching Links to Sequence Features</em> <br>
80 Any anchor tags in an html formatted description line will be translated
81 into URL links. A link symbol will be displayed adjacent to any feature
82 which includes links, and these are made available from the <a
83 href="../menus/popupMenu.html#sqid.popup">links submenu</a> of the
84 popup menu which is obtained by right-clicking when a link symbol is
85 displayed in the tooltip.<br>
86 <em>Non-positional features</em><br>
87 Specify the <em>start</em> and <em>end</em> for a feature to be <strong>0</strong>
88 in order to attach it to the whole sequence. Non-positional features are
89 shown in a tooltip when the mouse hovers over the sequence ID panel, and
90 any embedded links can be accessed from the popup menu.
92 Scores can be associated with sequence features, and used to sort sequences or shade the alignment (this was added in jalview 2.4.X). The score field is optional, and malformed scores will be ignored.
94 <p>Feature annotations can be collected into named groups by
95 prefixing definitions with lines of the form:<strong><pre>startgroup	groupname</pre></strong>..
96 and subsequently post-fixing the group with:<strong><pre>endgroup	groupname</pre></strong>Feature
97 grouping was introduced in version 2.08, and used to control whether a
98 set of features are either hidden or shown together in the <a
99 href="seqfeatures.html">sequence Feature settings dialog box</a>.</p>
100 <p>A complete example is shown below :
103 metal ion-binding site	00ff00
104 transit peptide	0,105,215
106 modified residue	105,225,35
107 signal peptide	0,155,165
111 Your Own description here	FER_CAPAA	-1	3	93	domain
112 Your Own description here	FER_CAPAN	-1	48	144	chain
113 Your Own description here	FER_CAPAN	-1	50	140	domain
114 Your Own description here	FER_CAPAN	-1	136	136	modified residue
115 Your Own description here	FER1_LYCES	-1	1	47	transit peptide
116 Your Own description here	Q93XJ9_SOLTU	-1	1	48	signal peptide
117 Your Own description here	Q93XJ9_SOLTU	-1	49	144	chain
118 startgroup	secondarystucture
119 PDB secondary structure annotation	FER1_SPIOL	-1	52	59	strand
120 PDB secondary structure annotation	FER1_SPIOL	-1	74	80	helix
121 endgroup	secondarystructure