1 | #Please insert up references in the next lines (line starts with keyword UP) |
---|
2 | UP arb.hlp |
---|
3 | UP glossary.hlp |
---|
4 | |
---|
5 | #Please insert subtopic references (line starts with keyword SUB) |
---|
6 | #SUB subtopic.hlp |
---|
7 | |
---|
8 | # Hypertext links in helptext can be added like this: LINK{ref.hlp|http://add|bla@domain} |
---|
9 | |
---|
10 | #************* Title of helpfile !! and start of real helpfile ******** |
---|
11 | TITLE Searching |
---|
12 | |
---|
13 | OCCURRENCE ARB_NT/Species/Search and Query |
---|
14 | ARB_NT/Genome/Search and Query |
---|
15 | ARB_NT/Tree/Search groups.. |
---|
16 | |
---|
17 | DESCRIPTION This describes the search feature in ARB as used in the following |
---|
18 | search and query modules: |
---|
19 | * LINK{sp_search.hlp} |
---|
20 | * LINK{group_search.hlp} |
---|
21 | * LINK{gene_search.hlp} |
---|
22 | |
---|
23 | When we talk about 'items' below, we mean e.g. 'species', 'genes', 'taxonomic groups' |
---|
24 | etc., depending which search tool you are currently using. |
---|
25 | |
---|
26 | |
---|
27 | SECTION SEARCH FIELD |
---|
28 | |
---|
29 | Each search expression applies either |
---|
30 | |
---|
31 | - to a specific item field (e.g. 'full_name') or |
---|
32 | - to some criterion calculated on the fly (e.g. amount of marked species inside a taxonomic group) or |
---|
33 | - to any or all item fields, if you select one of the entries in "[...]". |
---|
34 | |
---|
35 | The following special search fields may be available: |
---|
36 | |
---|
37 | * "[any field]" reports a match if any direct field matches the expression. |
---|
38 | * "[all fields]" reports a match if all direct fields match the expression. |
---|
39 | * "[any recursive]" reports a match if any direct or hierarchical field matches the expression. |
---|
40 | * "[all recursive]" reports a match if all direct and hierarchical fields match the expression. |
---|
41 | |
---|
42 | Notes: |
---|
43 | |
---|
44 | * search is much slower using one of the 'recursive' fields mostly |
---|
45 | because sequence data is searched as well. |
---|
46 | * "[all fields]" is often used together with "not equal" (see below), |
---|
47 | making it equivalent to "no field matches expression". |
---|
48 | |
---|
49 | SECTION SEARCH OPERATORS |
---|
50 | |
---|
51 | There are two kinds of search operators directly available for queries: |
---|
52 | |
---|
53 | 1. the "equal" sign between the field and the match expression means that |
---|
54 | the selected field (or any field) should match the expression. |
---|
55 | Clicking on the sign inverts it into a "not equal" sign, which means |
---|
56 | the selected field shall not match the expression. |
---|
57 | |
---|
58 | 2. the search operators at the beginning of the 2nd and 3rd line |
---|
59 | allow to connect the 3 search expressions available for each query. |
---|
60 | Possible values are 'and', 'or' or 'ign'. |
---|
61 | |
---|
62 | - 'ign' stands for "ignore" (the rest of the line will be ignored) |
---|
63 | - selecting 'and' means the preceeding and the expression behind have to match |
---|
64 | - selecting 'or' means the preceeding or the expression behind have to match |
---|
65 | |
---|
66 | There is no operator precedence, i.e. |
---|
67 | - "1st and 2nd or 3rd" is interpreted as "(1st and 2nd) or 3rd" AND |
---|
68 | - "1st or 2nd and 3rd" is interpreted as "(1st or 2nd) and 3rd" |
---|
69 | |
---|
70 | More search operators are available to connect multiple (consecutive) queries: |
---|
71 | |
---|
72 | - using 'Add species' provides a global OR operator (uniting the results |
---|
73 | of the preceeding and the next query), |
---|
74 | - using 'Keep species' provides a global AND operator (intersecting the results |
---|
75 | of the preceeding and the next query) and |
---|
76 | - using "that don't match the q." provides a global NOT operator for the next query |
---|
77 | |
---|
78 | Results of queries can be transformed into a set of 'marked species' |
---|
79 | using "Mark listed unmark rest" and the marked species can be stored |
---|
80 | as LINK{species_configs.hlp}. Multiple stored configurations can be |
---|
81 | logically combined to new sets of marked species. |
---|
82 | To again create a query result from all marked species simply use |
---|
83 | "Search species ... that are marked". |
---|
84 | |
---|
85 | |
---|
86 | SECTION MATCH EXPRESSION |
---|
87 | |
---|
88 | - Each expression tries to match the complete field content |
---|
89 | (or the result of the underlaying calculation), |
---|
90 | i.e. searching for 'test' will match only fields which |
---|
91 | exactly contain 'test' (not 'my test' or 'testing'). |
---|
92 | |
---|
93 | - If you search for '' (empty expression), all fields w/o data, i.e. all |
---|
94 | non-existing fields will be found. |
---|
95 | |
---|
96 | - if you want to match all fields that contain some substring |
---|
97 | then use wildcards: |
---|
98 | |
---|
99 | - '*' |
---|
100 | |
---|
101 | will match any number of characters (including no characters). |
---|
102 | |
---|
103 | - '?' |
---|
104 | |
---|
105 | will match exactly one character |
---|
106 | |
---|
107 | If the whole search expression is '*', then it is handled like '?*' (which |
---|
108 | means 'at least one character'). That means searching for '*' will match any |
---|
109 | non-empty field. |
---|
110 | |
---|
111 | Examples: |
---|
112 | |
---|
113 | '*pseu*' matches all fields with the substring 'pseu' |
---|
114 | 'pyrococcus*' matches all fields starting with 'pyrococcus' |
---|
115 | '*bact*ther*' matches all fields with the substring 'bact' followed by 'ther' |
---|
116 | (there may be many characters in-between or none, |
---|
117 | i.e. it does match 'bactther' as well as 'Corynebacterium diphtheriae') |
---|
118 | |
---|
119 | - if the first character is '<' or '>' and the rest is a number, |
---|
120 | then a numerical comparison is performed: |
---|
121 | |
---|
122 | - '<7' |
---|
123 | |
---|
124 | matches all fields containing a number smaller than 7 |
---|
125 | |
---|
126 | - '>10' |
---|
127 | |
---|
128 | matches all fields containing a number greater than 10 |
---|
129 | |
---|
130 | Be careful: |
---|
131 | |
---|
132 | Negating '<7' does NOT only match numbers greater or equal to seven. It as |
---|
133 | well finds all non-numeric contents. Use something like '>6.999' instead. |
---|
134 | |
---|
135 | - if the first character is '/' then the following regular expression is used |
---|
136 | for the query (see LINK{reg.hlp}). |
---|
137 | |
---|
138 | - if the first character is '|' then the following ACI expression is evaluated |
---|
139 | and the query hits, if the evaluation is not "0". |
---|
140 | See LINK{aci.hlp}. |
---|
141 | |
---|
142 | - if the query string is completely empty, it hits if the selected field does |
---|
143 | not exist (or if a calculation produces no/empty result). |
---|
144 | |
---|
145 | SECTION SORTING RESULTS |
---|
146 | |
---|
147 | Search results are displayed unsorted by default. You can sort them, by selecting |
---|
148 | a different order with the sort radio button. |
---|
149 | |
---|
150 | The provided sort criteria depend on the kind of query. The following list shows |
---|
151 | the sort criteria available in LINK{sp_search.hlp}: |
---|
152 | |
---|
153 | unsorted display items like they are stored in database |
---|
154 | by value sort by content of first query field |
---|
155 | by number same as "by value", but sort numerically |
---|
156 | (for string-type fields this sorts multiple columns of numbers) |
---|
157 | by id sort by unique item id (e.g. 'name' for species) |
---|
158 | by parent sort by globally unique id of parent item (e.g. 'name' of organism for genes) |
---|
159 | by marked sort marked before unmarked items |
---|
160 | by hit sort by (and display) hit description (the hit description tells you |
---|
161 | why an item was hit by query) |
---|
162 | reverse reverts previously selected sort order |
---|
163 | |
---|
164 | ARB remembers and uses all the sort criteria you apply. |
---|
165 | |
---|
166 | Example: Selecting 'by id' will sort the items by their id (e.g. 'name'). If you |
---|
167 | select 'by value' afterwards, ARB will sort items by the content of the first query |
---|
168 | field - if the contents of some items are equal, it will still sort them by name. |
---|
169 | |
---|
170 | NOTES Wildcarded or exact search always searches case insensitive. |
---|
171 | Regular expression search always searches case sensitive. |
---|
172 | |
---|
173 | EXAMPLES see LINK{sp_search.hlp} |
---|
174 | |
---|
175 | WARNINGS Using ACI is a bit tricky here, cause you cannot see what happens. |
---|
176 | |
---|
177 | Using 'trace(1)' somewhere in the ACI expression starts to print an |
---|
178 | ACI trace to the console. To view the console refer to LINK{console.hlp}. |
---|
179 | |
---|
180 | BUGS No bugs known |
---|