graduated feature schemes (with visual indication of thresholding)
[jalview.git] / help / html / features / featuresFormat.html
1 <html>
2
3 <head>
4 <title>Sequence Features File</title>
5 </head>
6
7 <body>
8 <p><strong>Sequence Features File</strong></p>
9 <p>The Sequence features file (which used to be known as the
10 &quot;Groups file&quot; 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>
17 <ul>
18         <li>from the command line<strong><pre>
19  -features &lt;<em>Features filename</em>&gt;</pre></strong></li>
20         <li>Dragging a features file onto an alignment window</li>
21         <li>Via the &quot;Load Features / Annotations&quot; entry in the <strong>File</strong>
22         menu of an alignment window.</li>
23 </ul>
24 </p>
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
28 allowed</strong>.</p>
29 <p>The first set of lines contain type definitions:<strong>
30 <pre><em>Feature label</em>&#9;<em>Feature Colour</em><!-- &#9<em>Feature links</em>  --></pre> </strong>A feature
31 type has a text label, and a colour specification. This can be either:
32 <ul>
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 <a href="featureschemes.html">graduated colourscheme</a> specified as a &quot;|&quot; separated list
37         of fields:<pre>
38 &lt;mincolor&gt;|&lt;maxcolor&gt;|[absolute|]&lt;minvalue&gt;|&lt;maxvalue&gt;[|&lt;thresholdtype&gt;|[&lt;threshold value&gt;]]
39 </pre>The fields are as follows
40         <ul>
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.
49                 </li>
50                 <li><em>thresholdtype</em> <br>
51                 Either &quot;none&quot;, &quot;below&quot;, or &quot;above&quot;. <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>
55         </ul>
56         </li>
57 </ul>
58 </p>
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.
65 <pre>
66 <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>
67 Normally, sequence features are associated with sequences rather than
68 alignments, and the sequenceIndex field is given as &quot;-1&quot;. In
69 order to specify a sequence by its index in a particular alignment, the
70 sequenceId should be given as &quot;ID_NOT_SPECIFIED&quot;, otherwise
71 the sequenceId field will be used in preference to the sequenceIndex
72 field.
73 </p>
74 <p>The description may contain simple HTML document body tags if
75 enclosed by &quot;&lt;html&gt;&lt;/html&gt;&quot; 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
78 will be removed).<br>
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.
91 <em>Scores</em><br>
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.
93 </p>
94 <p>Feature annotations can be collected into named groups by
95 prefixing definitions with lines of the form:<strong><pre>startgroup&#9;groupname</pre></strong>..
96 and subsequently post-fixing the group with:<strong><pre>endgroup&#9;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 :
101 <pre>
102 domain&#9;red
103 metal ion-binding site&#9;00ff00
104 transit peptide&#9;0,105,215
105 chain&#9;225,105,0
106 modified residue&#9;105,225,35
107 signal peptide&#9;0,155,165
108 helix&#9;ff0000
109 strand&#9;00ff00
110 coil&#9;cccccc
111 Your Own description here&#9;FER_CAPAA&#9;-1&#9;3&#9;93&#9;domain
112 Your Own description here&#9;FER_CAPAN&#9;-1&#9;48&#9;144&#9;chain
113 Your Own description here&#9;FER_CAPAN&#9;-1&#9;50&#9;140&#9;domain
114 Your Own description here&#9;FER_CAPAN&#9;-1&#9;136&#9;136&#9;modified residue
115 Your Own description here&#9;FER1_LYCES&#9;-1&#9;1&#9;47&#9;transit peptide
116 Your Own description here&#9;Q93XJ9_SOLTU&#9;-1&#9;1&#9;48&#9;signal peptide
117 Your Own description here&#9;Q93XJ9_SOLTU&#9;-1&#9;49&#9;144&#9;chain
118 startgroup&#9;secondarystucture
119 PDB secondary structure annotation&#9;FER1_SPIOL&#9;-1&#9;52&#9;59&#9;strand
120 PDB secondary structure annotation&#9;FER1_SPIOL&#9;-1&#9;74&#9;80&#9;helix
121 endgroup&#9;secondarystructure
122 </pre>
123 </li>
124 </p>
125 </body>
126 </html>