There are 3 general forms for a query command:
>?Class xxxxxx
> Tag xxxxxx
A composite query can be formed by chaining a series of queries separated by semicolons, in which case the active KeySet obtained as intermediate results are passed into the next query.
$| SETOR $& SETOR $^ SETXOR $- SETMINUS $= SETDEFINE (possibly bugged) NEIGHBOURS | OR ^ XOR & AND ! NOT # Jumps in constructed types. < to compare numbers <= " > " >= " = to compare numbers or match the left hand side to a template, i.e a word with wild chars *, ?. COUNT Counts the number of entries to right of its rhs IS xxx Checks if name of the active object matches xxx CLASS xxx Checks if active object belongs to (sub)class xxxParentheses of all sorts "( [" can be used freely, but must be matched.
Words are matched to a tag or treated just as text. They must be put in "double quotes" if they include spaces or any operator &, |, ^, <, >, =, (, ), [, ], {, }. Wild cards can be used in words but then they are not at present matched to tags except in a redirection. Numbers are parsed as floats.
1. >?Chrom*lists all chromosomes
2. >?Author s* | a*lists all authors whose name begins with s or a
3. >?Au* s?s* OR b*s*lists all authors whose name matches s?s* or b*s*
4. >Pap* Journal = N* OR Year > 1987Checks the previous list from query 3; redirect to papers then lists all papers published in N(ature) or after 1987
5. Year = 1988Restricts to the papers of exactly 1987
6. >?Gen* myo* CloneAll the cloned myosin genes
7. Find Author IS "Sulston JE" ; >Paper ; >AuthorFinds all the coauthors of papers by Sulston.
B_F 100 0to identify compounds with boiling and freezing points in a certain range:
Find Chemical B_F >50 AND NEXT >100 AND HERE <250i.e., with boiling points > 50 and freezing points between 100 and 250 degrees.
This is clearly hard to read. Also, it will be evaluated at execution left to right as it should only if the precedence of the operators allows it. Be careful.
Subtypes: to locate a tag in a subtytpe, you must indicate the path using the operator #, for example:
Find Gene Lab AND NEXT#freezer = 4To find all the genes in your freezer number 4
COUNT: this operator can be used to test the number of entries. For example, to find prolific authors:
Find Author COUNT Paper > 100to Table of Contents
last edited: July 1994