ZMap configuration is via command line options and a number of resource files read during intitialisation and during subsequent processing. This section describes the various ways ZMap can be configured.
ZMap recognises command line options starting with double dashes:
Usage: zmap [OPTION...] A multi-threaded genome browser and annotation tool. Help Options: -?, --help Show help options Application Options: --version= Program version. --start=coord Start coord in sequence, must be in range 1 -> seq_length. --end=coord End coord in sequence, must be in range start -> seq_length, but end == 0 means show to end of sequence. --conf_file=file path Relative or full path to configuration file. --conf_dir=directory Relative or full path to configuration directory. --win_id=0x0000000 Window ID of the controlling application.
The format of the configuration files follows a stanza-based key-value format defined in the GLib Key-value parser package, e.g.
# this is a comment. [StanzaName] # another comment. property = value # string numeric = 1.0 # float number = 32000 # int truth = true # boolean list = one ; two ; three ; four # multiple strings [Next Stanza] etc.
White space is not important.
Any text following (and including) a "#" is interpreted as a comment and ignored.
Some keywords are mandatory within a stanza and hence have no default value. If are not specified the stanza is ignored.
A longer annotated example can see seen here.
ZMap uses configuration files to find its servers, files and to configure aspects of its interface. By default ZMap looks for these files in the users $HOME/.ZMap directory. The user can specify an alternative directory using the --conf_dir option.
$HOME/.ZMap
If the configuration directory does not exist then ZMap will not run.
By default the ZMap configuration file is searched for in the configuration directory but an alternative file can be specified with the --conf_file option. If this file does not exist ZMap will not run.
ZMap
This file should be located in the configuration directory and named according to the value of the stylesfile option in the ZMap stanza of the ZMap configuration file.
The following stanzas are supported by ZMap:
ZMap will work with single or multiple data sources. If there is only one data source it can be named 'source' and will be used automatically. If there are multiple data sources each one must be named uniquely and listed in the sources key in the ZMap stanza. Styles should be defined a separate configuration file, referred to in the ZMap stanza with the 'stylesfile' key.
Data sources are identified using urls in the following supported variants:
url = "<url_identifier>"
where <url_identifier> should match ([] = optional)
<protocol>://[[<username>:<password>@]<hostname>[:<port>]]/<location>#<format>
<protocol> may be one of acedb, file, pipe or http <username> should be a username string <password> should be a password string <hostname> should be a hostname string <port> should be a port number <location> should identify the location on a particular server <format> may be one of gff, das, das2 (default gff)
examples
file:///var/tmp/my_gff_file.gff#gff pipe:////software/anacode/bin/get_genes?dataset=human&name=1&analysis=ccds_gene&end=161655109... http://das1.sanger.ac.uk:8080/das/h_sapiens#das acedb://any:any:23100
N.B. <location> might include a query string too. e.g.
http://www.sanger.ac.uk/das/h_sapiens?chromosome=1#das Note that for file: and pipe: sources file:///file is a relative file name and file://// is absolute.
Traditionally, ACEDB provided this mapping during ZMap startup, but without an ACEDB connection we have no way of recieving this data.
By default, any feature requested from a pipe or other server that does not support the REQ_FEATURESETS request will be mapped to a column of the same name - this will produce a wider than normal display, but the data will at least be visible.
The stanza [featuresets] may be used to override this default mapping and will contain lines of the form:
column = source1; source2; ... sourceN
NB: This stanza will only be read in when creating a view and not on requesting a column. To change this mapping it is necessary to update the file ZMap (config) and then create a new ZMap window.
NB: these stanzas appear in a separate config file specified in [ZMap] stylesfile=xxx. Available options are given here. Each style is specified in a stanza of the same name as the style.