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