Reading Configuration information from a text file
How to create a configuration XML file, given a set of Procedure files? Spire needs to know
- The order in which the Procedure files must run.
- Which directories the Procedure files belong in.
- How the Procedure files are organized into dialogs.
This is enough to create a config.xml file. But this file still requires some editing. Additional information is required:
- The source location(s) of the Procedure files (the
<Locations>
tag).
- Project info in (title, image, helpurl) in the
<Main>
tag
- Button info for each Procedure file (comment_label, button_text, program_name)
Creating a Spire configuration from a text file.
The text file must contain a list of SPIDER Procedure files, and specify
which directories and dialogs they belong to. Python programs and other
non-SPIDER executables are also allowed. The order of the list indicates
the order for running the programs.
- Each item should be on a separate line. Only the first string is used:
anything separated by a space is assumed to be a comment.
- Directories are indicated by the <dir> tag (or start the line with '#').
- Dialogs are indicated by a separating blank line.
- Procedure files may have a path, e.g. Alignment/alignsh.spi
- Non-SPIDER programs should be in parentheses
Python programs: if the Python script is a "Procedure file" (link to Spider Python Library) then do not use parentheses. If it is an independent executable (e.g., graphics tools such as ctfgroup), then it must be enclosed in parentheses.
- Labels for dialog buttons may be included as brief comments on the same
line as the Procedure file, separated by parentheses, or simply a space.
- Other configuration information may be included, indicated by tags. See
the SPIRE documentation on configuration files. This could include <title>,
<image>, <helpurl>, and <location> tags. Tag information must be on a single line.
example:
<dir>.</dir> top-level project directory
resizevol.spi
# Power_Spectra
power.spi
defocus.spi
(ctfmatch.py)
(ctfgroup) adjust defocus grouping
# Particles
noise get noise file
lfc_pick.spi
pnums.spi
(web) pick first & last good particles
This example has three directories, the project directory, Power_Spectra/ and
Particles/. Each directory is put in a separate dialog. (Show XML file generated from this input)
A directory may be split across dialogs, but you can't have multiple directories
in the same dialog, because a dialog defines a directory to run Procedure files in.
However you can run Procedure files in other directories, e.g., ../Alignment/run.spi
