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.
22 <head><title>Search</title>
23 <style type="text/css">
33 <p><strong>Search</strong></p>
34 <p>The search box is displayed by pressing Control and F or
35 selecting "Find..." from the "Search" menu.</p>
36 <img src="search.gif" width="339" height="110">
37 <p>"Find next" will find the next occurence of the specified and adjust
38 the alignment window view to show it, and "Find all" highlights all
39 matches for a pattern. The "New Feature" is a quick way to highlight
40 and group residues matching the specified search pattern throughout the alignment.
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
48 <li>To quickly clear the current selection, press the "Escape" key.</li>
49 <li>Tick the "Match Case" box to perform a case sensitive search.</li>
51 <p><strong>Creating Features from Search Results</strong></p>
53 If "New Feature" is selected, the feature can be given a name from
54 a popup input box. Use the "Feature Settings" under the "View"
55 menu to change the visibility and colour of the new sequence feature.</p>
56 <p><strong>A quick Regular Expression Guide</strong></p>
57 <p>A regular expression is not just a simple text query - although it
58 can be used like one, the query is not parsed literally, but
59 interpreted like a series of instructions defining the features of the
60 match. For example, a simple query like "ACDED" would
61 match all occurences of that string, but "ACD+ED" matches
62 both 'ACDDED' and 'ACDDDDDDDDED'. More usefully, the query
63 "[ILGVMA]{;5,}" would find stretches of small,
64 hydrophobic amino acids of at least five residues in length.
67 below describes some of the regular expression syntax:<br></p>
68 <table width="100%" border="1">
70 <td width="24%">Regular Expression Element</td>
71 <td width="76%">Effect</td>
74 <td width="24%">.</td>
75 <td width="76%">Matches any single character</td>
79 <td>Matches any one of the characters in the brackets</td>
83 <td>Matches at the start of an ID or sequence</td>
87 <td>Matches at the end of an ID or sequence</td>
91 <td>Matches if the preceding element matches zero or more times</td>
95 <td>Matches if the preceding element matched once or not at all</td>
99 <td>Matches if the preceding element matched at least once</td>
103 <td>Matches if the preceding element matches a specified number of
109 <td> Matches of the preceding element matched at least the
110 specified number of times</td>
114 <td>Matches if the preceding element matches min or at most max