<SECT1 ID="RUNMENU">
  <TITLE>The Run Menu</TITLE>
  <PARA>
This menu is used for running external programs on UNIX and is not available
on other operating systems.  Once configured correctly, running an external
program should be as simple as selecting some features of interest, then
choosing one of the items from the run menu.  When the external programs
finishes the results can viewed using the "Search Results" item in the View
menu (see <XREF LINKEND="VIEWMENU-SEARCH-RESULTS">).
  </PARA>
  <SECT2 ID="RUNMENU-CONFIGURATION">
    <TITLE>Configuring the Run Menu</TITLE>
    <PARA>
To use this feature the run_blastp, run_fasta etc. scripts that are supplied
with &prog; will need to be changed to reflect the paths and databases that
are configured at each site.
    </PARA>
    <PARA>
Each external program that is listed in the options file (see <XREF
LINKEND="OPTIONS-FEATURE-DNA-PROGRAMS"> and <XREF
LINKEND="OPTIONS-FEATURE-PROTEIN-PROGRAMS">) gets a "run" menu item and a "set
options" menu item.  For each external program (such as blastp) there must be
a shell script available that sets any necessary environment variables and
then launches the search/analysis program (for blastp the script is called
run_blastp).
    </PARA>
    <PARA>
Taking blastp as an example, this is the sequence of events that occurs when
the user selects the "Run blastp on selected features" menu item:
      <ORDEREDLIST>
        <LISTITEM>
          <PARA>
&prog; creates a new directory in the current directory called blastp.
          </PARA>
        </LISTITEM>
        <LISTITEM>
          <PARA>
A protein FASTA sequence file is written in the new directory for each
selected feature.  (For a DNA search program such as blastn the file will be a
DNA FASTA file).  The sequence file name will be something like:
  <LITERAL>/blastp_file="blastp/features.tab.seq.00001"</LITERAL>.
          </PARA>
        </LISTITEM>
        <LISTITEM>
          <PARA>
The name of the expected output file is stored in the feature in a qualifier
called <LITERAL>/blastp_file</LITERAL>.  If the entry is called
  <LITERAL>features.tab</LITERAL> then the qualifier will be set to something
like: <LITERAL>/blastp_file="blastp/features.tab.seq.00001.out"</LITERAL>.
Note that because the file name is stored in the entry you will need to save
the entry to keep the association between the features and the output files.
          </PARA>
        </LISTITEM>
        <LISTITEM>
          <PARA>
A file is then written (called <LITERAL>file_of_filenames.blastp</LITERAL>)
that contains the names of all the newly created sequence files in the blastp
directory.
          </PARA>
        </LISTITEM>
        <LISTITEM>
          <PARA>
&prog then tries to read the <LITERAL>run_blastp</LITERAL> script from the
&prog; installation directory.  The script is executed like this:
          </PARA>
          <PARA>
  <LITERAL>run_blastp file_of_filenames.blastp [options]</LITERAL>
          </PARA>
          <PARA>
where <LITERAL>[options]</LITERAL> currently must be a single word (normally a
database to search).  In the case of blastp/blastn/fasta etc. the second
argument of the script is passed directly to the blast/fasta as the database
name.  For testing purposes it is possible to run
  <LITERAL>run_blastp</LITERAL> on the command line with the same arguments as
above.
          </PARA>
          <PARA>
  <LITERAL>run_blastp</LITERAL> will run blastp on each of the sequence files
listed in <LITERAL>file_of_filenames.blastp</LITERAL> and save the output
in the corresponding <LITERAL>.out</LITERAL> file.
          </PARA>
        </LISTITEM>
        <LISTITEM>
          <PARA>
If the program is successfully started, control will immediately return to the
user.  When <LITERAL>run_blastp</LITERAL> finishes a message will be
displayed to alert the user.
          </PARA>
          <PARA>
If necessary, it is possible to exit once &prog; indicates that the external
program has been started and the entry has been saved.
  <LITERAL>run_blastp</LITERAL> will keep running in the background.
          </PARA>
        </LISTITEM>
      </ORDEREDLIST>
    </PARA>
  </SECT2>
</SECT1>
