2.5 release doc
[jalview.git] / help / html / features / search.html
1 <html>
2 <head><title>Search</title>
3 <style type="text/css">
4 <!--
5 td {
6         text-align: center;
7 }
8 -->
9 </style>
10 </head>
11
12 <body>
13 <p><strong>Search</strong></p>
14 <p>The search box is displayed by pressing Control and F or
15   selecting &quot;Find...&quot; from the &quot;Search&quot; menu.</p>
16 <img src="search.gif" width="339" height="110">
17 <p>&quot;Find next&quot; will find the next occurence of the specified and adjust 
18   the alignment window view to show it, and &quot;Find all&quot; highlights all 
19   matches for a pattern. The &quot;New Feature&quot; is a quick way to highlight 
20   and group residues matching the specified search pattern throughout the alignment. 
21 <ul>
22   <li>The search uses regular expressions. (understands a mixture of posix and 
23     perl style regex - see below for a summary)</li>
24   <li>Gaps are ignored when matching the query to the sequences in the alignment.</li>
25   <li>The search is applied to both sequences and their IDs.</li>
26   <li>If a region is selected, then search will <strong>only</strong> be performed 
27     on that region. </li>
28   <li>To quickly clear the current selection, press the &quot;Escape&quot; key.</li>
29   <li>Tick the &quot;Match Case&quot; box to perform a case sensitive search.</li>
30 </ul>
31 <p><strong>Creating Features from Search Results</strong></p>
32 <p>
33   If &quot;New Feature&quot; is selected, the feature can be given a name from 
34   a popup input box. Use the &quot;Feature Settings&quot; under the &quot;View&quot; 
35   menu to change the visibility and colour of the new sequence feature.</p> 
36 <p><strong>A quick Regular Expression Guide</strong></p>
37 <p>A regular expression is not just a simple text query - although it
38 can be used like one, the query is not parsed literally, but
39 interpreted like a series of instructions defining the features of the
40 match. For example, a simple query like &quot;ACDED&quot; would
41 match all occurences of that string, but &quot;ACD+ED&quot; matches
42 both 'ACDDED' and 'ACDDDDDDDDED'. More usefully, the query
43 &quot;[ILGVMA]{;5,}&quot; would find stretches of small,
44 hydrophobic amino acids of at least five residues in length.
45 </p>
46 <p> The table
47 below describes some of the regular expression syntax:<br></p>
48 <table width="100%" border="1">
49   <tr>
50     <td width="24%">Regular Expression Element</td>
51     <td width="76%">Effect</td>
52   </tr>
53   <tr>
54     <td width="24%">.</td>
55     <td width="76%">Matches any single character</td>
56   </tr>
57   <tr>
58     <td>[]</td>
59     <td>Matches any one of the characters in the brackets</td>
60   </tr>
61   <tr>
62     <td>^</td>
63     <td>Matches at the start of an ID or sequence</td>
64   </tr>
65   <tr>
66     <td>$</td>
67     <td>Matches at the end of an ID or sequence</td>
68   </tr>
69   <tr>
70     <td>*</td>
71     <td>Matches if the preceding element matches zero or more times</td>
72   </tr>
73   <tr>
74     <td>?</td>
75     <td>Matches if the preceding element matched once or not at all</td>
76   </tr>
77   <tr>
78     <td>+</td>
79     <td>Matches if the preceding element matched at least once</td>
80   </tr>
81   <tr>
82     <td>{count}</td>
83     <td>Matches if the preceding element matches a specified number of
84     times
85     </td>
86   </tr>
87   <tr>
88     <td>{min,}</td>
89     <td> Matches of the preceding element matched at least the
90     specified number of times</td>
91   </tr>
92   <tr>
93     <td>{min,max} </td>
94     <td>Matches if the preceding element matches min or at most max
95     number of times</td>
96   </tr>
97 </table>
98 </body>
99 </html>