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