6b86d2264e06c0dc6761544e42d6d28f548cc4a2
[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></pre> </strong>A feature
31 type has a text label, and a colour (specified as a red,green,blue 24
32 bit triplet either in hexadecimal (eg. 00ff00) or as comma separated
33 numbers (ranging from 0 to 255)).</p>
34 <p>The remaining lines in the file are the sequence annotation
35 definitions, where the now defined features are attached to regions on
36 particular sequences, optionally with some descriptive text (displayed
37 in a tooltip when the mouse is near the feature on that sequence). There
38 are two alternate ways of referring to a sequence, either by its text
39 ID, or its index in an associated alignment.
40 <pre>
41 <em>description</em>&#9;<em>sequenceId</em>&#9;<em>sequenceIndex</em>&#9;<em>start</em>&#9;<em>end</em>&#9;<em>featureType</em></pre>
42 Normally, sequence features are associated with sequences rather than
43 alignments, and the sequenceIndex field is given as &quot;-1&quot;. In
44 order to specify a sequence by its index in a particular alignment, the
45 sequenceId should be given as &quot;ID_NOT_SPECIFIED&quot;, otherwise
46 the sequenceId field will be used in preference to the sequenceIndex
47 field.
48 </p>
49 <p>The description may contain simple HTML
50 document body tags if enclosed by &quot;&lt;html&gt;&lt;/html&gt;&quot; and
51 these will be rendered as formatted tooltips in the Jalview Application
52 (the Jalview applet is not capable of rendering HTML tooltips, so all
53 formatting tags will be removed).<br>
54 <em>Attaching Links to Sequence Features</em>
55 <br>Any anchor tags in an html formatted description line will be translated 
56 into URL links. A link symbol will be displayed adjacent to any feature which
57 includes links, and these are made available from the 
58 <a href="../menus/popupMenu.html#sqid.popup">links submenu</a> of the 
59 popup menu which is obtained by right-clicking when a link symbol is 
60 displayed in the tooltip.<br>
61 <em>Non-positional features</em><br>
62 Specify the <em>start</em> and <em>end</em> for a feature to be <strong>0</strong> in order to attach it to the whole sequence.
63 Non-positional features are shown in a tooltip when the mouse hovers over the seuqence ID panel, and any embedded links can be accessed from the popup menu. 
64 </p>
65
66 <p>Feature annotations can be collected into named groups by
67 prefixing definitions with lines of the form:<strong><pre>startgroup&#9;groupname</pre></strong>..
68 and subsequently post-fixing the group with:<strong><pre>endgroup&#9;groupname</pre></strong>Feature
69 grouping was introduced in version 2.08, and used to control whether a
70 set of features are either hidden or shown together in the <a
71         href="seqfeatures.html">sequence Feature settings dialog box</a>.</p>
72 <p>A complete example is shown below :
73 <pre>
74 domain&#9;red
75 metal ion-binding site&#9;00ff00
76 transit peptide&#9;0,105,215
77 chain&#9;225,105,0
78 modified residue&#9;105,225,35
79 signal peptide&#9;0,155,165
80 helix&#9;ff0000
81 strand&#9;00ff00
82 coil&#9;cccccc
83 Your Own description here&#9;FER_CAPAA&#9;-1&#9;3&#9;93&#9;domain
84 Your Own description here&#9;FER_CAPAN&#9;-1&#9;48&#9;144&#9;chain
85 Your Own description here&#9;FER_CAPAN&#9;-1&#9;50&#9;140&#9;domain
86 Your Own description here&#9;FER_CAPAN&#9;-1&#9;136&#9;136&#9;modified residue
87 Your Own description here&#9;FER1_LYCES&#9;-1&#9;1&#9;47&#9;transit peptide
88 Your Own description here&#9;Q93XJ9_SOLTU&#9;-1&#9;1&#9;48&#9;signal peptide
89 Your Own description here&#9;Q93XJ9_SOLTU&#9;-1&#9;49&#9;144&#9;chain
90 startgroup&#9;secondarystucture
91 PDB secondary structure annotation&#9;FER1_SPIOL&#9;-1&#9;52&#9;59&#9;strand
92 PDB secondary structure annotation&#9;FER1_SPIOL&#9;-1&#9;74&#9;80&#9;helix
93 endgroup&#9;secondarystructure
94 </pre>
95 </li>
96 </p>
97 </body>
98 </html>