13.1 Setting the Limits: Number of Results, Timeout

If you want to limit the result to a given number of lines (e.g. for quick testing, or load control on a server), the switch -lim is useful. Caveat: Please note that the results obtained using this switch depend on the storage of the data inside the SQL database, i.e. the results are not sorted and what is actually returned may vary from one instance of HitKeeper to another.

 

seq_query seq_name=VAV_HUMAN,VAV_RAT,VAV_MOUSE -lim=10

A similar switch is -tim, which controls a timeout for the query: If you run deeply nested queries, it may happen that the execution takes a long time. Instead of waiting, you can set a timeout (in seconds). The default is 60; any positive value can be given, and 0 means unlimited. The following command would set a timeout of 15 seconds and bail out with an error message if the query was not completed in that time:

 

seq_query seq_name=VAV_HUMAN,VAV_RAT,VAV_MOUSE -tim=15

Both -lim and -tim can be used either with an individual command (as shown in the lines above), or set as a “session parameter”, using the command default_set. To see the set values, use default_list:

 

default_set -tim=15 -lim=10 
default_list

 

13.2 Output Format

By default, results are printed in a text format that is usually suitable for working with command-line tools. This default format is referred to as the cli (command line interface) format.

As an alternative, XML-formatted output is available for every command if the -format=xml switch is used:

 

seq_query seq_name=THIO_ECOLI  

seq_query seq_name=THIO_ECOLI -format=cli   # same as default

seq_query seq_name=THIO_ECOLI -format=xml   # XML

The default output format can be set to XML using the following command:

 

default_set -format=xml

To verify the settings:

 

default_list

 

13.3 Retrieving Query Results

Most of the queries that are discussed on the following pages allows not only printing to screen, but also saving the result - or the query itself - to file. To write some result to file, simply add the -out key, as in this example:

 

query_list -out=/path/to/file

Note that this is not possible with the Web interface - just use the ”save as...” function of your web browser instead.

FIXME: Must be fixed for the command line ’remote’ client.