JAL-3224 JAL-3225 Some fixes in install4j template and build.gradle, and a correction...
[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.png" width="398" height="124">
40   <p>&quot;Find next&quot; will find the next occurrence 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, and
52       optionally also to the description string (<em>since Jalview
53         2.10</em>)
54     </li>
55     <li>If a region is selected, then search will <strong>only</strong>
56       be performed on that region.
57     </li>
58     <li>To quickly clear the current selection, press the
59       &quot;Escape&quot; key.</li>
60     <li>Tick the &quot;Match Case&quot; box to perform a case
61       sensitive search.</li>
62     <li>To access a <a ref="#queryhistory">previously used
63         query</a> press the down arrow or click on the button on the right
64       of the text field.
65   </ul>
66   <p>
67     <strong>Creating Features from Search Results</strong>
68   </p>
69   <p>If &quot;New Feature&quot; is selected, the feature can be
70     given a name from a popup input box. Use the &quot;Feature
71     Settings&quot; under the &quot;View&quot; menu to change the
72     visibility and colour of the new sequence feature.</p>
73   <p>
74   <p>
75     <strong>Selecting regions from Search Results</strong>
76   </p>
77   <p>
78     Press 'B' or use the <em>Select Highlighted Columns</em> option from
79     the alignment window's select menu to add columns containing
80     highlighted search results to the alignment window's column
81     selection. Alt-'B' will add all but the highlighted columns, and
82     Ctrl (or Cmd) -B will toggle the column selection for the
83     highlighted region.
84   </p>
85   <p>
86
87     <strong>A quick Regular Expression Guide</strong>
88   </p>
89   <p>A regular expression is not just a simple text query - although
90     it can be used like one, the query is not parsed literally, but
91     interpreted like a series of instructions defining the features of
92     the match. For example, a simple query like &quot;ACDED&quot; would
93     match all occurences of that string, but &quot;ACD+ED&quot; matches
94     both 'ACDDED' and 'ACDDDDDDDDED'. More usefully, the query
95     &quot;[GVATC]{;5,}&quot; would find stretches of small, hydrophobic
96     amino acids of at least five residues in length.</p>
97   <p>
98     The table below describes some of the regular expression syntax:<br>
99   </p>
100   <table width="100%" border="1">
101     <tr>
102       <td width="24%">Regular Expression Element</td>
103       <td width="76%">Effect</td>
104     </tr>
105     <tr>
106       <td width="24%">.</td>
107       <td width="76%">Matches any single character</td>
108     </tr>
109     <tr>
110       <td>[]</td>
111       <td>Matches any one of the characters in the brackets</td>
112     </tr>
113     <tr>
114       <td>^</td>
115       <td>Matches at the start of an ID or sequence</td>
116     </tr>
117     <tr>
118       <td>$</td>
119       <td>Matches at the end of an ID or sequence</td>
120     </tr>
121     <tr>
122       <td>*</td>
123       <td>Matches if the preceding element matches zero or more
124         times</td>
125     </tr>
126     <tr>
127       <td>?</td>
128       <td>Matches if the preceding element matched once or not at
129         all</td>
130     </tr>
131     <tr>
132       <td>+</td>
133       <td>Matches if the preceding element matched at least once</td>
134     </tr>
135     <tr>
136       <td>{count}</td>
137       <td>Matches if the preceding element matches a specified
138         number of times</td>
139     </tr>
140     <tr>
141       <td>{min,}</td>
142       <td>Matches of the preceding element matched at least the
143         specified number of times</td>
144     </tr>
145     <tr>
146       <td>{min,max}</td>
147       <td>Matches if the preceding element matches min or at most
148         max number of times</td>
149     </tr>
150   </table>
151   <p>
152     <a name="queryhistory" /><strong>Search History</strong>
153   </p>
154   <p>A record of all the recent queries made via the Find dialog are
155     stored along with your Jalview user preferences. To open the search
156     history, click on the button to the right of the query field, or
157     press the down arrow key.</p>
158   <img src="searchhist.png" width="404" height="185" align="left" />
159   <p>The search history keeps up to 99 queries by default. To clear
160     the history, or modify the size of the history, right-click the text
161     box.</p>
162   <img src="searchclearhist.png" width="402" height="127" align="left" />
163   <p>
164     <strong>Other dialogs that provide a query history</strong>
165   </p>
166   <p>
167     Jalview's <a href="uniprotsequencefetcher.html">Uniprot</a> and <a
168       href="pdbsequencefetcher.html">PDB</a> free text database search
169     dialogs also provide a query history.
170   </p>
171   <em>The query histories were introduced in Jalview 2.10.2</em>
172 </body>
173 </html>