85efc2ea14e8e6fdd0bec65d31163e97a0f086b1
[jalview.git] / help / html / features / search.html
1 #-------------------------------------------------------------------------------
2 # Jalview - A Sequence Alignment Editor and Viewer (Version 2.5.1)
3 # Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
4
5 # This file is part of Jalview.
6
7 # Jalview is free software: you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License 
9 # as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10
11 # Jalview is distributed in the hope that it will be useful, but 
12 # WITHOUT ANY WARRANTY; without even the implied warranty 
13 # of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14 # PURPOSE.  See the GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17 #-------------------------------------------------------------------------------
18 <html>
19 <!--
20  * Jalview - A Sequence Alignment Editor and Viewer (Version 2.5)
21  * Copyright (C) 2010 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
22  * 
23  * This file is part of Jalview.
24  * 
25  * Jalview is free software: you can redistribute it and/or
26  * modify it under the terms of the GNU General Public License 
27  * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
28  * 
29  * Jalview is distributed in the hope that it will be useful, but 
30  * WITHOUT ANY WARRANTY; without even the implied warranty 
31  * of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
32  * PURPOSE.  See the GNU General Public License for more details.
33  * 
34  * You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
35 -->
36 <head><title>Search</title>
37 <style type="text/css">
38 <!--
39 td {
40         text-align: center;
41 }
42 -->
43 </style>
44 </head>
45
46 <body>
47 <p><strong>Search</strong></p>
48 <p>The search box is displayed by pressing Control and F or
49   selecting &quot;Find...&quot; from the &quot;Search&quot; menu.</p>
50 <img src="search.gif" width="339" height="110">
51 <p>&quot;Find next&quot; will find the next occurence of the specified and adjust 
52   the alignment window view to show it, and &quot;Find all&quot; highlights all 
53   matches for a pattern. The &quot;New Feature&quot; is a quick way to highlight 
54   and group residues matching the specified search pattern throughout the alignment. 
55 <ul>
56   <li>The search uses regular expressions. (understands a mixture of posix and 
57     perl style regex - see below for a summary)</li>
58   <li>Gaps are ignored when matching the query to the sequences in the alignment.</li>
59   <li>The search is applied to both sequences and their IDs.</li>
60   <li>If a region is selected, then search will <strong>only</strong> be performed 
61     on that region. </li>
62   <li>To quickly clear the current selection, press the &quot;Escape&quot; key.</li>
63   <li>Tick the &quot;Match Case&quot; box to perform a case sensitive search.</li>
64 </ul>
65 <p><strong>Creating Features from Search Results</strong></p>
66 <p>
67   If &quot;New Feature&quot; is selected, the feature can be given a name from 
68   a popup input box. Use the &quot;Feature Settings&quot; under the &quot;View&quot; 
69   menu to change the visibility and colour of the new sequence feature.</p> 
70 <p><strong>A quick Regular Expression Guide</strong></p>
71 <p>A regular expression is not just a simple text query - although it
72 can be used like one, the query is not parsed literally, but
73 interpreted like a series of instructions defining the features of the
74 match. For example, a simple query like &quot;ACDED&quot; would
75 match all occurences of that string, but &quot;ACD+ED&quot; matches
76 both 'ACDDED' and 'ACDDDDDDDDED'. More usefully, the query
77 &quot;[ILGVMA]{;5,}&quot; would find stretches of small,
78 hydrophobic amino acids of at least five residues in length.
79 </p>
80 <p> The table
81 below describes some of the regular expression syntax:<br></p>
82 <table width="100%" border="1">
83   <tr>
84     <td width="24%">Regular Expression Element</td>
85     <td width="76%">Effect</td>
86   </tr>
87   <tr>
88     <td width="24%">.</td>
89     <td width="76%">Matches any single character</td>
90   </tr>
91   <tr>
92     <td>[]</td>
93     <td>Matches any one of the characters in the brackets</td>
94   </tr>
95   <tr>
96     <td>^</td>
97     <td>Matches at the start of an ID or sequence</td>
98   </tr>
99   <tr>
100     <td>$</td>
101     <td>Matches at the end of an ID or sequence</td>
102   </tr>
103   <tr>
104     <td>*</td>
105     <td>Matches if the preceding element matches zero or more times</td>
106   </tr>
107   <tr>
108     <td>?</td>
109     <td>Matches if the preceding element matched once or not at all</td>
110   </tr>
111   <tr>
112     <td>+</td>
113     <td>Matches if the preceding element matched at least once</td>
114   </tr>
115   <tr>
116     <td>{count}</td>
117     <td>Matches if the preceding element matches a specified number of
118     times
119     </td>
120   </tr>
121   <tr>
122     <td>{min,}</td>
123     <td> Matches of the preceding element matched at least the
124     specified number of times</td>
125   </tr>
126   <tr>
127     <td>{min,max} </td>
128     <td>Matches if the preceding element matches min or at most max
129     number of times</td>
130   </tr>
131 </table>
132 </body>
133 </html>