This brings up the Query Commands window.
ACeDB queries can be entered directly into the Query box, using a powerful but moderately complex syntax. ACeDB also provides two utilities, Query Builder and Query by Example, which greatly simplify query formulation.
The query syntax is described in the help page Query_syntax (to read it, select Help from any pop-up menu, click on the Menu button then click on Query_syntax). In a nutshell, a query is a logical expression which is either true or false. The query tool searches a designated keyset (a set of objects) and reports all those for whom the expression is true. The program can understand a number of operators including AND, OR, NOT, =, > (greater than) and < (less than). The wildcard characters *, # and ? can also be used. The keyset to be searched is specified using the following commands:
>?ClassName expression: (or Find ClassName expression)
searches all the objects in the class ClassName and retrieves those for whom the logical expression expression is true (e.g., >?locus a* retrieves all the objects in the class `Locus' whose name starts with `a'. >?locus allele = a* retrieves all the loci with an allele whose name starts with `a'). The Query builder (demonstrated below) provides the simplest way to obtain a list of available classes.
>Tag expression: (or Follow Tag expression)
searches the objects under the heading Tag, inside the objects of the active keyset, i.e., those currently displayed in the Main Keyset window, or a new user-defined keyset window, and retrieves those for whom the expression expression is true (e.g., >gene a* will search the objects in the current keyset and retrieve the genes with a name starting with `a' inside these objects). The simplest way to list the available tags is to use the Query Builder.
Note: a `tag' is a heading in a window, not a class name (although the two can be the same). For example, `Author' is both a class (which can be searched with the command >?author) and a heading in the `Paper' text windows (which can be searched using the command >author provided there are objects of the class `Paper' in the active keyset). Author names are also listed in the `Laboratory' text windows, but under the tag `Staff' rather then `Author'.
If no keyset is specified, the expression is applied to all the objects in the current keyset.
* Click on the Query box and type >?map <return>.
This query retrieves all the objects in the class `Map' and lists them in the Main Keyset window. In this case, maps of the C. elegans chromosomes are listed. A second query box appears underneath the first one to enter further queries.
* Click on this second Query box and type locus = cat-1 <return>.
The program searches the active keyset (the chromosomes) and reports those objects containing the cat-1 locus (only the X chromosome qualifies). A third query box appears.
* Click on the third Query box and type >locus allele = a* <return>.
This time the program searches for loci in the active keyset (chromosome X) with an allele whose name starts with `a'. Because the query started with >, the loci (and not the map) are reported.
The following example illustrates the difference between tags and classes:
* Click on Clear to reset the Query Commands window.
* Enter the query >?author br* to list all author names starting with `br'.
* Enter the query >laboratory in the next Query box.
The program lists (by abbreviation) all the laboratories associated with the authors in the active keyset.
* Double-click on one of the laboratory abbreviations to display its text window.
Note that the author names are listed under the heading `Staff'.
* Click on the third query box in the Query Commands window and enter the query >author.
Since there is no tag by that name in the Laboratory window, nothing is retrieved.
* Click on the first Query box in the Query Commands window (which should contain the query `>?author br*) and press <return> to repeat the first query.
* Do likewise for the second query.
* Enter >staff as the third query.
This time, the authors associated with the laboratories in the active keyset are correctly listed. Note that these objects are members of the `Author' class (double-click on one of these names and check the title of the window which appears).
return to Table of Contents
next section: The Query Builder