3 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
4 * Copyright (C) $$Year-Rel$$ The Jalview Authors
6 * This file is part of Jalview.
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.
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.
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.
24 <style type="text/css">
35 <strong>Search</strong>
37 <p>The search box is displayed by pressing Control and F or
38 selecting "Find..." from the "Search" menu.</p>
39 <img src="search.png" width="400" height="152">
40 <p>"Find next" will find the next occurrence of the
41 query and adjust the alignment window view to show it, and
42 "Find all" highlights all matches for a query. The
43 "New Feature" is a quick way to highlight and group
44 residues matching the specified search pattern throughout the
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>Hidden columns can optionally be ignored (<em>since Jalview 2.11</em>)</li>
52 <li>The search is applied to both sequences and their IDs. It can
53 optionally also be applied to the description string (<em>since Jalview
54 2.10</em>), and sequence feature descriptions (<em>since Jalview 2.11.2.5</em>).
56 <li>If a region is selected, then search will <strong>only</strong>
57 be performed on that region.<br />
58 <em>Tip: to quickly clear the current selection, click the
59 alignment view you wish to search, then press 'Escape'.</em>
61 <li>Tick the "Match Case" box to perform a case
62 sensitive search.</li>
63 <li>To access a <a href="#queryhistory">previously used
64 query</a> press the down arrow or click on the button on the right
68 <strong>Creating Features from Search Results</strong>
70 <p>If "New Feature" is selected, the feature can be
71 given a name from a popup input box. Use the "Feature
72 Settings" under the "View" menu to change the
73 visibility and colour of the new sequence feature.</p>
76 <strong>Selecting regions from Search Results</strong>
79 Press 'B' or use the <em>Select Highlighted Columns</em> option from
80 the alignment window's select menu to add columns containing
81 highlighted search results to the alignment window's column
82 selection. Alt-'B' will add all but the highlighted columns, and
83 Ctrl (or Cmd) -B will toggle the column selection for the
87 <strong>Copying highlighted regions to a new alignment</strong>
90 You can copy the currently highlighted matching regions of sequences to the clipboard with alt-Command-C.
94 <strong>A quick Regular Expression Guide</strong>
96 <p>A regular expression is not just a simple text query - although
97 it can be used like one, the query is not parsed literally, but
98 interpreted like a series of instructions defining the features of
99 the match. For example, a simple query like "ACDED" would
100 match all occurences of that string, but "ACD+ED" matches
101 both 'ACDDED' and 'ACDDDDDDDDED'. More usefully, the query
102 "[GVATC]{;5,}" would find stretches of small, hydrophobic
103 amino acids of at least five residues in length.</p>
105 The table below describes some of the regular expression syntax:<br>
107 <table width="100%" border="1">
109 <td width="24%">Regular Expression Element</td>
110 <td width="76%">Effect</td>
113 <td width="24%">.</td>
114 <td width="76%">Matches any single character</td>
118 <td>Matches any one of the characters in the brackets</td>
122 <td>Matches at the start of an ID or sequence</td>
126 <td>Matches at the end of an ID or sequence</td>
130 <td>Matches if the preceding element matches zero or more
135 <td>Matches if the preceding element matched once or not at
140 <td>Matches if the preceding element matched at least once</td>
144 <td>Matches if the preceding element matches a specified
149 <td>Matches of the preceding element matched at least the
150 specified number of times</td>
154 <td>Matches if the preceding element matches min or at most
155 max number of times</td>
159 <a name="queryhistory" /><strong>Search History</strong>
161 <p>A record of all the recent queries made via the Find dialog are
162 stored along with your Jalview user preferences. To open the search
163 history, click on the button to the right of the query field, or
164 press the down arrow key.</p>
165 <p><img src="searchhist.png" width="404" height="185" />
166 </p><p>The search history keeps up to 99 queries by default. To clear
167 the history, or modify the size of the history, right-click the text
169 <p><img src="searchclearhist.png" width="402" height="127"/>
172 <strong>Other dialogs that provide a query history</strong>
175 Jalview's <a href="uniprotsequencefetcher.html">Uniprot</a> and <a
176 href="pdbsequencefetcher.html">PDB</a> free text database search
177 dialogs also provide a query history.
179 <em>The query histories were introduced in Jalview 2.10.2</em>