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