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