JAL-1738 mention Ctrl/Cmd/Alt modifiers and mention that B by default adds columns...
[jalview.git] / help / html / features / search.html
1 <html>
2 <!--
3  * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4  * Copyright (C) $$Year-Rel$$ 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>
23 <title>Search</title>
24 <style type="text/css">
25 <!--
26 td {
27         text-align: center;
28 }
29 -->
30 </style>
31 </head>
32
33 <body>
34   <p>
35     <strong>Search</strong>
36   </p>
37   <p>The search box is displayed by pressing Control and F or
38     selecting &quot;Find...&quot; from the &quot;Search&quot; menu.</p>
39   <img src="search.gif" width="339" height="110">
40   <p>&quot;Find next&quot; will find the next occurence of the
41     specified and adjust the alignment window view to show it, and
42     &quot;Find all&quot; highlights all matches for a pattern. The
43     &quot;New Feature&quot; is a quick way to highlight and group
44     residues matching the specified search pattern throughout the
45     alignment.
46   <ul>
47     <li>The search uses regular expressions. (understands a mixture
48       of posix and perl style regex - see below for a summary)</li>
49     <li>Gaps are ignored when matching the query to the sequences
50       in the alignment.</li>
51     <li>The search is applied to both sequences and their IDs.</li>
52     <li>If a region is selected, then search will <strong>only</strong>
53       be performed on that region.
54     </li>
55     <li>To quickly clear the current selection, press the
56       &quot;Escape&quot; key.</li>
57     <li>Tick the &quot;Match Case&quot; box to perform a case
58       sensitive search.</li>
59   </ul>
60   <p>
61     <strong>Creating Features from Search Results</strong>
62   </p>
63   <p>If &quot;New Feature&quot; is selected, the feature can be
64     given a name from a popup input box. Use the &quot;Feature
65     Settings&quot; under the &quot;View&quot; menu to change the
66     visibility and colour of the new sequence feature.</p>
67   <p>
68   <p>
69     <strong>Selecting regions from Search Results</strong>
70   </p>
71   <p>
72     Press 'B' or use the <em>Select Highlighted Columns</em> option from
73     the alignment window's select menu to add columns containing
74     highlighted search results to the alignment window's column
75     selection. Alt-'B' will add all but the highlighted columns, and
76     Ctrl (or Cmd) -B will toggle the column selection for the
77     highlighted region.
78   </p>
79   <p>
80   
81     <strong>A quick Regular Expression Guide</strong>
82   </p>
83   <p>A regular expression is not just a simple text query - although
84     it can be used like one, the query is not parsed literally, but
85     interpreted like a series of instructions defining the features of
86     the match. For example, a simple query like &quot;ACDED&quot; would
87     match all occurences of that string, but &quot;ACD+ED&quot; matches
88     both 'ACDDED' and 'ACDDDDDDDDED'. More usefully, the query
89     &quot;[GVATC]{;5,}&quot; would find stretches of small, hydrophobic
90     amino acids of at least five residues in length.</p>
91   <p>
92     The table below describes some of the regular expression syntax:<br>
93   </p>
94   <table width="100%" border="1">
95     <tr>
96       <td width="24%">Regular Expression Element</td>
97       <td width="76%">Effect</td>
98     </tr>
99     <tr>
100       <td width="24%">.</td>
101       <td width="76%">Matches any single character</td>
102     </tr>
103     <tr>
104       <td>[]</td>
105       <td>Matches any one of the characters in the brackets</td>
106     </tr>
107     <tr>
108       <td>^</td>
109       <td>Matches at the start of an ID or sequence</td>
110     </tr>
111     <tr>
112       <td>$</td>
113       <td>Matches at the end of an ID or sequence</td>
114     </tr>
115     <tr>
116       <td>*</td>
117       <td>Matches if the preceding element matches zero or more
118         times</td>
119     </tr>
120     <tr>
121       <td>?</td>
122       <td>Matches if the preceding element matched once or not at
123         all</td>
124     </tr>
125     <tr>
126       <td>+</td>
127       <td>Matches if the preceding element matched at least once</td>
128     </tr>
129     <tr>
130       <td>{count}</td>
131       <td>Matches if the preceding element matches a specified
132         number of times</td>
133     </tr>
134     <tr>
135       <td>{min,}</td>
136       <td>Matches of the preceding element matched at least the
137         specified number of times</td>
138     </tr>
139     <tr>
140       <td>{min,max}</td>
141       <td>Matches if the preceding element matches min or at most
142         max number of times</td>
143     </tr>
144   </table>
145 </body>
146 </html>